Class: LayerInfoService

mapboxgl.supermap.LayerInfoService

The LayerInfoService class.

new mapboxgl.supermap.LayerInfoService(url, options)

LayerInfoService.js, line 11
Name Type Description
url string

The url of service.The url to request map query service should be:
Http://{server address}: {service port number}/iserver/services/{map service name}/rest/maps/{map name}/tempLayersSet/{tempLayerID}/Rivers@World@@World".

options Object

The optional parameters.

Name Type Default Description
proxy string optional

Service agent address.

withCredentials boolean false optional

Request whether to carry a cookie.

serverType SuperMap.ServerType SuperMap.ServerType.ISERVER optional

Type of server iServer|iPortal|online。

crossOrigin boolean optional

Whether to allow cross-domain requests.

headers Object optional

Request header.

Example
new mapboxgl.supermap.LayerInfoService(url).getLayersInfo(function(result){
    //doSomething
})

Extends

Events

inherited initialized

ServiceBase.js, line 23

Triggered after the constructor construct succeeds.

Properties:
Name Type Description
this Object

This object.

Methods

getLayersInfo(callback){mapboxgl.supermap.LayerInfoService}

LayerInfoService.js, line 35

Get information of a layer.

Name Type Description
callback RequestCallback

The callback of result data returned by the server side.

Returns:
Type Description
mapboxgl.supermap.LayerInfoService Returns the layer information class.

setLayerInfo(params, callback)

LayerInfoService.js, line 55

Set information of a layer. It is used to modify the sub layer of the temporary layer.

Name Type Description
params SuperMap.SetLayerInfoParameters

The SetLayerInfoParameters class.

callback RequestCallback

The callback of result data returned by the server side.

setLayersInfo(params, callback)

LayerInfoService.js, line 86

Set information of layers. It can create a new temporary layer and edit the current layer. When isTempLayers si false, it will create the new layer. When isTempLayers is true and resourceID is set, it will edit the temporary layer.

Name Type Description
params SuperMap.SetLayersInfoParameters

The SetLayersInfoParameters class.

callback RequestCallback

The callback of result data returned by the server side.

setLayerStatus(params, callback)

LayerInfoService.js, line 117

Sub layer display control service. It is used to pass the sub layer display control parameters to the server, and get the display state of layers returned from the server.

Name Type Description
params SuperMap.SetLayerStatusParameters

The SetLayerStatusParameters class.

callback RequestCallback

The callback of result data returned by the server side.