Class: LayerInfoService

mapboxgl.supermap.LayerInfoService

图层信息服务类 。

new mapboxgl.supermap.LayerInfoService(url, options)

mapboxgl/services/LayerInfoService.js, line 15
Name Type Description
url string

与客户端交互的地图服务地址。请求地图服务,URL 应为:
http://{服务器地址}:{服务端口号}/iserver/services/{地图服务名}/rest/maps/{地图名}/tempLayersSet/{tempLayerID}/Rivers@World@@World"。

options Object

服务所需可选参数。

Name Type Default Description
proxy string 可选

服务代理地址。

withCredentials boolean false 可选

请求是否携带 cookie。

crossOrigin boolean 可选

是否允许跨域请求。

headers Object 可选

请求头。

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

Extends

Events

inherited initialized

mapboxgl/services/ServiceBase.js, line 25

构造函数构造成功之后触发。

Properties:
Name Type Description
this Object

this 对象。

Methods

getLayersInfo(callback){mapboxgl.supermap.LayerInfoService}

mapboxgl/services/LayerInfoService.js, line 38

获取图层信息服务。

Name Type Description
callback RequestCallback

回调函数。

Returns:
Type Description
mapboxgl.supermap.LayerInfoService 返回图层信息类。

setLayerInfo(params, callback)

mapboxgl/services/LayerInfoService.js, line 60

设置图层信息服务。可以实现临时图层中子图层的修改。

Name Type Description
params SuperMap.SetLayerInfoParameters

设置图层信息参数类。

callback RequestCallback

回调函数。

setLayersInfo(params, callback)

mapboxgl/services/LayerInfoService.js, line 92

设置图层信息服务。可以实现创建新的临时图层和对现有临时图层的修改。

Name Type Description
params SuperMap.SetLayersInfoParameters

设置图层信息参数类,包括临时图层。

callback RequestCallback

回调函数。

setLayerStatus(params, callback)

mapboxgl/services/LayerInfoService.js, line 125

子图层显示控制服务。负责将子图层显示控制参数传递到服务端,并获取服务端返回的图层显示状态。

Name Type Description
params SuperMap.SetLayerStatusParameters

子图层显示控制参数类。

callback RequestCallback

回调函数。