加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

浏览ArcGIS Online服务数据内容

发布时间:2020-12-15 03:38:59 所属栏目:百科 来源:网络整理
导读:?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:mx="library://ns.adobe.com/flex/mx" xmlns:esri="http://www.esri.com/2008/ags" pageTitle="浏览ArcGI

<?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:mx="library://ns.adobe.com/flex/mx"
               xmlns:esri="http://www.esri.com/2008/ags"
               pageTitle="浏览ArcGIS Online服务内容">
    <!--
    Description:
	实例应用程序来自ArcGIS Online上不同的map services显示,每一个service服务都能查找更多的内容
    Sample application to display different map services from ArcGIS Online,and to find out more about each service.

    Documentation:
    https://developers.arcgis.com/en/flex/api-reference/com/esri/ags/layers/ArcGISTiledMapServiceLayer.html
    https://developers.arcgis.com/en/flex/api-reference/com/esri/ags/layers/ArcGISTiledMapServiceLayer.html#tileInfo
    https://developers.arcgis.com/en/flex/api-reference/com/esri/ags/layers/supportClasses/LOD.html

    http://resources.arcgis.com/en/help/main/10.1/#/What_is_ArcGIS_Online/01w100000045000000/
    -->

    <fx:Script>
        <![CDATA[
            import mx.controls.Alert;

            protected function infoImage_clickHandler(event:MouseEvent):void
            {
               Alert.show("在ArcGIS Online数据缓存地图服务上,滑块的级别是 " + tiled.tileInfo.lods.length
                           + " " + tiled.tileInfo.height + " x " + tiled.tileInfo.width
                           + " " + tiled.tileInfo.format // + " tiles.nn" + tiled.description
                           + "nn空间参考是 " + myMap.spatialReference.wkid + "."); 
            }
        ]]>
    </fx:Script>

    <s:controlBarLayout>
        <s:VerticalLayout gap="10"
                          paddingBottom="7"
                          paddingLeft="10"
                          paddingRight="10"
                          paddingTop="7"/>
    </s:controlBarLayout>
    <s:controlBarContent>
        <s:RichText width="100%">
			这个示例展示了来世ArcGIS Online上不同的map service,点击图形,查找有关每一个service的更多信息
        </s:RichText>
        <s:Button bottom="4"
                  click="navigateToURL(new URLRequest('http://resources.arcgis.com/en/help/main/10.1/#/What_is_ArcGIS_Online/01w100000045000000/'))"
                  fontWeight="bold"
                  horizontalCenter="0"
                  label="了解更多关于ArcGIS Online"/>
    </s:controlBarContent>

    <esri:Map id="myMap" wrapAround180="true">
        <esri:ArcGISTiledMapServiceLayer id="tiled"
                                         load="myMap.lods = tiled.tileInfo.lods"
                                         url="http://server.arcgisonline.com/ArcGIS/rest/services/{servicePicker.selectedItem.toString()}/MapServer"/>
    </esri:Map>
    <s:Panel height="75"
             top="15"
             fontWeight="bold"
             horizontalCenter="0"
             title="选择一个ArcGIS Online服务">
        <s:layout>
            <s:HorizontalLayout horizontalAlign="center"
                                paddingLeft="5"
                                verticalAlign="middle"/>
        </s:layout>
        <s:DropDownList id="servicePicker"
                        width="225"
                        cornerRadius="0"
                        requireSelection="true"
                        selectedIndex="1">
            <s:ArrayList>
                <fx:String>Ocean_Basemap</fx:String>
                <fx:String>NatGeo_World_Map</fx:String>
                <fx:String>World_Imagery</fx:String>
                <fx:String>World_Street_Map</fx:String>
                <fx:String>World_Topo_Map</fx:String>
                <fx:String>World_Shaded_Relief</fx:String>
                <fx:String>Specialty/World_Navigation_Charts</fx:String>
            </s:ArrayList>
        </s:DropDownList>
        <mx:Image id="infoImage"
                  click="infoImage_clickHandler(event)"
                  source="@Embed(source='assets/info_bubble.png')"/>
    </s:Panel>

</s:Application>


弹出框的内容,可以直接访问WebService地址查看



原为摘录:https://developers.arcgis.com/flex/sample-code/arcgis-online-data.htm

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读