Comments (3)
the short answer is no.
i've always been aware that raw RESTful services have symbology defined (either with or without smart mapping) and that it was possible to override renderers for a layer and save the modification within Webmap JSON, but the third option you describe (new item in AGOL for the layer itself with custom symbology defined for someone else's service) is something i heard about for the first time the other day.
i have to assume that the ArcGIS Online/Portal REST API spec allows you to request JSON defining the item and that its something we could parse in this plugin, but help and samples from you would be incredibly helpful in order to implement the enhancement.
from esri-leaflet-renderers.
i have to assume that the ArcGIS Online/Portal REST API spec allows you to request JSON defining the item
There is actually no way (given a service url) to figure out the item URL. So the scenario that @bviswanathan wants (pass an service URL, figure out item ID, use item renderer) actually can't happen.
However this COULD be wrapped up in another plugin to expose an API like this:
L.esri.FeatureLayer({
id: 'ARCGIS Online Item ID'
}).addTo(map);
Then we know the item id so we can:
- Get the item metadata
- This will have the service URL
- We can check the
/data
end point on the item to see if a renderer is stored there - Use the appropriate renderer
Since this behavior goes beyond the scope of both Esri Leaflet (rendering the services) and Esri Leaflet Renderers (converting ArcGIS renderers into style functions) it should probably be a separate function.
from esri-leaflet-renderers.
Closing. Please refer to the linked (and closed) issues Esri/esri-leaflet#570 and ynunokawa/L.esri.WebMap#32.
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
- Support for esri leaflet 3 HOT 8
- 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.