esri-leaflet icon indicating copy to clipboard operation
esri-leaflet copied to clipboard

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

Open pmacMaps opened this issue 4 years ago • 5 comments

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.

  • Create an esri-leaflet-arcade plugin that allows you to write Arcade Expressions in esri-leaflet. This is probably not realistic, but I wanted to include it anyway
  • Create a section on the documentation site or repo wiki that provides reference to JavaScript functions that can be used in esri-leaflet that are equivalent to Arcade Expressions.
  • Other great ideas this community comes up with

pmacMaps avatar Apr 16 '20 11:04 pmacMaps

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

gavinr avatar Apr 16 '20 15:04 gavinr

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.

jgravois avatar Apr 16 '20 15:04 jgravois

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.

pmacMaps avatar Apr 16 '20 19:04 pmacMaps

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.

jgravois avatar Apr 16 '20 19:04 jgravois

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?

psmyth2 avatar Apr 17 '20 13:04 psmyth2