Skip to content

[Map] FitBoundsToMarkers #2774

Closed
Closed
@dannyvw

Description

@dannyvw

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions