关于arcgis api for flex,使用IdentifyTask功能查询时,出现'sr' parameter is invalid的错误,请高手帮 20
publicfunctiondrawEndHandle(event:DrawEvent):void{vargeometry:Geometry=event.graphic....
public function drawEndHandle(event:DrawEvent):void
{
var geometry : Geometry = event.graphic.geometry;
var identifyParams:IdentifyParameters = new IdentifyParameters();
identifyParams.returnGeometry = true;
identifyParams.tolerance = 1;
identifyParams.width = map.width;
identifyParams.height = map.height;
//identifyParams.spatialReference = map.spatialReference;
identifyParams.geometry = geometry;
identifyParams.layerIds = [12];
identifyParams.layerOption = IdentifyParameters.LAYER_OPTION_ALL;
identifyParams.mapExtent = map.extent;
identifyTask.execute(identifyParams);
}
private function onIdentifyComplete(event:IdentifyEvent):void
{
var results:Array = event.identifyResults;
for each (var result:IdentifyResult in results)
{
ResultLayer.add(result.feature);
}
}
<esri:IdentifyTask id="identifyTask" url="{MapServer}/ArcGIS/rest/Services/zddj/MapServer"
fault="identifyTask_faultHandler(event)"
executeComplete="onIdentifyComplete(event)" concurrency="last" />
应该是sr那个参数无效,但是sr参数怎么修改呢? 展开
{
var geometry : Geometry = event.graphic.geometry;
var identifyParams:IdentifyParameters = new IdentifyParameters();
identifyParams.returnGeometry = true;
identifyParams.tolerance = 1;
identifyParams.width = map.width;
identifyParams.height = map.height;
//identifyParams.spatialReference = map.spatialReference;
identifyParams.geometry = geometry;
identifyParams.layerIds = [12];
identifyParams.layerOption = IdentifyParameters.LAYER_OPTION_ALL;
identifyParams.mapExtent = map.extent;
identifyTask.execute(identifyParams);
}
private function onIdentifyComplete(event:IdentifyEvent):void
{
var results:Array = event.identifyResults;
for each (var result:IdentifyResult in results)
{
ResultLayer.add(result.feature);
}
}
<esri:IdentifyTask id="identifyTask" url="{MapServer}/ArcGIS/rest/Services/zddj/MapServer"
fault="identifyTask_faultHandler(event)"
executeComplete="onIdentifyComplete(event)" concurrency="last" />
应该是sr那个参数无效,但是sr参数怎么修改呢? 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询