Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When you use module leaflet_markercluster and default map settings all works perfect.
But when you want override default map settings(as example in view), in this case zoom level, geoclusteting doesn't works correct. See screenshots.
When you set custom zoom level, function leaflet_apply_map_settings()
overrides default settings for map. After that you see incorrect clusters.
That happens because max/min zoom level in hook_leaflet_map_info()
is integer, but in leaflet_apply_map_settings()
you using strval()
and cast type to string, but for correct work zoom should be integer.
Comment | File | Size | Author |
---|---|---|---|
#5 | Screen Shot 2015-06-03 at 9.02.51 PM.png | 35.22 KB | dadderley |
#1 | leaflet-zoom_level-2366987-1.patch | 1.08 KB | sanchiz |
Comments
Comment #1
sanchiz CreditAttribution: sanchiz commentedInitial patch.
Comment #2
sanchiz CreditAttribution: sanchiz commentedComment #3
sanchiz CreditAttribution: sanchiz commentedComment #4
pfournier CreditAttribution: pfournier at Whisky Echo Bravo commentedGot the same problem, found the same fix.
Comment #5
dadderley CreditAttribution: dadderley as a volunteer commentedThank you sanchiz.
The patch works brilliantly. Nodes with the same address display in the spidered fashion as they should.
Comment #7
RdeBoerCommitted.
Thanks so much Sanchiz.
Available now in 7.x-1.x-dev or in in 7.x-1.2 and later once released.
Rik