专题图服务类。 专题图结果通过该类支持的事件的监听函数参数获取,参数类型为 {SuperMap.REST.ThemeEventArgs}; 获取的结果数据包括 originResult 、result 两种, 其中,originResult 为服务端返回的用 JSON 对象表示的专题图结果数据,result 为服务端返回的专题图结果数据,保存在 {SuperMap.REST.ThemeResult} 对象中。
| SuperMap. |
专题图服务类。 专题图结果通过该类支持的事件的监听函数参数获取,参数类型为 {SuperMap.REST.ThemeEventArgs}; 获取的结果数据包括 originResult 、result 两种, 其中,originResult 为服务端返回的用 JSON 对象表示的专题图结果数据,result 为服务端返回的专题图结果数据,保存在 {SuperMap.REST.ThemeResult} 对象中。 |
| Constants | |
| EVENT_TYPES | {Array(String)} 此类支持的事件类型。 |
| Properties | |
| events | {SuperMap.Events} 在 ThemeService 类中处理所有事件的对象,支持 processCompleted 、processFailed 两种事件,服务端成功返回专题图结果时触发 processCompleted 事件,服务端返回专题图结果失败时触发 processFailed 事件。 |
| Constructor | |
| SuperMap. |
专题图服务类构造函数。 |
| Functions | |
| destroy | 释放资源,将引用资源的属性置空。 |
| processAsync | 负责将客户端的专题图参数传递到服务端。 |
{SuperMap.Events} 在 ThemeService 类中处理所有事件的对象,支持 processCompleted 、processFailed 两种事件,服务端成功返回专题图结果时触发 processCompleted 事件,服务端返回专题图结果失败时触发 processFailed 事件。
例如:
var myThemeService = SuperMap.REST.ThemeService(url);
myThemeService.events.on({
"processCompleted": themeCompleted,
"processFailed": themeFailed
}
);
function themeCompleted(ThemeEventArgs){//todo};
function themeFailed(ThemeEventArgs){//todo};
专题图服务类构造函数。
例如:
var myThemeService = new SuperMap.REST.ThemeService(url, {
eventListeners: {
"processCompleted": themeCompleted,
"processFailed": themeFailed
}
});
| url | {String} 服务的访问地址。如:http://localhost:8090 |
| options | {Object} 参数。 |
| eventListeners | {Object} 需要被注册的监听器对象。 |
processAsync: function( params )
负责将客户端的专题图参数传递到服务端。
| params | {SuperMap.REST.ThemeParameters} |
释放资源,将引用资源的属性置空。
destroy: function()
负责将客户端的专题图参数传递到服务端。
processAsync: function( params )