focusPoint:MapPoint (default = null) �?? The map point that should not move in relation to the screen.
<?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"> <fx:Declarations> <esri:Extent id="initialExtent" xmin="-17731" ymin="6710077" xmax="-12495" ymax="6712279"> <esri:SpatialReference wkid="102100"/> </esri:Extent> </fx:Declarations> <fx:Script> <![CDATA[ import com.esri.ags.Graphic; import com.esri.ags.geometry.WebMercatorMapPoint; import com.esri.ags.symbols.SimpleMarkerSymbol; private function placePoint(evt:Event):void{ var wmp:WebMercatorMapPoint = new WebMercatorMapPoint(-0.088205,51.503306); var myGraphicMarker:Graphic = new Graphic(wmp, new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_DIAMOND, 22, 0x009933)); myGraphicsLayer.add(myGraphicMarker); //If you want the map to center at the point you created use the next line. myMap.centerAt(wmp); //Delay the map zoom by 1 second var timeoutExample:uint = setTimeout( function():void{ myMap.zoom(1 / 16, wmp); }, 1000 ); } ]]> </fx:Script> <esri:Map id = "myMap" extent="{initialExtent}" wrapAround180="false" x="52" y="209" width="383" height="221"> <esri:ArcGISTiledMapServiceLayer url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/> <esri:GraphicsLayer id="myGraphicsLayer"/> </esri:Map> <s:Button click="placePoint(event)" label="test" /> </s:Application>
myMap.zoom(1/16, myGraphicMarker.geometry as WebMercatorMapPoint);
myMap.zoom(1 / 16, myGraphicMarker.geometry as MapPoint);
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.