com.supermap.web.iServerJava6R.queryServices
public class ChartQueryService
继承 ChartQueryService Inheritance com.supermap.web.service.ServiceBase

海图查询服务类.

查看示例

另请参见

ChartQueryParameters


公共方法
  方法 定义方
   
ChartQueryService(url:String = null)
使用服务地址 URL 实例化 ChartQueryService 对象。
ChartQueryService
   
processAsync(parameters:ChartQueryParameters, responder:IResponder = null):AsyncToken
ChartQueryService
事件
  事件 Summary 定义方
    当与服务端交互失败时触发该事件。 ChartQueryService
    当与服务端交互成功时触发该事件。 ChartQueryService
构造函数详细信息
ChartQueryService () 构造函数
public function ChartQueryService(url:String = null)

使用服务地址 URL 实例化 ChartQueryService 对象。

参数
url:String (default = null) — 地图查询服务访问地址。如:"http://192.168.168.35:8090/iserver/services/map-ChartW/rest/maps/海图"。
方法详细描述
processAsync () 方法
public function processAsync(parameters:ChartQueryParameters, responder:IResponder = null):AsyncToken

参数

parameters:ChartQueryParameters
 
responder:IResponder (default = null)

返回
AsyncToken
事件详细信息
fault 事件
Event Object Type: mx.rpc.events.FaultEvent

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

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

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

示例
下面示例显示了如何进行海图属性查询:
 
     private var chartMarkCode:int;//物标代码
     protected function queryBtn_clickHandler(event:MouseEvent):void
     {
         var filterParam:ChartQueryFilterParameter = new ChartQueryFilterParameter();
         filterParam.isQueryLine = true;
         filterParam.isQueryPoint = true;
         filterParam.isQueryRegion = true;
         filterParam.attributeFilter = "SMID < 10";
         filterParam.chartFeatureInfoSpecCode = chartMarkCode;//查询的物标代号,可通过海图物标信息服务类(ChartFeatureInfoSpecsService)获得
     
         var queryPram:ChartQueryParameters = new ChartQueryParameters();
         queryPram.queryMode = ChartQueryMode.ChartAttributeQuery;
         queryPram.chartLayerNames = ["GB4X0000_52000"];
         queryPram.returnContent = true;
         queryPram.chartQueryFilterParameters = [filterParam];
         var chartQueryService:ChartQueryService = new ChartQueryService(mapUrl);
         chartQueryService.processAsync(queryPram,new AsyncResponder(successHandler,
             function (object:Object, mark:Object = null):void
             {        Alert.show("与服务端交互失败", "抱歉", 4, this);
          },null));
     }
     
     private function successHandler(result:QueryResult,object:Object = null):void
     {
             //TODO
     }
     
     <s:Button top="3" id="queryBtn" label="查询" click="queryBtn_clickHandler(event)"/>