layer


URI

  1. <layers_uri>/{layerName}[.<format>]

  2. <layers_uri>/{layerIndex}[.<format>]

Supported methods

GET, HEAD

Parent resource

layers

Introduction

 

The layer resource represents a 3D layer identified by {layerName} or {layerIndex} in a URI. This resource can be used to retrieve the representation of a 3D layer in a 3D scene. The representation includes description information about the 3D layer, such as the name of the 3D layer, the type, the path of the corresponding 3D dataset, and the cache level of the data in use (only when the data in use is cached 3D data).

Supported methods

Supported output formats: RJSONJSON, JSONP, HTML, XML.

GIS Services Resource Hierarchy

root 3D scenes scene layers layer

HTTP request methods

Below is an example of performing an HTTP request on a URI with rjson as the output format

http://supermapiserver:8090/iserver/services/3D-sample/rest/realspace/scenes/scene/layers/bridge_beijing.rjson

GET Request

Gets the representation of the 3D layer (bridge_beijing in the above example) in the current 3D scene.

Request parameters

Field Type Definition
_cache boolean [Optional parameters]
Whether to use cache, the default is True. False means close all the cache.

Response structure

Performing a GET request on the layer resource returns the representation of the 3D layer with the following structure:

Name Type Description
alwaysRender boolean Whether to always render the layer.
bounds Rectangle2D The bounds of the layer.
cachePassword String The password for the 3D layer.
caption String The caption of the layer.
It is the same with the layer name by default. But the user can modify it according to their needs.
dataConfigPath String The path of the data used in the 3D layer.
dataName String The name of the 3D layer.
description String The descriptive information about the layer.
editable boolean Whether the layer is editable.
hasLocalCache boolean Marks whether the 3D cached tiles aref saved locally.
layer3DType Layer3DType The layer type.
level int The cache level.
maxVisibleAltitude double The maximum visible altitude.
minVisibleAltitude double The minimum visible altitude.
name String The name of the layer.
This serves as the unique identification of the layer in a map. Case sensitive.
oldCache boolean Whether to use old cache.
queryable boolean Whether the objects in the layer can be queried.
style String The rendering style of the layer.
subLayers String Information on the sub-layers.
visible boolean Whether the layer is visible.
visibleDistance double The visible distance from an object in the 3D layer.

Example usage

Below is the returned representation in rjson format after a GET request is performed on the example 3D layer bridge_beijing:

{

    "alwaysRender": true,

    "bounds": null,

    "cachePassword": null,

    "caption": "Tree@CBD",

    "dataConfigPath": "C:/SuperMap/SuperMapiServer/samples/data/Realspace/CBD/Tree@CBD/Tree@CBD.scp",

    "dataName": "Tree@CBD",

    "description": "",

    "editable": false,

    "hasLocalCache": true,

    "isWebDatasource": false,

    "layer3DType": "OSGBLayer",

    "level": -1,

    "maxVisibleAltitude": 0,

    "minVisibleAltitude": 0,

    "name": "Tree@CBD",

    "oldCache": false,

    "queryable": false,

    "subLayers": {},

    "type": null,

    "useTwoDimenCache": false,

    "visible": true,

    "visibleDistance": 0

}

"layer3DType" above indicates that the 3D layer Tree@CBD  is of OSGBLayer type, meaning that the corresponding 3D data is KML data for which the cache level is not applicable. Hence the "level" field is -1, indicating that it is not meaningful in this case.

HEAD Request

Asks for the response identical to the one that would correspond to a GET request, but without the response body. This is useful for retrieving meta-information written in response headers, without having to transport the entire content. The meta-information includes the media-type, content-encoding, transfer-encoding, content-length, etc.

HEAD request can be used to check if the layer resource exists, or if the resource can be accessed by clients. It can also determine if the layer resource supports an output format <format> if performed on a URI with .<format> included.

See