Class: measureService

measureService

量算服务服务类

L.supermap.measureService(url, options)

leaflet/services/MeasureService.js, line 8
Name Type Description
url string

服务访问的地址。如:http://localhost:8090/iserver/services/map-world/rest/maps/World 。

options Object

交互服务时所需可选参数。如:
serverType - {SuperMap.ServerType} 服务来源 iServer|iPortal|online。
eventListeners - {Object} 需要被注册的监听器对象。
measureMode - {SuperMap.MeasureMode} 量算模式,包括距离量算模式和面积量算模式。

Example
用法:
L.supermap.measureService(url).measureDistance({
    geometry:xxx
},function(result){
    //doSomething
})

Extends

Methods

staticL.supermap.measureService.measure(params, callback)

leaflet/services/MeasureService.js, line 53
Name Type Description
params SuperMap.MeasureParameters

测量相关参数类

callback function

回调函数

inherited destroy()

leaflet/services/ServiceBase.js, line 30

释放资源,将引用的资源属性置空。

measureArea(params, callback)

leaflet/services/MeasureService.js, line 42

测面积

Name Type Description
params SuperMap.MeasureParameters

测量相关参数类

callback function

回调函数

measureDistance(params, callback)

leaflet/services/MeasureService.js, line 31

测距

Name Type Description
params SuperMap.MeasureParameters

测量相关参数类

callback function

回调函数