Coder Social home page Coder Social logo

Comments (8)

pmacMaps avatar pmacMaps commented on June 15, 2024 2

Thanks for providing the demos @gavinr. I noticed that neither uses the esri-leaflet-renderers package. Having a tutorial/documentation page on how to use this plugin with bundlers would be very helpful.

from esri-leaflet-renderers.

gavinr avatar gavinr commented on June 15, 2024 2

This is fixed in v3.0.0.

We will also add more documentation for ES modules in the future.

Thanks!

from esri-leaflet-renderers.

pmacMaps avatar pmacMaps commented on June 15, 2024 1

The issue I have (and I believe others have) is it isn't clear how to import Esri Leaflet Renderers in a project that uses ES modules and a bundler, and get the server-rendered symbology applied. When you add the various Esri Leaflet libraries as separate script tags, it works. But many of use want to use bundlers.

from esri-leaflet-renderers.

gavinr avatar gavinr commented on June 15, 2024

Hi, could you please post a replication case (using JSBin or some similar process) to show the issue?

from esri-leaflet-renderers.

lielvan avatar lielvan commented on June 15, 2024

Chiming in since I also ran into this issue:
Expected:
run npm install esri-leaflet esri-leaflet-renderers, expecting esri-leaflet ^3.x.

Actual:

"dependencies": {
    "esri-leaflet": "^2.5.3",
    "esri-leaflet-renderers": "^2.1.3",
    "leaflet": "^1.8.0"
  }

running npm outdated:

Package       Current  Wanted  Latest  Location                   Depended by
esri-leaflet    2.5.3   2.5.3   3.0.8  node_modules/esri-leaflet  esri-test

with npm install esri-leaflet@latest:

npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: [email protected]
npm WARN Found: [email protected]
npm WARN node_modules/esri-leaflet
npm WARN   peer esri-leaflet@"*" from [email protected]
npm WARN   node_modules/esri-leaflet-cluster
npm WARN     optional esri-leaflet-cluster@"^3.0.0" from [email protected]
npm WARN     node_modules/esri-leaflet-renderers
npm WARN   2 more (esri-leaflet-renderers, the root project)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer esri-leaflet@"2.x" from [email protected]
npm WARN node_modules/esri-leaflet-renderers
npm WARN   esri-leaflet-renderers@"^2.1.3" from the root project

from esri-leaflet-renderers.

fgoulet avatar fgoulet commented on June 15, 2024

I don't really have code to share. I have only added the esri-leaflet-renderers package to my app package.json so far.

"leaflet": "^1.8.0",
"esri-leaflet": "^3.0.8",
"esri-leaflet-renderers": "^2.1.3",

I guest I must call a function to initialize somehow this extension maybe ?

from esri-leaflet-renderers.

fgoulet avatar fgoulet commented on June 15, 2024

@pmacMaps Yes, that's exactly my case.

from esri-leaflet-renderers.

gavinr avatar gavinr commented on June 15, 2024

Thank you all for the input. Seems like the original issue is summarized (by the past two comments) around "we need example code to show how to use ES modules with bundlers". I have two examples here:

But I think we need more than just those samples - probably a tutorial or documentation page on it.

Second issue

Specifically to esri-leaflet-renderers, there's an issue with the dependencies that @lielvan is pointing out. The solution is to make a change in this repo similar to what we did in esri-leaflet-geocoder: Esri/esri-leaflet-geocoder#275 PRs are welcome!

from esri-leaflet-renderers.

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.