Hello! I am trying to create a popup that displays an image from the URL in the Picture field of my feature layer. However, some features do not have a picture URL and are null and in those cases I would like it to display nothing, instead of the broken image icon or the outline of where the image should be.
I have been messing around with different Arcade expressions and HTML tags but cannot seem to figure it out.
Is there any way to do this?
ChristinaHoddinott1_0-1678888809803.png
You should be able to do this with an Arcade popup element.
var photo_viz = Iif(IsEmpty($feature['photo_url']), 'none', '')
return {
type : 'text',
text : `<span style="display:${photo_viz}>Here's a photo!<img src="${feature['photo_url']}">`
}