public class ThemeService
extends java.lang.Object
专题图服务类。
该类负责将客户端制作专题图的参数传递给服务端,在服务端会生成一个临时图层来制作相应的专题图,这个专题图在服务端就是一个资源(ResourceInfo),它具有资源地址url和资源ID号。客户端获取到这个资源ID号以后将其赋值给动态图层的layersID属性就能显示出相应的专题图。
限定符和类型 | 类和说明 |
---|---|
static class |
ThemeService.ThemeServiceEventListener
处理专题图结果的监听器抽象类。
|
构造器和说明 |
---|
ThemeService(java.lang.String url)
构造函数。
|
限定符和类型 | 方法和说明 |
---|---|
java.util.HashMap<java.lang.String,java.lang.Object[]> |
getJsonParameters(ThemeParameters params)
返回专题图参数。
|
ThemeResult |
getLastResult()
返回专题图结果。
|
java.lang.String |
getServiceMapName()
获取地图名。
|
<T> void |
process(ThemeParameters params, ThemeService.ThemeServiceEventListener listener)
根据专题图与服务端完成异步通讯,即发送专题图参数,并通过实现ThemeServiceEventListener监听器处理专题图结果。
|
void |
setTimeout(int timeout)
用户自定义超时时间。
|
public ThemeService(java.lang.String url)
构造函数。
url
- 专题图服务地址。如: http://ServerIP:8090/iserver/services/map-china400/rest/maps/Chinapublic void setTimeout(int timeout)
用户自定义超时时间。
timeout
- 用户自定义超时时间。若用户不设置,则使用默认超时间为5秒。0代表无限,即代表不设置超时限制。单位默认为秒。public <T> void process(ThemeParameters params, ThemeService.ThemeServiceEventListener listener)
根据专题图与服务端完成异步通讯,即发送专题图参数,并通过实现ThemeServiceEventListener监听器处理专题图结果。
params
- 专题图参数信息。listener
- 处理专题图结果的ThemeServiceEventListener监听器。public java.lang.String getServiceMapName() throws java.io.UnsupportedEncodingException
获取地图名。
java.io.UnsupportedEncodingException
public java.util.HashMap<java.lang.String,java.lang.Object[]> getJsonParameters(ThemeParameters params) throws java.io.IOException
返回专题图参数。
java.io.IOException
public ThemeResult getLastResult()
返回专题图结果。