zoukankan      html  css  js  c++  java
  • ArcGIS For Flex学习之Mapping---Add LODs for extra zooming

     

                                                            效果1                                                                                          放大到1:4500后的效果

     1 <?xml version="1.0" encoding="utf-8"?>
     2 <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
     3                xmlns:s="library://ns.adobe.com/flex/spark"
     4                xmlns:esri="http://www.esri.com/2008/ags"
     5                pageTitle="Adding LODs to provide more zoom levels">
     6 
     7     <fx:Script>
     8         <![CDATA[
     9             import com.esri.ags.layers.supportClasses.LOD;
    10 
    11             private function addLODs():void
    12             {
    13                 // make sure the resolution makes sense for tile schema of the base layer
    14                 // both resolution and scale are required fields
    15                 // About NaN: The lods are automatically sorted based on scale, so setting level isn't necessary.
    16                 var lods:Array = myMap.lods;
    17                 lods.push(new LOD(NaN, 0.6, 3000));
    18                 lods.push(new LOD(NaN, 0.3, 1500));
    19                 lods.push(new LOD(NaN, 0.1, 500));
    20                 myMap.lods = lods;
    21             }
    22         ]]>
    23     </fx:Script>
    24 
    25     <s:controlBarContent>
    26         <s:RichText width="100%">
    27             Zoom in past 1:4,500 and you'll notice the basemap switching.
    28             When zoomed out, ArcGIS Online Street Map is used, but when zoomed in a dynamic service for Louisville, KY will display parcels, landuse, and planning.
    29         </s:RichText>
    30     </s:controlBarContent>
    31 
    32     <esri:Map id="myMap" load="addLODs()">
    33         <esri:extent>
    34             <esri:Extent xmin="-9551990" ymin="4617767" xmax="-9550520" ymax="4618606">
    35                 <esri:SpatialReference wkid="102100"/>
    36                 <!-- same as tiled map service below -->
    37             </esri:Extent>
    38         </esri:extent>
    39         <esri:ArcGISTiledMapServiceLayer maxScale="4500" url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>
    40         <esri:ArcGISDynamicMapServiceLayer minScale="4500" url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Louisville/LOJIC_LandRecords_Louisville/MapServer"/>
    41     </esri:Map>
    42 
    43 </s:Application>
  • 相关阅读:
    java集合
    linux网络配置(iproute2)
    linux网络配置(ifcfg)
    linuxshell编程之数组和字符串处理工具
    linux网络配置文件
    linux 内核版本和发行版本区别
    linux 相关零碎知识整理
    linux计算机网络基础
    linux bash编程之函数和循环控制
    linux bash shell编程之参数变量和流程控制。
  • 原文地址:https://www.cnblogs.com/wicked-fly/p/4040382.html
Copyright © 2011-2022 走看看