Closed addy closed 2 years ago
since leaflet is a peerDependency its up to you to install any version >= 1.0.0 that you want.
https://github.com/Esri/esri-leaflet/blob/7ee4b61140e160f3b27bcc604be5b79829f2fb9a/package.json#L77
if you're seeing a specific problem here because of a breaking change in leaflet, it'd helpful if you could describe it in detail.
Sure, yeah here's the specific issue that I'm seeing:
Failed to compile.
./node_modules/esri-leaflet/src/Layers/FeatureLayer/FeatureGrid.js
Attempted import error: 'toLatLngBounds' is not exported from 'leaflet' (imported as 'latLngBounds').
@addy thanks, can you please post the steps I would need to follow to see that error?
i assume you'll see what @addy mentioned as soon as you:
npm install --save-dev leaflet@1.9.0
npm run build
Thanks @jgravois for the help. That workflow actually works for me:
I'll work on getting a StackBlitz, or similar, up shortly to reproduce the error I'm seeing locally. I think it's likely an issue arising from a mix of dependencies in an external project using both Leaflet and esri-leaflet.
@jgravois @gavinr Alright I've recreated the issue here: https://stackblitz.com/edit/vitejs-vite-k5qazv
Let me know if you have issues accessing that. It should build on start, but if not, you can just run npm run build
Thanks for the reproduction case. I do see it there, and have also tested on this project: https://github.com/gavinr/esri-leaflet-react-demo/tree/leaflet-1.9 and get the same error:
I'm wondering if this is the same issue as what's going on here: https://github.com/Leaflet/Leaflet/issues/8467 / https://github.com/Leaflet/Leaflet/issues/8451
I get the same errors importing heatLayer, SemiCircleMarker, and SemiCircle.
Leaflet released v1.9.2 a few hours ago: https://github.com/Leaflet/Leaflet/releases/tag/v1.9.2
And I have tested that using 1.9.2 (instead of 1.9.0 or 1.9.1) fixes this issue for me.
@addy please test after running:
npm install leaflet@1.9.2
Thanks!
Looks like it's working for me now, thanks!!
Describe the problem
Looks like
esri-leaflet
is currently on the 1.6.0 release of Leaflet. There have been a few changes, improvements and bug fixes since then. Does Esri have a usual timeline for incorporating new versions of Leaflet?Describe the proposed solution
Libraries built on top of Leaflet that can be used in conjunction with Esri's plugin use more advanced versions of Leaflet. It would be great if this library supported the latest versions under the hood and allowed consumers to be able to upgrade their Leaflet dependencies.
Alternatives considered
No response
Additional Information
No response