Giter Site home page Giter Site logo

Comments (8)

slutske22 avatar slutske22 commented on June 11, 2024

I haven't had a chance to see what's new in the new patch of esri-leaflet or esri-leaflet-geocoder, or how its going to affect this wrapper. I'll take a look when I get a chance.

from react-esri-leaflet.

alessandro-lenzi avatar alessandro-lenzi commented on June 11, 2024

Thank you @slutske22

from react-esri-leaflet.

slutske22 avatar slutske22 commented on June 11, 2024

This is implemented in version 2, which is currently in a @next version. You can try it out here: https://www.npmjs.com/package/react-esri-leaflet/v/2.0.0, npm i react-esri-leaflet@next, Will publish as official version soon.

from react-esri-leaflet.

bobmoretti avatar bobmoretti commented on June 11, 2024

Sorry for the dumb question, but how do I use this option? I'm using react-esri-leaflet version 2.0.1.

Inside a MapContainer my code instantiates a BasemapLayer as follows

<BasemapLayer key={mapType} name={mapType}  />

from react-esri-leaflet.

slutske22 avatar slutske22 commented on June 11, 2024

Sorry for the dumb question, but how do I use this option? I'm using react-esri-leaflet version 2.0.1.

Inside a MapContainer my code instantiates a BasemapLayer as follows

<BasemapLayer key={mapType} name={mapType}  />

That code should work fine...is there an issue? It should just give you fancy intellisense for the fact that the underlying L.esri.basemapLayer is deprecated.

from react-esri-leaflet.

bobmoretti avatar bobmoretti commented on June 11, 2024

Sorry, I did a poor job of explaining my question.

How do I enable the ignoreDeprecationWarning option that is in esri-leaflet? Is it a prop for BasemapLayer? If so, I can't get it to work.

from react-esri-leaflet.

slutske22 avatar slutske22 commented on June 11, 2024

Sorry, I did a poor job of explaining my question.

How do I enable the ignoreDeprecationWarning option that is in esri-leaflet? Is it a prop for BasemapLayer? If so, I can't get it to work.

Passing it as a prop should work:

        <BasemapLayer
          ref={basemapLayerRef}
          name="DarkGray"
          // @ts-expect-error
          ignoreDeprecationWarning
        />

When I pass this prop in, the deprecation warning stops showing up in the console. If you are using typescript, you'll see that ignoreDeprecationWarning is not officially a prop. This is because @types/esri-leaflet (currently v 2.1.9) has not added it as an official prop, at least yet:

Screen Shot 2022-06-13 at 5 00 37 AM

This just means that @types/esri-leaflet is not up to date with esri-leaflet. Passing this as a prop seems to work fine for me. What issue are you having?

from react-esri-leaflet.

bobmoretti avatar bobmoretti commented on June 11, 2024

Sorry, that was the piece I was missing.

This is my lack of familiarity with React... I had the mistaken impression that props were always key/value pairs. I tried ignoreDeprecationWarning={true} and many other variations thereof to no avail.

Thanks so much for your help.

from react-esri-leaflet.

Related Issues (16)

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.