日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

API 2.0Switching Basemaps

發布時間:2025/5/22 编程问答 20 豆豆
生活随笔 收集整理的這篇文章主要介紹了 API 2.0Switching Basemaps 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

http://help.arcgis.com/en/webapi/flex/samples/index.html

<Mapping>---->Switching Basemaps

?

<?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
="Toggle?between?Map?Services">
????
<!--
????This?sample?shows?one?way?of?allowing?users?to?change?between?different?basemaps.
????It?also?ensures?that?the?levels?of?detail?(LOD)?are?updated?based?on?which?basemap?is?selected.
????If?all?base?maps?have?the?same?LODs,?you?wouldn't?need?the?layerShowHandler?function.
????
-->
????
<fx:Script>
????????
<![CDATA[
????????????import?com.esri.ags.geometry.MapPoint;
????????????import?com.esri.ags.layers.TiledMapServiceLayer;
????????????
????????????import?mx.events.FlexEvent;
????????????
????????????private?function?layerShowHandler(event:FlexEvent):void
????????????{
????????????????//?update?the?LODs/zoomslider?to?use/show?the?levels?for?the?selected?base?map
????????????????var?tiledLayer:TiledMapServiceLayer?=?event.target?as?TiledMapServiceLayer;
????????????????myMap.lods?=?tiledLayer.tileInfo.lods;
????????????}
????????
]]>
????
</fx:Script>
????
????
<esri:Map?id="myMap"
??????????????level
="4"
??????????????load
="myMap.centerAt(new?MapPoint(-11713000,?4822000))">
????????
<esri:ArcGISTiledMapServiceLayer?show="layerShowHandler(event)"
?????????????????????????????????????????url
="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"
?????????????????????????????????????????visible
="{bb.selectedIndex?==?0}"/>
????????
<esri:ArcGISTiledMapServiceLayer?show="layerShowHandler(event)"
?????????????????????????????????????????url
="http://server.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer"
?????????????????????????????????????????visible
="{bb.selectedIndex?==?1}"/>
????????
<esri:ArcGISTiledMapServiceLayer?show="layerShowHandler(event)"
?????????????????????????????????????????url
="http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"
?????????????????????????????????????????visible
="{bb.selectedIndex?==?2}"/>
????
</esri:Map>
????
<s:ButtonBar?id="bb"
?????????????????right
="5"?top="5"
?????????????????requireSelection
="true">
????????
<s:dataProvider>
????????????
<s:ArrayList>
????????????????
<fx:String>Streets</fx:String>
????????????????
<fx:String>U.S.?Topo</fx:String>
????????????????
<fx:String>Imagery</fx:String>
????????????
</s:ArrayList>
????????
</s:dataProvider>
????
</s:ButtonBar>
</s:Application>

顯示:

轉載于:https://www.cnblogs.com/pandy/archive/2011/06/10/2077512.html

總結

以上是生活随笔為你收集整理的API 2.0Switching Basemaps的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。