Setting Layer Renderability

In this example, the named layer "USABarThemeLayer" and named label source "StatesIndividualValueThemeLabelSource" will render (overriding any visibility settings in the named layer or named label source definition); however, the "USACapitalsLabelSource" named label source will not be rendered.

Note: The sample named label sources in this example will be provided in the /Samples folder as part of the version 12.0 release of Spectrumâ„¢ Technology Platform. For the 11.0 SP1 version, use WebDAV to copy the samples from the 11.1 S12 patch zip or tar file to your repository.

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>

{
   "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"}]
      }
   ]
}