I am using the ArcGIS Server REST API to display MapServer data that supports dynamic layers. I know how to restyle line and polygon geometry when my code calls for the tiles.
Question: Is it also possible to restyle labels?
The following link displays one tile with label data:
And here is my call for the same tile where I am trying to make the text magenta:
However my call results in the following nastygram:
{"error":{"code":400,"message":"Invalid dynamic layer definition for labeling classes.","details":[]}}
Can anyone shed light and show where I have gone astray in the syntax?
Joseph Elfelt
https://mappingsupport.com
1) Validate json through this tool:
https://jsonformatter.curiousconcept.com/
2) Make sure the request you are making respects the scale. In your request, I modified the bounding box to be 1/4 the size of what it was
3) Use the labelingInfo that's defined on the mapLayer as a starting point, then make your tweaks as needed
https://services.nationalmap.gov/arcgis/rest/services/govunits/MapServer/15?f=pjson
Final result
Thanks Alex.
I will give your suggestions a try.