Comments (8)
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.
This is fixed in v3.0.0.
We will also add more documentation for ES modules in the future.
Thanks!
from esri-leaflet-renderers.
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.
Hi, could you please post a replication case (using JSBin or some similar process) to show the issue?
from esri-leaflet-renderers.
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.
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.
@pmacMaps Yes, that's exactly my case.
from esri-leaflet-renderers.
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:
- https://github.com/gavinr/esri-leaflet-react-demo
- https://github.com/gavinr/esri-leaflet-svelte-demo
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)
- About the main file HOT 3
- add support for text symbols HOT 6
- setWhere callback is not called HOT 3
- featureLayer throws 'this.options.userDefinedStyle is not a function' intermittently HOT 7
- Unable to use plugin via AMD HOT 7
- Unable to build under node v7.7.4 HOT 1
- picture marker symbols in custom panes don't draw in drupal (and other CMSs) HOT 19
- Next release? HOT 3
- service symbology not honored when field names are lower-case HOT 7
- Default Marker show up after clustering with esri-leaflet-cluster HOT 1
- Support valueExpression property of renderer. HOT 2
- Make esri-leaflet et al peerDependencies HOT 4
- Cluster HOT 5
- Uncaught TypeError: Cannot read property 'options' of undefined HOT 1
- initHooks are not setted using import style HOT 3
- TypeError: Cannot read properties of undefined (reading 'addInitHook') HOT 10
- Hi When deploying a docker the package gives this error and does not render a map HOT 2
- Rendering/Redrawing layers created from ArcGIS point features fails due to Uncaught TypeError HOT 3
- Is it possible to use the plug-in to generate an image from symbol JSON for use outside of map
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esri-leaflet-renderers.