论坛
商城
新人指南
地信网论坛
»
论坛
›
『软件技术应用』
›
ARCGIS
›
南沙政府应急系统之GIS一张图(arcgis api for flex)讲 ...
免费视频
|
新人指南
|
投诉删帖
|
广告合作
|
地信网APP下载
返回列表
查看:
1221
|
回复:
0
[技术交流]
南沙政府应急系统之GIS一张图(arcgis api for flex)讲解(五)地图切换以及图...
[复制链接]
sinna
sinna
当前离线
积分
1122
雷达卡
45
主题
8272
铜板
17
好友
高级工程师
高级工程师, 积分 1122, 距离下一级还需 78 积分
高级工程师, 积分 1122, 距离下一级还需 78 积分
积分
1122
发消息
发表于 2016-10-20 09:24
|
显示全部楼层
|
阅读模式
本帖最后由 sinna 于 2016-10-20 09:30 编辑
config.xml文件的配置如下:
<
widget
right
="20"
top
="55"
config
="widgets/MapSwitcher/MapSwitcherWidget.xml"
url
="widgets/MapSwitcher/MapSwitcherWidget.swf"
/>
源代码目录如下:
该模块的源代码原理解析,详细的代码在下载的开源flexviewer自带的:
大概的思路如下:MapSwitcherWidget.xml是模块的配置文件,MapSwitcherWidget.mxml是widget;
MapSwitcherWidget.xml:layerlist是图层列表里面的图层数据,excludelayer是选择排除的图层
<?
xml version="1.0"
?>
<
configuration
>
<
layerlist
visible
="true"
>
!--
<excludelayer>The Label Of Some Layer In Main Config File</excludelayer>
-->
</
layerlist
>
</
configuration
>
config.xml文件:map节点里面配置
<
operationallayers
>
<
layer
label
="企业"
type
="feature"
visible
="false"
alpha
="1.0"
url
="http://localhost:6080/arcgis/rest/services/nsBusiness/FeatureServer/7"
popupconfig
="popups/PopUp_Ecoomy.xml"
>
</
layer
>
<
layer
label
="物资装备"
type
="feature"
visible
="false"
alpha
="1.0"
url
="http://localhost:6080/arcgis/rest/services/nsBusiness/FeatureServer/2"
popupconfig
="popups/PopUp_Materials_equipment.xml"
>
</
layer
>
<
layer
label
="庇护场所"
type
="feature"
visible
="true"
alpha
="1.0"
url
="http://localhost:6080/arcgis/rest/services/nsBusiness/FeatureServer/4"
popupconfig
="popups/PopUp_Refuge.xml"
>
</
layer
>
<
layer
label
="保护对象"
type
="feature"
visible
="true"
alpha
="1.0"
url
="http://localhost:6080/arcgis/rest/services/nsBusiness/FeatureServer/5"
popupconfig
="popups/PopUp_Protection.xml"
>
</
layer
>
<
layer
label
="应急仓库"
type
="feature"
visible
="false"
alpha
="1.0"
url
="http://localhost:6080/arcgis/rest/services/nsBusiness/FeatureServer/6"
popupconfig
="popups/PopUp_Warehouse.xml"
>
</
layer
>
<
layer
label
="救援队伍"
type
="feature"
visible
="false"
alpha
="1.0"
url
="http://localhost:6080/arcgis/rest/services/nsBusiness/FeatureServer/3"
popupconfig
="popups/PopUp_Rescue_teams.xml"
>
</
layer
>
<
layer
label
="应急专家"
type
="feature"
visible
="false"
alpha
="1.0"
url
="http://localhost:6080/arcgis/rest/services/nsBusiness/FeatureServer/1"
popupconfig
="popups/PopUp_Experts.xml"
>
</
layer
>
<
layer
label
="危险隐患"
type
="feature"
visible
="true"
alpha
="1.0"
url
="http://localhost:6080/arcgis/rest/services/nsBusiness/FeatureServer/0"
popupconfig
="popups/PopUp_DangerSource.xml"
>
</
layer
>
</
operationallayers
>
这里配置图层列表的具体图层数据
<
basemaps
>
<
layer
label
="南沙地图"
type
="tiled"
visible
="true"
alpha
="1"
url
="http://localhost:6080/arcgis/rest/services/ns_new/MapServer"
/>
</
basemaps
>
这里可以配置不同的切换底图
GIS作品:百度搜索:GIS之家(https://shop116521643.taobao.com/shop/view_shop.htm);
QQ兴趣部落GIS技术交流:gis之家(http://buluo.qq.com/p/barindex.html?bid=327395);
GIS技术交流群:432512093
回复
使用道具
举报
提升卡
沉默卡
喧嚣卡
变色卡
抢沙发
显身卡
返回列表
高级模式
B
Color
Image
Link
Quote
Code
Smilies
您需要登录后才可以回帖
登录
|
立即注册
本版积分规则
发表回复
回帖后跳转到最后一页
浏览过的版块
MAPGIS
AutoCAD
电脑技术应用
MAPGIS有问有答(求助)
营业时间
早8:30 - 晚18:00
商务合作
论坛管理员
忘记密码,找回密码请发邮件到此邮箱:
快速回复
返回顶部
返回列表