Arcade Scripting | Center an Image Container

322
1
Jump to solution
10-10-2020 07:31 PM
EricGurney
New Contributor II
Hi Everyone,
The image container to the Living Atlas Layer, https://bit.ly/3dfw9ie, is defined to display various images that correlate to querying the map layer.
Q: What Arcade string is required to center the contained - $feature.force in an ArcGIS Popup? 
// Write a script to return a value to show in the pop-up.
var uriBase = "https://upload.wikimedia.org/wikipedia/commons/"
var lookup = ["f/fc/Beaufort_scale_0.jpg", "1/18/Beaufort_scale_1.jpg", "d/d1/Beaufort_scale_2.jpg", "5/51/Beaufort_scale_3.jpg", "0/0f/Beaufort_scale_4.jpg", "2/2b/Beaufort_scale_5.jpg", "e/e9/Beaufort_scale_6.jpg", "5/5c/Beaufort_scale_7.jpg", "0/00/Beaufort_scale_8.jpg", "d/d5/Beaufort_scale_9.jpg", "8/86/Beaufort_scale_10.jpg", "1/16/Beaufort_scale_11.jpg", "c/ce/Beaufort_scale_12.jpg"]

var force = iif ($feature.force > 12, 12, $feature.force)
return uriBase + lookup[force]

Grateful for your assistance. My thanks to all in advance.

Respectfully,

Chuck Gurney

0 Kudos
1 Solution

Accepted Solutions
XanderBakker
Esri Esteemed Contributor

Hi eric.gurney ,

Not sure if I understand your question completely, since the link you provided points to content that is not public. 

So the Arcade expression uses the wind force to convert it to a URL that points to an image on wikimedia. To center something in the pop-up you need to use the customize HTML pop-up options to format it any way you need. This is not part of the Arcade expression. 

View solution in original post

0 Kudos
1 Reply
XanderBakker
Esri Esteemed Contributor

Hi eric.gurney ,

Not sure if I understand your question completely, since the link you provided points to content that is not public. 

So the Arcade expression uses the wind force to convert it to a URL that points to an image on wikimedia. To center something in the pop-up you need to use the customize HTML pop-up options to format it any way you need. This is not part of the Arcade expression. 

0 Kudos