AnsweredAssumed Answered

Javascript code runs in ArcGIS Pro but not ArcMap

Question asked by njerua on Mar 25, 2019
Latest reply on Mar 26, 2019 by kenbuja

This code is in Javascript and it runs very well in ArcGIS Pro in ArcMap it doesn't run or work.

What could be the problem? I need help please.

 

function FindLabel ( [OffsetX], [OffsetY], [LabelLong], [Strength])
{
r = [OffsetY]
c = [OffsetX]
xshift = ""
yshift = ""
for (i = -5; i < c; i++) {
xshift += "<FNT name = 'ESRI Default Marker' size = '36'>" + "?" + "</FNT>"
}
for (i = 0; i < Math.abs(r); i++) {
yshift += "<FNT name = 'ESRI Default Marker' size = '36'>" + "?" + "</FNT>" + "\r"
}
label = xshift + [LabelLong]+' '+"["+[Strength]+"]"
if ( r > 0) { label += yshift }
else { label = yshift + label }
return label ;
}

Outcomes