Leaflet.markercluster: Doesn't support negative zoom levels (Cluster icons don't show up/disappears)
Hi,
I am using an imageOverlay map for my indoor floorplan project with bounds set to the image exact resolution. In the example below it is 2003px*1203px, but it can be higher. I encountered following issues:
- The cluster icon doesn’t show up when the map is loaded.
- The cluster icon and the non-clustered marker icon can disappear and show up after zooming (mostly on low zoom levels).
- The icon’s positioning on the map is not correct at some zoom levels (mostly low zoom).
- After “playing” with zoom for some time a second cluster icon can appear so you can see 2 clusters for the same markers. Though this happens very rarely and i couldn’t reproduce this issue intentionally.
If i change the bounds from
var bounds = [[0,0], [1203, 2003]]
to smaller values like
var bounds = [[0,0], [120.3, 200.3]]
all seem to be working correctly.
But i would like to keep the big bounds for my project…
Please take a look at the example: https://jsfiddle.net/8voh7rLs/ For this example i used Leaflet 1.0.0-beta.2 and Markercluster 1.0.0-rc.1.0
Thanks!
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 15 (8 by maintainers)
Commits related to this issue
- Fix a few more cases where negative minZoom wasn't handled. refs #704 — committed to Leaflet/Leaflet.markercluster by deleted user 7 years ago
This should be fixed now. Please try the latest git, or grab a built version from below and report back https://gist.github.com/danzel/986636912dd3cde1e4f3c6ecf6908c7e
If this works then I’ll do a new build.