Setting Layer Renderability
This example renders the named layer "USABarThemeLayer" and named label source "StatesIndividualValueThemeLabelSource" overriding any visibility settings in the named layer or named label source definition. This example does not render the "USACapitalsLabelSource" named label source.
POST Request
POST http://hostname:port/rest/Spatial/MappingService/maps/image.png;w=800;h=600;c=-101,42,epsg:4269;z=2000%20mi
Content-type: application/json
Authorization: <Basic or Spectrum Token>
Example
{
"layers":[
{
"type":"NamedLayer",
"name":"/Samples/NamedLayers/USABarThemeLayer",
"renderable":"true"
},
{
"type": "LabelLayer",
"labelSource": [{"type" : "NamedLabelSource","name" : "/Samples/NamedLabelSources/USACapitalsLabelSource",
"renderable":"false"}]
},
{
"type": "LabelLayer",
"labelSource": [{"type" : "NamedLabelSource","name" : "/Samples/NamedLabelSources/StatesIndividualValueThemeLabelSource",
"renderable":"true"}]
}
]
}