Conditional display of expressions not working for popups in the new map viewer

257
4
08-17-2022 08:44 AM
TimConfare2
New Contributor III

I'm creating a popup with four possible links depending on results of an expression (using Text content).  If expression19 doesn't meet the criteria then it returns "none" and then the link does not display.  If it does meet it then it returns "inline" and shows the link.  Here is the code that worked great in the classic Map Viewer:

-------- 

<span style="display:{expression/expr19}">

<br /><a href="{expression/expr17}" rel="nofollow ugc" target="_blank">{expression/expr20}</a>

<br /></span>

----------

In the new map viewer <span> does not work (If you add <span> then click out of the html source and back in, it is erased).  I was able to get <div> to work but it puts it all on the same line.  If I add </ br> after the <div> the editor automatically deletes it.  I'm not able to get a newline to work after the <div>.

It appears like adding html to popups have taken a step backwards in this new map viewer.  Very frustrating.  Any ideas on how to make a conditional line?

Thanks in advance.

4 Replies
RyanKelley_NA
New Contributor III

Did you ever figure this out?  I am having the same problem.

0 Kudos
RyanKelley_NA
New Contributor III

I should also add that <span> seems to work for things like color and font size but as soon as you add any type of display item (like display:inline or display:block) that section gets deleted.

0 Kudos
TimConfare2
New Contributor III

I never did get this working right.  I just have extra blank lines if the expression is false.  Doesn't look good but it works.

0 Kudos
RyanKelley_NA
New Contributor III

There currently is an open bug/enhancment request for this: ENH-000160093

0 Kudos