一、安装arcgis server 10,安装arcgis desktop 10(非必须 可仅用server发布服务)。
安装及和谐方法见百度
二、arcgis server 服务rest服务(www.vm.com是我的 gis server服务器,arcgis比较大,安装在虚拟机中了)
1 准备地图
拿到自己的地图存放到arcgis服务器
没有地图的话可以在arcgis安装目录搜 .mxd,在ArcGIS\Desktop10.0\MapTemplates 目录有比较多的例图
2 发布服务
http://www.vm.com:8099/arcgismanager/main/login.jsf
这个地址登陆进去发布服务 用windows系统帐号登陆
发布步骤见百度 "arcgis发布rest服务"
3 拿到地图服务地址
http://www.vm.com:8399/itant/services
这个地址查看已发布的服务 这里的itant 是我的rest服务名
http://www.vm.com:8399/itant/services/test/MapServer 此地址即为 gis服务地址
三、调用地图服务
1 新建项目
新建flex项目,将“agslib-3.0-2012-06-06.swc”放入libs文件夹下,新建MXML应用程序,
(agslib-3.0 ...即 arcgis flex api,
下载地址 http://www.esri.com/apps/products/download/index.cfm?fuseaction=download.all#ArcGIS_API_for_Flex)
2 编写代码
在Application 节点 添加子节点
<esri:Map>
<esri:ArcGISDynamicMapServiceLayer url="http://www.vm.com:8399/itant/services/test/MapServer" />
</esri:Map>
运行,即可看到地图。