Javascript code runs in ArcGIS Pro but not ArcMap

151
1
03-25-2019 11:42 PM
alfredmbungu
New Contributor

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 ;
}

0 Kudos
1 Reply
KenBuja
MVP Honored Contributor

Are you selecting the JScript parser when using ArcMap's labeling engine?