Descripción de capa con nombre asignado

Descripción

Returns a description of a named layer, including tables, label sources (named or inline), attributes, themes, and visibility constraints. The layer portion of the response from this describe can be incorporated in a map definition, which can then be used in a REST Render Map or Render Map Legend request.

Formato de dirección URL de HTTP GET

El siguiente formato se utiliza para solicitudes HTTP GET:


GET http://<server>:<port>/rest/Spatial/MappingService/layers/<named layer>.{rep}

Parámetros

Consulte Tipos de datos de URL de solicitud, para obtener información sobre los tipos de parámetros que se indican a continuación.

Parámetro Tipo Requerido Descripción
rep Cadena La representación que se va a arrojar. La representación compatible es .

Devolución

Arroja los metadatos de una capa con nombre asignado en el repositorio. Returns a full description of the label source when describing a label layer with an inline label source; returns a reference to the named label source when describing a label layer with a named label source.

Ejemplo

Este ejemplo arroja los metadatos para la capa LayerWithTableRangeTheme ubicada en el directorio/Samples/NamedLayers del repositorio.

http://<server>:<port>/rest/Spatial/MappingService/layers/Samples/NamedLayers/LayerWithTableRangeTheme.json
This example shows the JSON object returned in the response.
Nota: The sample named label source 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.1 version, use WebDAV to copy the samples from the 11.1 patch zip or tar file to your repository.
{
    "layerDescription": {
        "name": "/Samples/NamedLayers/LayerWithTableRangeTheme",
        "layer": {
            "type": "FeatureLayer",
            "description": "USA States With Range Theme",
            "renderable": true,
            "table": {
                "type": "NamedTable",
                "name": "/Samples/NamedTables/USA"
            },
            "themeList": {
                "theme": [
                    {
                        "type": "RangeTheme",
                        "startStyle": {
                            "type": "MapBasicAreaStyle",
                            "MapBasicPen": {
                                "width": 2,
                                "pattern": 2,
                                "color": "32768"
                            },
                            "MapBasicBrush": {
                                "pattern": 2,
                                "foregroundColor": "32768",
                                "backgroundColor": "16777215"
                            }
                        },
                        "endStyle": {
                            "type": "MapBasicAreaStyle",
                            "MapBasicPen": {
                                "width": 2,
                                "pattern": 2,
                                "color": "16765088"
                            },
                            "MapBasicBrush": {
                                "pattern": 2,
                                "foregroundColor": "16765088",
                                "backgroundColor": "16777215"
                            }
                        },
                        "allOthers": {
                            "type": "NamedStyle",
                            "name": "/Samples/NamedStyles/CompositeStyleRangeThemeAllOtherStyle"
                        },
                        "rangeThemeProperties": {
                            "rangeType": "EQUAL_COUNT",
                            "expression": "Pop_2000",
                            "numRanges": 5,
                            "roundBy": 0,
                            "spreadBy": "COLOR",
                            "spreadBySizeMethod": "SQUARE_ROOT",
                            "noEmptyRanges": true,
                            "applyStylePart": "ALL"
                        }
                    }
                ]
            },
            "namedLabelSourceRef": "/Samples/NamedLabelSources/StateNameLabelSource"
        }
    }
}