Esri / esri-leaflet

A lightweight set of tools for working with ArcGIS services in Leaflet. :rocket:
https://developers.arcgis.com/esri-leaflet/
Apache License 2.0
1.6k stars 798 forks source link

Should We Create an Arcade Expression Functions Plugin or Documentation of Equivalent Functions? #1195

Open pmacMaps opened 4 years ago

pmacMaps commented 4 years ago

Although I was initially skeptical, I have fallen in love with Arcade Expressions. I was wondering if there was desire and/or support to connect Arcade Expressions into the Esri-Leaflet ecosystem? I know I have written a function that is the equivalent of IsEmpty for my Leaflet apps. Below are some initial thoughts of what this could potentially look like. I would love for this community to chime in.

gavinr commented 4 years ago

Related discussion: https://github.com/ynunokawa/L.esri.WebMap/issues/74

jgravois commented 4 years ago

i said back then that Arcade itself would need to be open sourced first, but there's no reason why folks couldn't build up a library one function at a time to parse 'valueExpression's using JavaScript in Leaflet.

is that that the position you currently find yourself in? wishing Esri Leaflet could draw an L.esri.featureLayer with symbology published in the service using a 'valueExpression'?

if so, this is something that could live in a brand new plugin. i also think it would make sense to put it in esri-leaflet-renderers so that downstream users wouldn't have to parse anything.

if that's too ambitious, i think creeping into the water by writing additional Esri Leaflet samples that parse/translate Arcade would be a cool and helpful thing.

pmacMaps commented 4 years ago

In web maps, I've only used Arcade for pop-up content. So that's the angle I'm coming from. But I think in whatever ways we could support Arcade functionality would be ideal.

jgravois commented 4 years ago

https://github.com/ynunokawa/L.esri.WebMap definitely already supports Popups, so you could fork it and look for an opportunity to add support for something simple from Arcade.

Another option would be to keep it simple and tease out what it might look like to parse a canned Arcade expression with a plain old service in a new demo.

psmyth2 commented 4 years ago

Thanks for great work you all do. Currently finding myself in position where I'd like to utilize a L.esri.featureLayer with symbology published in the service using 'valueExpression' written in Arcade. Have found the valueExpression is often only option for setting up more advanced attribute-based transparency/symbology. Would this potential enhancement apply to L.esri.dynamicMapLayer usage as well?