Esri / esri-leaflet-vector

Display ArcGIS Online vector basemaps w/ Esri Leaflet
Apache License 2.0
56 stars 57 forks source link

Vector layer/basemap not staying in place #35

Closed ecmanghi closed 6 years ago

ecmanghi commented 7 years ago

I'm trying to determine if this is something happening locally on my machine or if it's more widespread.

Using the example for switching a vector basemap (http://esri.github.io/esri-leaflet/examples/vector-basemap.html) if I pan the map and immediately switch to another basemap, the layer does not reset back to the correct position. It's stuck when I panned to or the new layer doesn't appear. The layer will only correct itself after I pan or zoom again.

My workaround right now is to use map.panBy([1,1]) after the switch to nudge the map to get the layer to appear correctly.

Before panning image

After panning image

After basemap switch image

jgravois commented 7 years ago

hi @ecmanghi, i've experienced behavior similar to what you're reporting.

i'm not sure what would be best internally to resolve the problem but i'll keep thinking about it.

jgravois commented 6 years ago

@ecmanghi i finally had a chance to sit down and sort out how to get this lib building locally again and made a few changes that seem to have improved drawing behavior.

can you test with master when you have time and confirm whether this resolves the problem you reported a few months back and reopen this issue if appropriate?

thanks!