com.supermap.web.iServerJava6R.mapServices
public class GetMapStatusService
继承 GetMapStatusService Inheritance com.supermap.web.service.ServiceBase

地图信息获取服务类.

该类负责从客户端指定的地图服务地址上获取该服务提供的地图信息。
用户获取服务端返回的地图信息有两种方式:一种是通过监听 GetMapStatusEvent.PROCESS_COMPLETE 事件;一种是始用 AsyncResponder 类。其中 GetMapStatusEvent 类既存有从服务端获取的原始结果,也包括经客户端处理后的最终结果 GetMapStatusResult;始用 AsyncResponder 类获取的结果为经客户端处理后的最终结果 GetMapStatusResult。当用户只需要最终结果时,推荐使用 AsyncResponder 类。



公共方法
  方法 定义方
   
使用地图服务地址实例化 GetMapStatusService 对象。
GetMapStatusService
   
processAsync(responder:IResponder = null):AsyncToken
根据地图服务地址与服务端完成异步通讯,获取地图信息。.
GetMapStatusService
事件
  事件 Summary 定义方
    当与服务端交互失败时触发该事件。 GetMapStatusService
    当与服务端交互成功时触发该事件。 GetMapStatusService
构造函数详细信息
GetMapStatusService () 构造函数
public function GetMapStatusService(url:String)

使用地图服务地址实例化 GetMapStatusService 对象。

参数
url:String — 与客户端交互的地图服务地址。例如"http://localhost:8090/iserver/services/map-world/rest/maps/世界地图"。
方法详细描述
processAsync () 方法
public function processAsync(responder:IResponder = null):AsyncToken

根据地图服务地址与服务端完成异步通讯,获取地图信息。.

当地图信息获取成功时,将触发 GetMapStatusEvent.PROCESS_COMPLETE 事件。用户可以通过两种方式获取图层信息:
1. 通过 AsyncResponder 类获取(推荐使用);
2. 通过监听 GetMapStatusEvent.PROCESS_COMPLETE 事件获取。

参数

responder:IResponder (default = null) — 由 AsyncResponder 类实现获取地图信息。远程或异步请求服务完成时将调用的处理函数。使用方法为
AsyncResponder(result:Function, fault:Function, token:Object = null)
result:Function — 成功完成请求时应调用的函数。必须具有以下签名:
public function (result:GetMapStatusResult, token:Object = null):void;
fault:Function — 请求完成但出错时应调用的函数。必须具有以下签名:
public function (error:FaultEvent, token:Object = null):void;
token:Object (default = null) — 与此请求相关的其他信息。
有关 AsyncResponder 类的详细信息请参见 “ActionScript 语言帮助文档”。

返回
AsyncToken — 返回 AsyncToken 对象,它为异步 RPC 操作提供设置额外数据或标记级别数据的位置。它也允许为单独的调用附加 IResponder。可从 token 属性的 ResultEvent 和 FaultEvent 中引用 AsyncToken。有关 AsyncToken 类的详细信息请参见 “ActionScript 语言帮助文档”。
事件详细信息
fault 事件
Event Object Type: mx.rpc.events.FaultEvent

当与服务端交互失败时触发该事件。

processComplete 事件  
Event Object Type: com.supermap.web.iServerJava6R.serviceEvents.GetMapStatusEvent

当与服务端交互成功时触发该事件。