tempLayer


URI

<tempLayers_uri>/{tempLayerName}[.<format>]

Supported methods

GET, POST, PUT, DELETE, HEAD

Parent resource

tempLayers

Child resources

legend, visible, queryable, style

Introduction

The tempLayer resource is a temporary layer, the name of which is identified by tempLayerName in the URI. The tempLayer   resources can be different types of layers, such as higher level layers like UGCMapLayer, WFSLayer, WMSLayer, etc., or lower level layers like the sublayers of UGCMapLayer, such as UGCVectorLayer, UGCGridLayer, UGCImageLayer, UGCThemeLayer, UGCHeatmapLayer etc. The higher level layer is identified by the type field; the lower level layer is identified by the ugcLayerType field. For the life cycle of the resource, see Life cycle of temporary resources.

{tempLayerName} is used to identify the layer name of the higher level layer of the lower level layer.

The representation of the temporary layer could be obtained through the tempLayer resource. The restrictions to create, delete and update the temporary layer are as follow:

Supported methods

Supported output formats: rjson, json, html, xml.

GIS Services Resource Hierarchy

root maps map tempLayersSet tempLayers tempLayer

HTTP request methods

Implement the HTTP request on the following URI, where supermapiserver is the name of the server, WorldMap is the name of the map (mapName), tempLayers92ecaz23_49762c443421448b992a387c8221d070 is the ID of a temporary layer set (tempLayersID) in WorldMap, URI represent a temporary layer in WorldMap with the ID tempLayers92ecaz23_49762c443421448b992a387c8221d070 , or tempLayers resource, WCapitasl@world@@WorldMap represents a sublayer of the World layer in the temporary layer set.

http://supermapiserver:8090/iserver/services/map-world/rest/maps/WorldMap/tempLayersSet/tempLayers92ecaz23_49762c443421448b992a387c8221d070/Capitals@World@@WorldMap.rjson

GET Request

Gets the representation of a layer in the temporary layer set.

Request parameters

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

Response structure

Implement the GET request on the tempLayer resource and returns the representation of the resource. The representation describes the various information of the layer. The descriptions of the different types of layers vary. A layer could be a higher level layer like UGCMapLayer, WFSLayer, WMSLayer etc, or a lower level layer like a sublayer of WFSLayer, WMSLayer, or UGCMapLayer, such as UGCVectorLayer, UGCGridLayer, UGCImageLayer, UGCThemeLayer, UGCHeatmapLayer etc. The structure of the representation of the layer resource is the description structure of the layer.

Since the example layer Capitals@world is a UGCVectorLayer, the response is in UGCVectorLayer structure, as shown below:

Field Type Definition
name String The layer name, used to uniquely identify the layer in the map. None case-sensitive.
bounds double The bounds of the layer.
caption String

The layer caption. By default, it is identical to the layer name. It is displayed in the legend and layer control. Note the different between the caption and the name.

description String The descriptive information about the layer.
queryable boolean Whether the object in the layer is queryable. True indicates it could be queried and false indicates it could not be queried.
visible boolean Whether the layer is visible. When the layer is invisible, all the other property settings will not be allowed.
type LayerType The layer type.
The layer types currently supported by SuperMap iServer Java are: UGC (SuperMap layer), WFS (WFS layer), WMS (WMS layer), and CUSTOM (custom layer).
subLayers Layer[] The sublayers set.
completeLineSymbolDisplayed boolean Whether to display the complete line. True indicates to display. False indicates not to display.
maxScale double The maximum visible scale of the layer. The maximum visible scale cannot be negative. When the current display scale is greater than the maximum layer visible scale, this layer will not be displayed.
The default is true.
minScale double The minimum visible scale of the layer. The minimum visible scale cannot be negative. When the current display scale is less than the minimum visible scale, this layer will not be displayed.
The default is true.
minVisibleGeometrySize double The minimum visible size of the geometric objects. Unit: pixels.
opaqueRate int The opacity of the layer, 0-100.
symbolScalable boolean Whether the symbols are allowed to scale up and down with the layer.
True indicates that when a layer is zoomed in or out, the symbols will be also zoomed in or out; False indicates that the symbol size could not scale up or down with the image.
symbolScale double The reference scale of the symbol.
The reference scale of the symbol is valid when symbols are allowed to scale up and down with the layer. The reference scale is the display scale of the layer when the symbol is at its original size.
datasetInfo DatasetInfo The dataset corresponding to the layer. A layer is a reference to a dataset, therefore a layer corresponds to a dataset.
displayFilter String The display filter of the layer.
A Filter condition is a filter on the property data in the database. For example, if you set a filter "smid >2" for a layer, only the geometric objects with the smid field value greater than 2 will be displayed.
joinItems JoinItem[] The join information.
representationField String The field to store the cartographic expression information.
The cartographic expression is the information associated with the geometric objects in the vector dataset. You can use other expressions when the corresponding geometric object is display in the map window without showing the original geometry object. Note the data of the original geometry object has not changed, but only the display mode changes.
ugcLayerType UGCLayerType The type of the SuperMap layer.
\tab \tab The SuperMap layer types include GRID , IMAGE, VECTOR, HEATMAP, WMS, and WFS.
style Style The vector layer style.

Example usage

Implement the GET request on the temporary layer Capitals@world: http://supermapiserver:8090/iserver/services/map-world/rest/maps/WorldMap/tempLayersSet/tempLayers92ecaz23_49762c443421448b992a387c8221d070/Capitals@World@@WorldMap.rjson in the temporary layer set whose ID is tempLayers92ecaz23_49762c443421448b992a387c8221d070. The response in rjson format is as shown below.

{

        "bounds": {

                "bottom": -41.21039581298828,

                "left": -99.12757110595705,

                "leftBottom": {

                        "x": -99.12757110595705,

                        "y": -41.21039581298828

                    

        },

                "right": 175.14494323730466,

                "rightTop": {

                        "x": 175.14494323730466,

                        "y": 64.31326293945314

                    

        },

                "top": 64.31326293945314

            

    },

        "caption": "Capitals@World",

        "completeLineSymbolDisplayed": false,

        "datasetInfo": {

                "bounds": {

                        "bottom": -41.21039581298828,

                        "left": -99.12757110595705,

                        "leftBottom": {

                                "x": -99.12757110595705,

                                "y": -41.21039581298828

                            

            },

                        "right": 175.14494323730466,

                        "rightTop": {

                                "x": 175.14494323730466,

                                "y": 64.31326293945314

                            

            },

                        "top": 64.31326293945314

                    

        },

                "dataSourceName": "World",

                "description": null,

                "encodeType": null,

                "isReadOnly": false,

                "name": "Capitals",

                "prjCoordSys": null,

                "tableName": null,

                "type": "POINT"

            

    },

        "description": "",

        "displayFilter": "",

        "joinItems": null,

        "maxScale": 0,

        "minScale": 7.56550553E-8,

        "minVisibleGeometrySize": 0.4,

        "name": "Capitals@World",

        "opaqueRate": 100,

        "queryable": true,

        "representationField": "",

        "style": {

                "fillBackColor": {

                        "blue": 255,

                        "green": 255,

                        "red": 255

                    

        },

                "fillBackOpaque": true,

                "fillForeColor": {

                        "blue": 196,

                        "green": 196,

                        "red": 196

                    

        },

                "fillGradientAngle": 0,

                "fillGradientMode": "NONE",

                "fillGradientOffsetRatioX": 0,

                "fillGradientOffsetRatioY": 0,

                "fillOpaqueRate": 100,

                "fillSymbolID": 0,

                "lineColor": {

                        "blue": 0,

                        "green": 0,

                        "red": 0

                    

        },

                "lineSymbolID": 0,

                "lineWidth": 0.1,

                "markerAngle": 0,

                "markerSize": 2,

                "markerSymbolID": 12

            

    },

        "subLayers": {},

        "symbolScalable": false,

        "symbolScale": 0,

        "type": "UGC",

        "ugcLayerType": "VECTOR",

        "visible": true

}

POST request

creates a SuperMap sublayer if the tempLayer resource identifies a UGCMapLayer layer.

Request parameters

To implement the POST request to create a SuperMap sublayer, the information about the sublayer needs to be included in the request body, namely, the description of UGCVectorLayer, UGCGridLayer, UGCImageLayer, UGCThemeLayer or UGCHeatmapLayer. Please see the description of the layer in JavaDoc. To create a UGCVectorLayer layer, for example, the request parameters are as shown below :

Field Type Definition
name String The layer name, used to uniquely identify the layer in the map. None case-sensitive.
bounds double The bounds of the layer.
caption String

The layer caption. By default, it is identical to the layer name. It is displayed in the legend and layer control. Note the different between the caption and the name.

description String The descriptive information about the layer.
queryable boolean Whether the object in the layer is queryable. True indicates it could be queried and false indicates it could not be queried.
visible boolean Whether the layer is visible. When the layer is invisible, all the other property settings will not be allowed.
type String The layer type. There are UGCVectorLayer, UGCGirdLayer, UGCImageLayer, UGCThemerLayer, WMSLayer, WFSLayer, etc.
subLayers Layer[] The sublayers set.
completeLineSymbolDisplayed boolean Whether to display the complete line. True indicates to display. False indicates not to display.
maxScale double The maximum visible scale of the layer. The maximum visible scale cannot be negative. When the current display scale is greater than the maximum layer visible scale, this layer will not be displayed.
The default is true.
minScale double The minimum visible scale of the layer. The minimum visible scale cannot be negative. When the current display scale is less than the minimum visible scale, this layer will not be displayed.
The default is true.
minVisibleGeometrySize double The minimum visible size of the geometric objects. Unit: pixels.
opaqueRate int The opacity of the layer, 0-100.
symbolScalable boolean Whether the symbols are allowed to scale up and down with the layer.
True indicates that when a layer is zoomed in or out, the symbols will be also zoomed in or out; False indicates that the symbol size could not scale up or down with the image.
symbolScale double The reference scale of the symbol.
The reference scale of the symbol is valid when symbols are allowed to scale up and down with the layer. The reference scale is the display scale of the layer when the symbol is at its original size.
datasetInfo DatasetInfo The dataset corresponding to the layer. A layer is a reference to a dataset, therefore a layer corresponds to a dataset.
displayFilter String The display filter of the layer.
A Filter condition is a filter on the property data in the database. For example, if you set a filter "smid >2" for a layer, only the geometric objects with the smid field value greater than 2 will be displayed.
joinItems JoinItem[] The join information.
representationField String The field to store the cartographic expression information.
The cartographic expression is the information associated with the geometric objects in the vector dataset. You can use other expressions when the corresponding geometric object is display in the map window without showing the original geometry object. Note the data of the original geometry object has not changed, but only the display mode changes.
ugcLayerType UGCLayerType The type of the UGC layer.
style Style The vector layer style.

Response structure

Implement the POST request on the temporary layer resource UGCMapLayer, the response is shown below. (The representation is in the entity body of the response message):

Name Type Description
succeed boolean

Whether the create new layer operation is successful. If not, there would be an error message.

error HttpError An error message. If successful, the field will be absent.

Example usage

When implementing the POST request on the temporary layer World: http://supermapiserver:8090/iserver/services/map-world/rest/maps/WorldMap/tempLayersSet/tempLayers92ecaz23_49762c443421448b992a387c8221d070/Capitals@World@@WorldMap.rjson i the temporary layer set whose ID is tempLayers92ecaz23_49762c443421448b992a387c8221d070 to create a sublayer of the UGCVectorLayer type, you need to include the description of the layer of the UGCVectorLayer type in the request body, as shown bellow.

{

    "bounds": {

        "leftBottom": {

            "x": -99.12757110595704,

            "y": -41.21039581298828

        },

        "rightTop": {

            "x": 175.14494323730466,

            "y": 64.31326293945314

        }

    },

    "caption": "NewLayer@World",

    "completeLineSymbolDisplayed": false,

    "datasetInfo": {

        "bounds": {

            "leftBottom": {

                "x": -99.12757110595704,

                "y": -41.21039581298828

            },

            "rightTop": {

                "x": 175.14494323730466,

                "y": 64.31326293945314

            }

        },

        "dataSourceName": "World",

        "description": null,

        "encodeType": null,

        "isReadOnly": false,

        "name": "NewLayer",

        "prjCoordSys": null,

        "tableName": null,

        "type": "POINT"

    },

    "description": "",

    "displayFilter": "",

    "joinItems": null,

    "maxScale": 0,

    "minScale": 7.56550553e-8,

    "minVisibleGeometrySize": 0.4,

    "name": "NewLayer@World",

    "opaqueRate": 0,

    "queryable": false,

    "representationField": "",

    "style": {

        "fillBackColor": {

            "blue": 255,

            "green": 255,

            "red": 255

        },

        "fillBackOpaque": true,

        "fillForeColor": {

            "blue": 196,

            "green": 196,

            "red": 196

        },

        "fillGradientAngle": 0,

        "fillGradientMode": "NONE",

        "fillGradientOffsetRatioX": 0,

        "fillGradientOffsetRatioY": 0,

        "fillOpaqueRate": 100,

        "fillSymbolID": 0,

        "lineColor": {

            "blue": 0,

            "green": 0,

            "red": 0

        },

        "lineSymbolID": 0,

        "lineWidth": 0.1,

        "markerAngle": 0,

        "markerSize": 2,

        "markerSymbolID": 12

    },

    "subLayers": {},

    "symbolScalable": false,

    "symbolScale": 0,

    "type": "UGC",

    "ugcLayerType": "VECTOR",

    "visible": true

}

If successfully, the response in rjson format is shown as below.

{

    "succeed": true

}

Then you can implement the GET request on http://supermapiserver:8090/iserver/services/map-world/rest/maps/WorldMaptempLayersSet/tempLayers92ecaz23_49762c443421448b992a387c8221d070/Capitals@World@@WorldMap.rjson to create a new layer "NewLayer@World@@Capitals@World@@WorldMap" in the sublayers of WorldMap. And you can implement the GET request on http://supermapiserver:8090/iserver/services/map-world/rest/maps/WorldMap/tempLayersSet/tempLayers92ecaz23_49762c443421448b992a387c8221d070/NewLayer@World@@Capitals@World@@WorldMap.rjson to get the representation of the new layer.

PUT request

Modify the temp layer, tempLayer resource. This requires the name attribute and description information of the modified field be included in the request body.

Request parameters

To implement the PUT request to create or modify the tempLayer layer, certain parameters must be included in the request body. The parameters are consistent with the response structure of the GET request. If the parameters are legitimate, the server will create or modify a temporary layer, according to these parameters, namely, the tempLayer resource.

When the tempLayer resource identifies the UGCMapLayer layer and its sublayers, update the existing resource through implementing the PUT request on the resource. When implementing the PUT request on the unavailable resource, the create operation is only for the lower level SuperMap layers.

When modifing a layer, you need to transfer the ayer of the same type. Certain parameter cannot be null, for example, when you modify the UGCVectorLayer, the name, type, and ugcLayerType as well as the name and dataSourceName of the datasetInfo are all necessary. For more details, please see the relevant description of the layers in JavaDoc.

Response structure

Implement the PUT request on the tempLayer resource. The response is shown as below. (The representation is in the entity body of the response message):  

Name Type Description
succeed boolean

Whether the create new layer operation is successful. If not, there would be an error message.

error HttpError An error message. If successful, the field will be absent.

Example usage

Implement the PUT request on the example URL with http://supermapiserver:8090/iserver/services/map-world/rest/maps/WorldMap/tempLayersSet/tempLayers92ecaz23_49762c443421448b992a387c8221d070/Capitals@World@@WorldMap.rjson to modify the query status of the temporary layer Capitals@World. The parameters in the entity body are shown as below.

{

    "bounds": {

        "bottom": -41.21039581298828,

        "left": -99.12757110595704,

        "leftBottom": {

            "x": -99.12757110595704,

            "y": -41.21039581298828

        },

        "right": 175.14494323730466,

        "rightTop": {

            "x": 175.14494323730466,

            "y": 64.31326293945314

        },

        "top": 64.31326293945314

    },

    "caption": "Capitals@World",

    "completeLineSymbolDisplayed": false,

    "datasetInfo": {

        "bounds": {

            "bottom": -41.21039581298828,

            "left": -99.12757110595704,

            "leftBottom": {

                "x": -99.12757110595704,

                "y": -41.21039581298828

            },

            "right": 175.14494323730466,

            "rightTop": {

                "x": 175.14494323730466,

                "y": 64.31326293945314

            },

            "top": 64.31326293945314

        },

        "dataSourceName": "World",

        "description": null,

        "encodeType": null,

        "isReadOnly": false,

        "name": "Capitals",

        "prjCoordSys": null,

        "tableName": null,

        "type": "POINT"

    },

    "description": "",

    "displayFilter": "",

    "joinItems": null,

    "maxScale": 0,

    "minScale": 7.56550553e-8,

    "minVisibleGeometrySize": 0.4,

    "name": "Capitals@World",

    "opaqueRate": 100,

    "queryable": true,

    "representationField": "",

    "style": {

        "fillBackColor": {

            "blue": 255,

            "green": 255,

            "red": 255

        },

        "fillBackOpaque": true,

        "fillForeColor": {

            "blue": 196,

            "green": 196,

            "red": 196

        },

        "fillGradientAngle": 0,

        "fillGradientMode": "NONE",

        "fillGradientOffsetRatioX": 0,

        "fillGradientOffsetRatioY": 0,

        "fillOpaqueRate": 100,

        "fillSymbolID": 0,

        "lineColor": {

            "blue": 0,

            "green": 0,

            "red": 0

        },

        "lineSymbolID": 0,

        "lineWidth": 0.1,

        "markerAngle": 0,

        "markerSize": 2,

        "markerSymbolID": 12

    },

    "subLayers": {},

    "symbolScalable": false,

    "symbolScale": 0,

    "type": "UGC",

    "ugcLayerType": "VECTOR",

    "visible": true

}

The response in rjson format is as follows:

{

    "succeed": true

}

DELETE

Deletes the temporary layer resource. If the temporary layer resource does not exist, the status code 404 will be returned.

Response structure

None. Implement the DELETE request on the tempLayer resource. The response structure is shown as below.

Name Type Description
succeed boolean If the operation was successful.
error HttpError An error message, if the operation is successful, you do not have this field.

Example usage

Implement the DELETE request on the tempLayers resource with http://supermapiserver:8090/iserver/services/map-world/rest/maps/WorldMap/tempLayersSet/1/Capitals@World@@WorldMap.rjson :to delete the temporary layer Capitals@World and you will get the response is in rjson format as shown below.

{

    "succeed": true

}

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.

The HEAD request helps check the existence of the templayer resource and whether it can be accessed by the client. By implementing the HEAD request on the URI, with .<format> appended to the end, we can quickly get to know whether templayer resource supports the representation in <format> or not.

See