打造精彩纷呈的WebGIS应用-ArcGISAPIforFlex篇

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

打造精彩纷呈的WebGIS应用-ArcGISAPIforFlex篇Esri中国信息技术有限公司韩兴刚ArcGISAPIforFlex简介精彩应用展示ArcGISViewerforFlex总结主要内容ArcGISAPIforFlex简介FlexAPI的角色WebBrowserMobileAirArcGISServer(s)APIMapsEditingQueryingGeoprocessing.etcFlexAPI的功能MapsQueryNetWorkAnalystGeoprocessingEditGeometryTaskAPIAPI组织结构layerstasksagsgeometrysymbolscomponentstoolsMap是API中最为核心的组件Event:MouseEvent&KeyboardEvent&NavigationComponents:Scalebar&Panarrows&ZoomsliderProperties:Collectionoflayers&Spatialreference&ScalelevelsFunctions:AddLayer&RemoveLayeretc.常用对象——Map常用对象——LayerDynamicMapServiceLayer–ArcGISDynamicMapServiceLayer–ArcGISImageServiceLayer–ArcIMSMapServiceLayerTiledMapServiceLayer–ArcGISTiledMapServiceLayerGraphicsLayer–FeatureLayerGPResultImageLayerKMLLayerMapImageLayerOpenStreetMapLayerWMSLayer常用对象——GraphicsGraphicsgeometrysymbolExtent(矩形范围)MapPoint(点)Multipoints(多点)Polygon(多边形)Polyline(折线)InfoSymbolTextSymbolMarkerSymbolLineSymbolFillSymbolCompositeSymbol{“name”:”EsriChina”,“address”:”东直门南大街甲3号居然大厦19层”}常用对象——TasksQuery,Find(Search),IdentifyGeoprocessingServicesRoute,ServiceArea,ClosestFacilityGeometryServiceLocatorServiceFlexAPI帮助精彩应用展示ArcGIS10.1forServer新特性新特性-服务端打印esri:PrintTaskid=printTaskexecuteComplete=printTask_executeCompleteHandler(event)fault=Alert.show(event.fault.faultString,'printerror')”getResultDataComplete=printTask_getResultDataCompleteHandler(event)jobComplete=printTask_jobCompleteHandler(event)”showBusyCursor=trueurl={url}/printTask.execute(printParameters);privatefunctionprintTask_executeCompleteHandler(event:PrintEvent):void{varparamValue:ParameterValue=event.executeResult.results[0];vardataFile:DataFile=paramValue.valueasDataFile;varmaprUrl:String=dataFile.url;navigateToURL(newURLRequest(mapUrl));}新特性-动态渲染esri:ArcGISDynamicMapServiceLayerid=usaLayerurl=esri:layerDrawingOptionsesri:LayerDrawingOptionslayerId=0esri:SimpleRendereresri:SimpleMarkerSymbolcolor=0x9C968B“size=5”style=circleesri:SimpleLineSymbolalpha=0.2color=0x8A4442//esri:SimpleMarkerSymbol/esri:SimpleRendereresri:labelClassesesri:LabelClassid=labelExpressionOne”labelExpression=[POP2000]labelPlacement=esriServerPointLabelPlacementAboveCenter”minScale=36112”where=POP2000<=61esri:LabelOptionscolor=0xFF0000”fontSize=11”fontStyle=italic”fontWeight=bold”haloAlpha=1haloColor=0xDCDCDC”haloSize=2//esri:LabelClass/esri:labelClasses/esri:LayerDrawingOptions/esri:layerDrawingOptions/esri:ArcGISDynamicMapServiceLayerprotectedfunctiongenerateRendererTask_executeCompleteHandler(event:GenerateRendererEvent):void{varrenderer:ClassBreaksRenderer=event.rendererasClassBreaksRenderer;createClassBreaksLegend(renderer);varlayerDrawingOptions:LayerDrawingOptions=newLayerDrawingOptions();layerDrawingOptions.layerId=layerMapSource.mapLayerId;//stateslayeridintheservicelayerDrawingOptions.renderer=renderer;demographicsLayer.alpha=0.7;varlayerDrawingOptionsArr:Array=[layerDrawingOptions];demographicsLayer.layerDrawingOptions=layerDrawingOptionsArr;}esri:GenerateRendererTaskid=generateRendererTaskexecuteComplete=generateRendererTask_executeCompleteHandler(event)fault=esriService_faultHandler(event)url={renderTaskURL}/新特性-查询统计privatefunctionexecStatistic():void{varquery:Query=newQuery();varstatsDef1:StatisticDefinition=newStatisticDefinition();statsDef1.onStatisticField=province_GDP_bn;statsDef1.outStatisticFieldName=GDP;statsDef1.statisticType=StatisticDefinition.TYPE_SUMMATION;//......varstatsDef4:StatisticDefinition=newStatisticDefinition();statsDef4.onStatisticField=NAME;statsDef4.outStatisticFieldName=COUNT;statsDef4.statisticType=StatisticDefinition.TYPE_COUNT;query.groupByFieldsForStatistics=[Zone];query.outStatistics=[statsDef1,statsDef2,statsDef3,statsDef4];queryTask.execute(query);}protectedfunctionqueryTask_executeCompleteHandler(event:QueryEvent):void{varfields:Array=event.featureSet.fields;varattributes:Array=event.featureSet.attributes;dg.dataProvider=newArrayCollection(attributes);}新特性-动态调序protectedfunctionlayerOrderButton_clickHandler(event:MouseEvent):void{vardynamicLayerInfo:DynamicLayerInfo=dynamicLayerInfos[0];dynamicLayerInfos.shift();dynamicLayerInfos.push(dynamicLayerInfo);usaLayer.dynamicLayerInfos=dynamicLayerInfos;layerList.removeItemAt(0);layerList.addItem(dynamicLayerInfo.name);}新特性-编辑追踪IdentityManager.instance.enabled=true;新特性-动态图层DynamicWorkspaceMapServiceClientrelateFindReturn新特性-动态图层!--LakesLayerDynamicLayerInfo--esri:DynamicLayerInfoid=lakesDynamicLayerInfolayerId=9999defaultVisibility=trueesri:LayerDataSource!--FeatureClasswithintheDynamicFileGDBWorkspace(followthelinkinthesampledescriptionformoreinformationondynamicworkspaces--esri:TableDataSourcedataSourceName=LakesworkspaceId=CensusFileGDBWorkspaceID//esri:LayerDataSource/esri:DynamicLayerInfovardynamicLayerInfos:Array=censusLayer.createDynamicLayerInfosFromLayerInfos();dynamicLayerInfos.unshift(lakesDynamicLayerInfo);censusLayer.dynamicLayerInfos=dynamicLayerInfos;物联网-企业监控系统客户端热点图渲染客户端热地图实现publicclassHeatmapLayerextendsFea

1 / 42
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功