L.supermap.measureService(url, options)
| Name | Type | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
url |
string |
The url of service. For instance: http://localhost:8090/iserver/services/map-world/rest/maps/World. |
||||||||||||||||||||||||
options |
Object |
The optional parameters.
|
Example
L.supermap.measureService(url).measureDistance({
geometry:xxx
},function(result){
//doSomething
})
Extends
Events
-
inherited destroy
ServiceBase.js, line 49 -
Triggered after the resource is successfully released.
Properties:
Name Type Description thisL.supermap.ServiceBase This object.
-
inherited initialized
ServiceBase.js, line 36 -
Triggered after the constructor is constructed successfully.
Properties:
Name Type Description thisL.supermap.ServiceBase This object.
Methods
-
static measure(type, params, callback)
MeasureService.js, line 54 -
Name Type Default Description typeL.supermap.MeasureMode L.supermap.MeasureMode.DISTANCE optional The mode of measure, including distance measure mode and area measure mode.
paramsL.supermap.MeasureParameters The MeasureParameters class.
callbackRequestCallback The callback of result data returned by the server side.
-
inherited destroy()
ServiceBase.js, line 44 -
Disposes the resource. The property that references resource is set to null.
-
measureArea(params, callback)
MeasureService.js, line 43 -
Measure area.
Name Type Description paramsL.supermap.MeasureParameters The MeasureParameters class.
callbackRequestCallback The callback of result data returned by the server side.
-
measureDistance(params, callback)
MeasureService.js, line 32 -
Measure distance.
Name Type Description paramsL.supermap.MeasureParameters The MeasureParameters class.
callbackRequestCallback The callback of result data returned by the server side.