Reputation: 1787
I'm having trouble with a Leaflet bug (?) - when adding a layer, the tiles are in wrong position, and will only snap back into place on first drag. See this animated gif.
The map.invalidateSize()
does nothing. Any suggestions?
Upvotes: 1
Views: 1242
Reputation: 53
I've run across the same or similar bug on Webkit. (Firefox seems okay.) I fixed it with this workaround. After it's rendered, call:
map.panBy([1, 0]);
Upvotes: 2
Reputation: 5064
I add some issue with ordering of maps when trying to add a map into a Modal
I managed to solved that with this command : L.Util.requestAnimFrame(map.invalidateSize, map, !1, map._container);
Upvotes: 3