AnsweredAssumed Answered

ArcGIS Online Label placement using Arcade language

Question asked by jms1222 on Mar 1, 2017
Latest reply on Apr 25, 2017 by stonejd

Is there any syntax in the new Arcade language that can but used with labels in AGO that will tell certain features to label to the left, certain features to label to the right, etc?  The problem I'm having is I have several facilities that are congregated in a particular area pretty tightly, and it would help to place some of the labels in different positions around their corresponding feature.


Up until now the only way I've been able to get around this is to create duplicate layers, and label each one "Facilities - Left Labels", "Facilities - Right Labels", etc.  But I'd rather not do this if I could write the code a certain way within just one feature layer.  Here's the code I've got so far that only shows certain labels for features in a layer (thanks to Kelly Gerrow @ ESRI):


if ($feature.Facility_short == “Green River Plant”) {return “Green River Plant”}
else if ($feature.Facility_short == “Red Creek Mine”) {return “Red Creek Mine” }
else if ($feature.Facility_short == “Blue Mountain Refinery”) {return “Blue Mountain Refinery” }
else if ($feature.Facility_short == “Yellow Enterprises”{return “Yellow Enterprises” }


Thank you all for any help you can provide!