Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Layers do not align with basemap (regression) #233

Open
gavinr-maps opened this issue Jan 24, 2025 · 1 comment
Open

Layers do not align with basemap (regression) #233

gavinr-maps opened this issue Jan 24, 2025 · 1 comment

Comments

@gavinr-maps
Copy link
Contributor

gavinr-maps commented Jan 24, 2025

Describe the bug

This is a regression (same issue) on #130.

Starting at Esri Leaflet Vector v4.2.4, if you zoom out then pan up (or down), the layers will be misaligned with the basemap.

Reproduction

  1. Open https://jsbin.com/bilemud/3/edit which uses esri-leaflet-vector v4.2.3
  2. Pan the map down (off the screen)
    • Expected: Points and basemap pan off the screen, and the basemap is never mis-aligned with the points
    • Actual: Points and basemap pan off the screen, and the basemap is never mis-aligned with the points ✅
  3. Open https://jsbin.com/jexevoy/4/edit which uses esri-leaflet-vector v4.2.4
  4. Pan the map down (off the screen)
    • Expected: Points and basemap pan off the screen, and the basemap is never mis-aligned with the points
    • Actual: The points pan off the screen, but the basemap stays in view, so the basemap is mis-aligned with the points. ❌

Image

Additional Reproduction

Also note, this issue can be seen in the current Esri Leaflet documentation, for example here: https://developers.arcgis.com/esri-leaflet/samples/simple-feature-layer/

brave_uO96z5ou0p.mp4

System Info

- Leaflet version: 1.9.4
- Esri Leaflet version: 3.1.0
- Esri Leaflet Vector version: 4.2.4

Additional Information

In Esri Leaflet Vector v4.2.4 was when we upgraded to Maplibre GL JS v4, so I think this issue is caused by a change in Maplibre GL JS v4.

@gavinr-maps gavinr-maps changed the title Leaflet layers do not align with basemap (regression) Layers do not align with basemap (regression) Jan 24, 2025
@gavinr-maps
Copy link
Contributor Author

In Esri Leaflet Vector v4.2.4 was when we upgraded to Maplibre GL JS v4, so I think this issue is caused by a change in Maplibre GL JS v4.

Investigating Maplibre v4, it seems like the behavior of the map when setting these settings:

gl.transform.latRange = null;
gl.transform.maxValidLatitude = Infinity;

...has changed in Maplibre v4.1.1.

Replication Case - Maplibre

  1. Open https://codepen.io/gavinr/pen/dPbQRed?editors=1010
  2. Pan the map down out of the view port
    • Expected: the map can be panned completely out of the viewport
    • Actual: the map can be panned completely out of the viewport ✅
  3. Open https://codepen.io/gavinr/pen/WbeYOmN?editors=1010 (same code as above, but using maplibre v4.1.1)
  4. Pan the map down out of the view port
    • Expected: the map can be panned completely out of the viewport
    • Actual: the map can only be panned halfway out of the viewport ❌
      Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant