ArcGIS Online Popups with Multiple Images

266
5
06-21-2021 09:38 PM
Labels (3)
DeanHowell1
Occasional Contributor III

I have a polygon layer that I want to add popups to. Some of the polygons have two records and images associated and some have three. The ones with three are working fine but I want only the two images to be displayed when there are only two but I am getting a place marker being displayed.

I have defined a custom expression to test if the attribute is null but not sure how to stop the place marker being displayed and only the two images for that polygon.. 

DeanHowell1_0-1624336505804.png

 

Tags (2)
5 Replies
Waffle_House
Occasional Contributor

What is the custom expression you have now? Could you include some logic so that you don't generate the third placeholder if not needed?

DeanHowell1
Occasional Contributor III

The custom expression I am using just tests for a blank attribute

Text(IIf(IsEmpty($feature.Photo3), "", $feature.Photo3));

0 Kudos
ManishPatel
Esri Contributor

Hi @DeanHowell1 ,

 

I have had a similar requirement in the past, what I did to overcome was to create an empty photo with white background and host this on a web server. Then used Arcade expression to identify if there is not value then set the URL to the photo that is available or if no photo is supplied then use URL to the white background photo. 

 

Hope this helps.

 

ManishPatel_0-1624339718090.png

 

Cheers,
Manish
DeanHowell1
Occasional Contributor III

Thanks @ManishPatel , yes that seems like a very easy approach but would be great to know how the custom expressions can be utilised.

0 Kudos
ManishPatel
Esri Contributor

That is what I have done, the arcade expression is used in the Attribute expression and then make use of the attribute expression in Custom attribute display.

 

Cheers,
Manish
0 Kudos