public class MeasureService
extends java.lang.Object
量算服务类.
该类负责将客户端创建的 MeasureParameters 对象传入服务器端进行距离/面积量算,并将服务器端返回的结果保存在 MeasureResult 对象中。限定符和类型 | 类和说明 |
---|---|
static class |
MeasureService.MeasureEventListener
处理量算结果的监听器抽象类。
|
构造器和说明 |
---|
MeasureService(java.lang.String url)
构造函数。
|
限定符和类型 | 方法和说明 |
---|---|
MeasureResult |
getLastResult()
返回量算结果。
|
void |
process(MeasureParameters parameters, MeasureService.MeasureEventListener listener, MeasureMode measureMode)
根据量算参数进行距离或面积量算与服务端完成异步通讯,即发送量算参数,并通过实现MeasureEventListener监听器处理量算结果。
|
public MeasureService(java.lang.String url)
构造函数。
url
- 地图服务地址。如 http://ServerIP:port/iserver/services/map-world/rest/maps/世界地图。public void process(MeasureParameters parameters, MeasureService.MeasureEventListener listener, MeasureMode measureMode)
根据量算参数进行距离或面积量算与服务端完成异步通讯,即发送量算参数,并通过实现MeasureEventListener监听器处理量算结果。
parameters
- 量算参数信息。listener
- 处理量算结果的MeasureEventListener监听器。measureMode
- 量算模式, 如果为null,则默认为距离量算。public MeasureResult getLastResult()
返回量算结果。