Flex4 ArcGis地图服务操作

2024-05-13 14:18

本文主要是介绍Flex4 ArcGis地图服务操作,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

1.简单使用
<?xml version="1.0" encoding="utf-8"?><s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"xmlns:s="library://ns.adobe.com/flex/spark"xmlns:esri="http://www.esri.com/2008/ags"pageTitle="Example #1"><esri:Map><esri:ArcGISTiledMapServiceLayerurl="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" /></esri:Map></s:Application>

2.定位地图位置
<?xml version="1.0" encoding="utf-8"?><s:Applicationxmlns:fx="http://ns.adobe.com/mxml/2009"xmlns:s="library://ns.adobe.com/flex/spark"xmlns:mx="library://ns.adobe.com/flex/halo"xmlns:esri="http://www.esri.com/2008/ags"pageTitle="A tiled map service"><esri:Map><esri:extent><esri:Extent xmin="-1788000" ymin="-4177000" xmax="10044000" ymax="4511000"><esri:SpatialReference wkid="102100"/></esri:Extent></esri:extent><esri:ArcGISTiledMapServiceLayerurl="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/></esri:Map></s:Application>

3.查询

<?xml version="1.0" encoding="utf-8"?><s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"xmlns:mx="library://ns.adobe.com/flex/mx"xmlns:esri="http://www.esri.com/2008/ags"xmlns:s="library://ns.adobe.com/flex/spark"pageTitle="Query Task (with a map)"><s:layout><s:VerticalLayout gap="10"horizontalAlign="center"paddingBottom="20"paddingLeft="25"paddingRight="25"paddingTop="20"/></s:layout><fx:Script><![CDATA[import com.esri.ags.Graphic;import com.esri.ags.FeatureSet;import mx.controls.Alert;import mx.rpc.AsyncResponder;private function doQuery():void{queryTask.execute(query, new AsyncResponder(onResult, onFault));function onResult(featureSet:FeatureSet, token:Object = null):void{// No code needed in this simple sample, since the// graphiclayer is bound to the query result using// graphicProvider="{queryTask.executeLastResult.features}"}function onFault(info:Object, token:Object = null):void{Alert.show(info.toString(), "Query Problem");}}]]></fx:Script><fx:Declarations><!-- Layer with US States --><esri:QueryTask id="queryTask"showBusyCursor="true"url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/0"useAMF="false"/><esri:Query id="query"outSpatialReference="{myMap.spatialReference}"returnGeometry="true"text="{qText.text}"><esri:outFields><fx:String>CITY_NAME</fx:String><fx:String>STATE_NAME</fx:String></esri:outFields></esri:Query><esri:InfoSymbol id="infoSymbol1"><esri:infoRenderer><fx:Component><mx:VBox><mx:Label text="{data.CITY_NAME}"/><mx:Label text="{data.STATE_NAME }"/></mx:VBox></fx:Component></esri:infoRenderer></esri:InfoSymbol></fx:Declarations><s:Panel backgroundColor="0xB2BFC6"height="60"title="Query a layer (search for a state)"><s:layout><s:HorizontalLayout/></s:layout><s:TextInput id="qText"enter="doQuery()"text="San Jose"width="100%"/><s:Button click="doQuery()" label="Do Query"/></s:Panel><esri:Map id="myMap"><esri:extent><esri:Extent xmin="-14298000" ymin="2748000" xmax="-6815000" ymax="7117000"><esri:SpatialReference wkid="102100"/></esri:Extent></esri:extent><esri:ArcGISTiledMapServiceLayer url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Physical_Map/MapServer"/><esri:GraphicsLayer id="myGraphicsLayer" graphicProvider="{queryTask.executeLastResult.features}" symbol="{infoSymbol1}"/></esri:Map></s:Application>


这篇关于Flex4 ArcGis地图服务操作的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/985943

相关文章

Nginx进行平滑升级的实战指南(不中断服务版本更新)

《Nginx进行平滑升级的实战指南(不中断服务版本更新)》Nginx的平滑升级(也称为热升级)是一种在不停止服务的情况下更新Nginx版本或添加模块的方法,这种升级方式确保了服务的高可用性,避免了因升... 目录一.下载并编译新版Nginx1.下载解压2.编译二.替换可执行文件,并平滑升级1.替换可执行文件

python panda库从基础到高级操作分析

《pythonpanda库从基础到高级操作分析》本文介绍了Pandas库的核心功能,包括处理结构化数据的Series和DataFrame数据结构,数据读取、清洗、分组聚合、合并、时间序列分析及大数据... 目录1. Pandas 概述2. 基本操作:数据读取与查看3. 索引操作:精准定位数据4. Group

Python操作PDF文档的主流库使用指南

《Python操作PDF文档的主流库使用指南》PDF因其跨平台、格式固定的特性成为文档交换的标准,然而,由于其复杂的内部结构,程序化操作PDF一直是个挑战,本文主要为大家整理了Python操作PD... 目录一、 基础操作1.PyPDF2 (及其继任者 pypdf)2.PyMuPDF / fitz3.Fre

Python对接支付宝支付之使用AliPay实现的详细操作指南

《Python对接支付宝支付之使用AliPay实现的详细操作指南》支付宝没有提供PythonSDK,但是强大的github就有提供python-alipay-sdk,封装里很多复杂操作,使用这个我们就... 目录一、引言二、准备工作2.1 支付宝开放平台入驻与应用创建2.2 密钥生成与配置2.3 安装ali

MySQL 强制使用特定索引的操作

《MySQL强制使用特定索引的操作》MySQL可通过FORCEINDEX、USEINDEX等语法强制查询使用特定索引,但优化器可能不采纳,需结合EXPLAIN分析执行计划,避免性能下降,注意版本差异... 目录1. 使用FORCE INDEX语法2. 使用USE INDEX语法3. 使用IGNORE IND

Spring Boot 与微服务入门实战详细总结

《SpringBoot与微服务入门实战详细总结》本文讲解SpringBoot框架的核心特性如快速构建、自动配置、零XML与微服务架构的定义、演进及优缺点,涵盖开发环境准备和HelloWorld实战... 目录一、Spring Boot 核心概述二、微服务架构详解1. 微服务的定义与演进2. 微服务的优缺点三

Python使用openpyxl读取Excel的操作详解

《Python使用openpyxl读取Excel的操作详解》本文介绍了使用Python的openpyxl库进行Excel文件的创建、读写、数据操作、工作簿与工作表管理,包括创建工作簿、加载工作簿、操作... 目录1 概述1.1 图示1.2 安装第三方库2 工作簿 workbook2.1 创建:Workboo

RabbitMQ消息总线方式刷新配置服务全过程

《RabbitMQ消息总线方式刷新配置服务全过程》SpringCloudBus通过消息总线与MQ实现微服务配置统一刷新,结合GitWebhooks自动触发更新,避免手动重启,提升效率与可靠性,适用于配... 目录前言介绍环境准备代码示例测试验证总结前言介绍在微服务架构中,为了更方便的向微服务实例广播消息,

Ubuntu 24.04启用root图形登录的操作流程

《Ubuntu24.04启用root图形登录的操作流程》Ubuntu默认禁用root账户的图形与SSH登录,这是为了安全,但在某些场景你可能需要直接用root登录GNOME桌面,本文以Ubuntu2... 目录一、前言二、准备工作三、设置 root 密码四、启用图形界面 root 登录1. 修改 GDM 配

JSONArray在Java中的应用操作实例

《JSONArray在Java中的应用操作实例》JSONArray是org.json库用于处理JSON数组的类,可将Java对象(Map/List)转换为JSON格式,提供增删改查等操作,适用于前后端... 目录1. jsONArray定义与功能1.1 JSONArray概念阐释1.1.1 什么是JSONA