I have a web map where my assets are labeled with the FacilityID. I want to have a different label (a custom text) for a specific asset. The code below works fine:
var label = $feature.FACILITYID;
iif(label=='2793','STAY OUT OF DRIVEWAY',label);
However, if I want the text to display differently (bold or in red) I can't get the formatting to work. Here is one example I tried:
var label = $feature.FACILITYID;
var redlabel= "<CLR red='255'>" + 'STAY OUT OF DRIVEWAY'+ "</CLR>";
iif(label=='2793',redlabel,label);
This returns:
<CLR red='255'>STAY OUT OF DRIVEWAY</CLR> |
I've tried all sorts of combinations for single quotes and double quotes, nothing seems to work. Any suggestions?