topical media & game development

talk show tell print

sample-flex-umap-simple.mx

sample-flex-umap-simple.mx [swf] flex


  <?xml version="1.0" encoding="utf-8"?> 
  <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" 
     creationComplete="onCreationComplete(event)" width="100%"> 
     <mx:Script> 
     <![CDATA[ 
      
     import com.afcomponents.umap.gui.*; 
     import com.afcomponents.umap.core.UMap; 
     import mx.core.UIComponent; 
      
     private var map:UMap; 
      
     public function onCreationComplete(event:Event) : void 
     { 
        var ref:UIComponent = new UIComponent(); 
          
        map = new UMap(); 
        map.setSize(300, 300); 
          
        ref.addChild(map); 
        mapCanvas.addChild(ref); 
        ref.focusManager.deactivate(); 
          
           map.addControl(new MapTypeControl()); 
           map.addControl(new ZoomControl()); 
           map.addControl(new PositionControl()); 
     } 
     ]]> 
     </mx:Script> 
      
     <mx:VBox> 
        <mx:Canvas id="mapCanvas" width="400" height="300" backgroundColor="#352D69" x="6" y="10"/> 
     </mx:VBox> 
  </mx:Application>
  
  


(C) Æliens 27/08/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.