L.supermap.measureService(url, options)
leaflet/services/MeasureService.js, line 10
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
url |
string |
服务访问的地址。如:http://localhost:8090/iserver/services/map-world/rest/maps/World。 |
||||||||||||||||||||||||
options |
Object |
参数。
|
Example
用法:
L.supermap.measureService(url).measureDistance({
geometry:xxx
},function(result){
//doSomething
})
Extends
Events
-
inherited destroy
leaflet/services/ServiceBase.js, line 54 -
资源释放成功后触发。
Properties:
Name Type Description this
L.supermap.ServiceBase this 对象。
-
inherited initialized
leaflet/services/ServiceBase.js, line 41 -
构造函数构造成功后触发。
Properties:
Name Type Description this
L.supermap.ServiceBase this 对象。
Methods
-
L.supermap.measureService.measure(type, params, callback)
leaflet/services/MeasureService.js, line 59 -
Name Type Default Description type
SuperMap.MeasureMode SuperMap.MeasureMode.DISTANCE 可选 量算模式。
params
SuperMap.MeasureParameters 测量相关参数类。
callback
RequestCallback 回调函数。
-
inherited destroy()
leaflet/services/ServiceBase.js, line 49 -
释放资源,将引用的资源属性置空。
-
measureArea(params, callback)
leaflet/services/MeasureService.js, line 48 -
测面积。
Name Type Description params
SuperMap.MeasureParameters 测量相关参数类。
callback
RequestCallback 回调函数。
-
measureDistance(params, callback)
leaflet/services/MeasureService.js, line 37 -
测距。
Name Type Description params
SuperMap.MeasureParameters 测量相关参数类。
callback
RequestCallback 回调函数。