List Named Layers

Description

Returns a list of named layers that are available within the repository.

HTTP GET URL Format

The following format is used for HTTP GET requests:

HTTP GET /layers.rep;[l=locale]

Parameters

For information on the parameter types listed below, see Request URL Data Types.

Parameter Type Required Description
rep String yes The representation to be returned. Supported representation is JSON.
l=locale String no The locale in which to return the layer information. Uses the Java Locale format consisting of an ISO two letter language code and an ISO two letter country code. If not specified then assumes server default.

Returns

Returns a list of layers in the specified format.

Example

This example returns a list of available layers in the repository, as an array of String values, in the US English locale.

http://www.pbbi.com/rest/Spatial/MappingService/layers.json;l=en-US

The following example shows the format of the JSON object returned in the response:

{
    "listNamedLayersResponse":
        {“namedLayersList”:[
        "/Samples/NamedLayers/WorldFeatureLayer",
        "/Samples/NamedLayers/WorldLabelLayers",
        "/Samples/NamedLayers/OceanFeatureLayer"
        ]
    }
}