sometimes marker disappear after fitbounds

1,183 views
Skip to first unread message

Mathilde Pellerin

unread,
Oct 8, 2013, 3:33:34 AM10/8/13
to leafl...@googlegroups.com
Hi all, 

I use leaflet with Leaflet.markercluster plugin (https://github.com/Leaflet/Leaflet.markercluster).
I have a map with L.TileLayer.WMS for base layer, and L.MarkerClusterGroup for markers layer.

It works well, but when I zoom on differents place on the map with map.fitBounds(...), sometimes marker disappear from the map and I have to move the map (drag or zoom with mouse) to make it reappear. 
I have no idea from where this bug comes and I can't figure out how to find it. 

Did someone ever seen this strange behaviour? Can someone guide me to find out what's wrong?
I failed to reproduce this bug on js fiddle because the use of markercluster plugin (sources are not online) and I use custom icons for markers.

Any idea will welcome.

Mathilde Pellerin

unread,
Oct 8, 2013, 4:38:53 AM10/8/13
to leafl...@googlegroups.com
Good news : I created a little app which reproduce the bug.
the map is initialized on France view with two markers : one in france, and one in Guadeloupe.
Click on the button change view trigger fitbounds on guadeloupe : the marker is not displayed. But move a little the map, and the marker will appear.
leaflet_debug.tar.gz

Mathilde Pellerin

unread,
Oct 18, 2013, 10:50:35 AM10/18/13
to leafl...@googlegroups.com
Problem solved : it was a bug in markercluster plugin.
Reply all
Reply to author
Forward
0 new messages