Web map attribute expression token stripped from popup html attributes in webviewer
Date: 2023-08-23
VertiGIS Studio Web Version 5.25.0
Portal Map Viewer (the modern version, not classic)
It is currently possible to use arcade expression tokens in html attributes of a web map popup?
This works in the ESRI map viewer. The expression is returning the string "block" or "none" based on a feature field value. When this is added to the popup map viewer does hide or show the content based on that expression.
<div style="display:{expression/expr0};">
However, when I add the web map to a web viewer and bring up the popup, web viewer has either stripped the token out of the html attribute or just ignored it. The result when using web viewer looks like this:
<div style="">
Is there some special escape pattern that would prevent this from happening? We would rather control the visibility of content in the popup with an arcade expression rather than having the arcade expression returning content.
If the expression token is moved to the text part of an html node the token works as expected:
<div>{expression/expr0}</div>
-
I was having some difficulty trying to get this working for me a few versions back, trying to color the background of some icons based on an attribute. I never got it working.
Worked around it by porting my Attribute Expressions into some Arcade Content elements in the Web Map popups, which sounds like "having the arcade expression returning content" to me. It wasn't my first choice but it works.
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
1 Kommentar