"id": 0,
"layerDefinition": {
"source": {
"type": "mapLayer",
"mapLayerId": 0
},
"drawingInfo": {
"renderer": {
"type": "uniqueValue",
"field1": "ParkingStatus",
"defaultSymbol": null,
"uniqueValueInfos": [
{
"value": "1OpenLow",
"label": "Open - Spaces Available",
"symbol": {
"color": [
56,
168,
0,
142
],
"outline": {
"color": [
153,
153,
153,
255
],
"width": 0.75,
"type": "esriSLS",
"style": "esriSLSSolid"
},
"type": "esriSFS",
"style": "esriSFSSolid"
}
},
{
"value": "2OpenHi",
"label": "Open - Near Capacity",
"symbol": {
"color": [
255,
222,
62,
180
],
"outline": {
"color": [
153,
153,
153,
255
],
"width": 0.75,
"type": "esriSLS",
"style": "esriSLSSolid"
},
"type": "esriSFS",
"style": "esriSFSSolid"
}
},
{
"value": "4Full",
"label": "Full",
"symbol": {
"color": [
230,
0,
0,
162
],
"outline": {
"color": [
153,
153,
153,
255
],
"width": 0.75,
"type": "esriSLS",
"style": "esriSLSSolid"
},
"type": "esriSFS",
"style": "esriSFSSolid"
}
},
{
"value": "3Closed",
"label": "Closed for Construction",
"symbol": {
"color": [
252,
146,
31,
165
],
"outline": {
"color": [
153,
153,
153,
255
],
"width": 0.75,
"type": "esriSLS",
"style": "esriSLSSolid"
},
"type": "esriSFS",
"style": "esriSFSSolid"
}
}
]
},
"labelingInfo": [
{
"labelExpression": "[Name]",
"useCodedValues": true,
"maxScale": 0,
"minScale": 0,
"where": null,
"labelPlacement": "esriServerPolygonPlacementAlwaysHorizontal",
"symbol": {
"color": [
47,
79,
79,
255
],
"type": "esriTS",
"backgroundColor": null,
"borderLineColor": null,
"haloSize": 0,
"haloColor": null,
"horizontalAlignment": "center",
"rightToLeft": false,
"angle": 0,
"xoffset": 0,
"yoffset": 0,
"text": "",
"rotated": false,
"kerning": true,
"font": {
"size": 7.5,
"style": "italic",
"decoration": "none",
"weight": "bold",
"family": "Arial Unicode MS"
}
}
}
],
"showLabels": true
}
}
- The index and mapLayerIndex correspond with the service's index (i.e. .../MapServer/0, .../MapServer/1, etc.). This is a good way to confirm you're looking at the right layer.
- Once you've identified what JSON section needs to be added (each layer has it's own section separated by commas and contained with { } brackets, copy that JSON.