<?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" width="100%" height="100%"> <fx:Script> <![CDATA[ import com.esri.ags.events.LayerEvent; import com.esri.ags.events.PanEvent; private var cntr:int = 0; protected function map1_panEndHandler(event:PanEvent):void { trace('in pan end, ' + cntr++); } protected function arcgistiledmapservicelayer1_loadHandler(event:LayerEvent):void { map.extent = DCExtent; } ]]> </fx:Script> <fx:Declarations> <esri:Extent id="londonExtent" xmin="-149225.70420389052" ymin="6661356.208762923" xmax="43242.73301825692" ymax="6800930.222411709"> <esri:SpatialReference wkid="102100"/> </esri:Extent> <esri:Extent id="DCExtent" xmin="-8600149.1564566" ymin="4687554.362114532" xmax="-8552032.047151148" ymax="4722447.865526669"> <esri:SpatialReference wkid="102100"/> </esri:Extent> </fx:Declarations> <esri:Map id="map" extent="{londonExtent}" panEnd="map1_panEndHandler(event)" wrapAround180="true"> <esri:ArcGISTiledMapServiceLayer id="lyr" load="arcgistiledmapservicelayer1_loadHandler(event)" url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/> </esri:Map> </s:Application>
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.