Skip to content

[Map] FitBoundsToMarkers #2774

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
dannyvw opened this issue May 26, 2025 · 0 comments · May be fixed by #2811
Open

[Map] FitBoundsToMarkers #2774

dannyvw opened this issue May 26, 2025 · 0 comments · May be fixed by #2811

Comments

@dannyvw
Copy link
Contributor

dannyvw commented May 26, 2025

When creating a map you can set zoom/center and fitBoundsToMarkers (true). This works fine because when you don't have markers the zoom/center will be used from the configuration. And when there are markers fitBoundsToMarkers will be activated.

When using a live component for adding new markers then fitBoundsToMarkers is always set to false when there is a zoom/center configured (https://github.com/symfony/ux/blob/2.x/src/Map/src/Map.php#L181). Both options can exist together. Now you get the situation that as there a no markers you see a grey map instead of the default zoom/center.

It is possible to use the configured value for fitBoundsToMarkers?

@dannyvw dannyvw added the RFC label May 26, 2025
@carsonbot carsonbot added the Map label May 26, 2025
@dannyvw dannyvw linked a pull request Jun 2, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants