layers


URI

<scene_uri>/layers[.<format>]

Supported methods

GET, HEAD

Parent resource

scene

Child resources

layer

Introduction

The layers resource represents a set of 3D layers in a 3D scene. It can be used to retrieve a list of 3D layers in the current 3D scene.

Supported methods

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

GIS Services Resource Hierarchy

root resource 3D resource scenes resource scene resource layers resource

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.rjson

GET Request

Gets a list of 3D layers 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 layers resource returns a response describing a set of 3D layers. The description of each individual layer has 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 an example layers resource (a set of 3D layers in a 3D scene):

[

    {

        "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

    },

    {

        "alwaysRender": true,

        "bounds": null,

        "cachePassword": null,

        "caption": "Lake@CBD",

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

        "dataName": "Lake@CBD",

        "description": "",

        "editable": false,

        "hasLocalCache": true,

        "isWebDatasource": false,

        "layer3DType": "OSGBLayer",

        "level": -1,

        "maxVisibleAltitude": 0,

        "minVisibleAltitude": 0,

        "name": "Lake@CBD",

        "oldCache": false,

        "queryable": false,

        "subLayers": {},

        "type": null,

        "useTwoDimenCache": false,

        "visible": true,

        "visibleDistance": 0

    },

    {

        "alwaysRender": true,

        "bounds": null,

        "cachePassword": null,

        "caption": "Ground_2@CBD",

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

        "dataName": "Ground_2@CBD",

        "description": "",

        "editable": false,

        "hasLocalCache": true,

        "isWebDatasource": false,

        "layer3DType": "OSGBLayer",

        "level": -1,

        "maxVisibleAltitude": 0,

        "minVisibleAltitude": 0,

        "name": "Ground_2@CBD",

        "oldCache": false,

        "queryable": false,

        "subLayers": {},

        "type": null,

        "useTwoDimenCache": false,

        "visible": true,

        "visibleDistance": 0

    },

    {

        "alwaysRender": true,

        "bounds": null,

        "cachePassword": null,

        "caption": "Ground_1@CBD",

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

        "dataName": "Ground_1@CBD",

        "description": "",

        "editable": false,

        "hasLocalCache": true,

        "isWebDatasource": false,

        "layer3DType": "OSGBLayer",

        "level": -1,

        "maxVisibleAltitude": 0,

        "minVisibleAltitude": 0,

        "name": "Ground_1@CBD",

        "oldCache": false,

        "queryable": false,

        "subLayers": {},

        "type": null,

        "useTwoDimenCache": false,

        "visible": true,

        "visibleDistance": 0

    },

    {

        "alwaysRender": true,

        "bounds": null,

        "cachePassword": null,

        "caption": "Building@CBD",

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

        "dataName": "Building@CBD",

        "description": "",

        "editable": false,

        "hasLocalCache": true,

        "isWebDatasource": false,

        "layer3DType": "OSGBLayer",

        "level": -1,

        "maxVisibleAltitude": 0,

        "minVisibleAltitude": 0,

        "name": "Building@CBD",

        "oldCache": false,

        "queryable": false,

        "subLayers": {},

        "type": null,

        "useTwoDimenCache": false,

        "visible": true,

        "visibleDistance": 0

    }

]

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 layers resource exists, or if the resource can be accessed by clients. It can also determine if the layers resource supports an output format <format> if performed on a URI with .<format> included.

See