Code Monkey home page Code Monkey logo

Comments (3)

jgravois avatar jgravois commented on June 2, 2024

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.

patrickarlt avatar patrickarlt commented on June 2, 2024

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:

  1. Get the item metadata
  2. This will have the service URL
  3. We can check the /data end point on the item to see if a renderer is stored there
  4. 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.

jwasilgeo avatar jwasilgeo commented on June 2, 2024

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)

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.