Coder Social home page Coder Social logo

Support for Leaflet 1.9.0 about esri-leaflet HOT 11 CLOSED

addy avatar addy commented on June 14, 2024 2
Support for Leaflet 1.9.0

from esri-leaflet.

Comments (11)

addy avatar addy commented on June 14, 2024 4

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').

from esri-leaflet.

gavinr avatar gavinr commented on June 14, 2024 1

Thanks @jgravois for the help. That workflow actually works for me:
image

from esri-leaflet.

addy avatar addy commented on June 14, 2024 1

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.

from esri-leaflet.

addy avatar addy commented on June 14, 2024 1

@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

from esri-leaflet.

gavinr avatar gavinr commented on June 14, 2024 1

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 [email protected]

Thanks!

from esri-leaflet.

jgravois avatar jgravois commented on June 14, 2024

since leaflet is a peerDependency its up to you to install any version >= 1.0.0 that you want.

"leaflet": "^1.0.0"

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.

from esri-leaflet.

gavinr avatar gavinr commented on June 14, 2024

@addy thanks, can you please post the steps I would need to follow to see that error?

from esri-leaflet.

jgravois avatar jgravois commented on June 14, 2024

i assume you'll see what @addy mentioned as soon as you:

npm install --save-dev [email protected]
npm run build

from esri-leaflet.

gavinr avatar gavinr commented on June 14, 2024

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:
image

I'm wondering if this is the same issue as what's going on here:
Leaflet/Leaflet#8467 / Leaflet/Leaflet#8451

from esri-leaflet.

natBizitza avatar natBizitza commented on June 14, 2024

I get the same errors importing heatLayer, SemiCircleMarker, and SemiCircle.

from esri-leaflet.

addy avatar addy commented on June 14, 2024

Looks like it's working for me now, thanks!!

from esri-leaflet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.