Esri / esri-leaflet-vector

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

Switching basemaps can sometimes cause tiles to not render #151

Closed arschmitz closed 1 year ago

arschmitz commented 2 years ago

Describe the bug

When using multiple basemap layers controlled by the standard leaflet layer control some times when switching layers the new layer will not render.

Reproduction

Logs

No response

System Info

System:
    OS: macOS 11.2.3
    CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
    Memory: 469.50 MB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 16.15.0 - ~/.nvm/versions/node/v16.15.0/bin/node
    npm: 8.5.5 - ~/.nvm/versions/node/v16.15.0/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Browsers:
    Chrome: 105.0.5195.102
    Firefox: 104.0.2
    Safari: 14.0.3
  npmPackages:
    esri-leaflet: ^3.0.8 => 3.0.8
    esri-leaflet-vector: ^4.0.0 => 4.0.0
    leaflet: ~1.8.0 => 1.8.0
    leaflet.markercluster: ^1.5.3 => 1.5.3

Additional Information

No response

patrickarlt commented 2 years ago

@arschmitz can you post a basic reproduction of this issue? It would help when debugging.

joysinnett commented 1 year ago

I am having this issue also. Tiles frequently do not render when I switch between the hillshade and non-hillshade version of basemaps. There is an additional problem as well. When a "L.esri.Vector.vectorBasemapLayer" is used with Leaflet's standard layers controls (the control that allows users to switch between multiple basemaps), the map sometimes gets drawn in the wrong position immediately after the basemap is switched. It self-corrects as soon as the user pans the map.

https://www.bandersgeo.ca/vector-tile-test/esri-vector-basemap-layer.html

It's even more apparent when there are marker icons on the map. Those icons appear to be out-of-position relative to the basemap, but it's actually the basemap that's out of position relative to the markers. This problem doesn't seem to exist for other types of layers (such as the old raster basemap). The new vector basemap seems to be working fine when we don't use it with the standard layers control.