Skip to content
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

Map initialization not correctly centered when displaying an element with large boundaries #1332

Closed
dtrucs opened this issue Dec 19, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@dtrucs
Copy link
Collaborator

dtrucs commented Dec 19, 2024

Since 3.23.0 version and its upgrade of a numerous packages related to leaflet there is a regression concerning large lineString not correctly centered once the page loads. It appears zoomed in.

After some investigations:

  • The map container have not minZoom explicitly defined
  • If we define an explicit 0 value, the bug is gone.
  • According to the leaflet documentation:

    If [the minZoom is] not specified and at least one GridLayer or TileLayer is in the map, the lowest of their minZoom options will be used instead.

  • But we don't want to define it explicitly because we let the user to choose minZoom / maxZoom by defining in the options of tileLayer in map.json.
  • There is no minZoom specified, but it seems curiously to be set to 13. And it looks like a matching with default value of zoomAvailableOffline settings.

Identified here, the load of mapOfflineLayer forces a minZoom to 13.

@dtrucs
Copy link
Collaborator Author

dtrucs commented Jan 7, 2025

Fixed since 3.24.2.

@dtrucs dtrucs closed this as completed Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant