I have following StringBuilder:
{
"allowOverlapOfLabel": "allow" ,
"allowOverlapOfFeatureBoundary": "allow" ,
"allowOverlapOfFeatureInterior": "allow" ,
"labelExpressionInfo": {
"expression": "return $feature.Name;"},
"labelPlacement": "esriServerPointLabelPlacementCenterRight",
"multiPart": "labelPerFeature",
"minScale": "return $feature.MinScale;",
"maxScale": 0,
"symbol": {
"color": [255,255,255,255],
"haloColor": [51,51,51,255],
"haloSize": 1.5,
"font": {"size": 10, "weight": "bold"},
"type": "esriTS"}
}
My problem is that when doing LabelDefinition.FromJson method with this string, I get an invalid character exception on minScale value.
MinScale attribute is a string defined in the attributes of each graphic and minScale key on the Json needs an integer. How can this conversion be done or how can I pass minScale value as a $feature value?
Thanks