Packagecom.igorcosta
Classpublic class GoogleFlexMap
InheritanceGoogleFlexMap Inheritance mx.core.UIComponent

The Google Flex Map component is a control that exposes the usage of Google Maps AS3 API The control is pretty simple to use, as long as with some simple access for his properties

Why?

Well Google did a great job exposing the API for developers to access their services using provide by Flash Player platform As a good developer you might need to extends and add more options to the API.

And Google didn't any specify component for Flex developers, this component intend to help and demonstrate how easy is to use it. Just drag the Control, put your key developer and than that's all.

How to use? Flex Developers use's

MXML Syntaxexpanded Hide MXML Syntax

The <mx:ComboBox> tag inherits all the tag attributes of its superclass, and adds the following tag attributes:

  <mx:GoogleFlexMap
    Properties
    key="the key generated by google"
    mapType="0" 
    mousewheelZoomEnabled="false" 
    ZoomLevel="6" 
    width="800" 
    height="500" 
    showTypeControl="false" 
    showZoomControl="false" 
    showPositionControl="false"
  
   Events
   I used the Clinical and default Event Class for Events to not interrupt of soomth work as Flex/Flash developers to use it.
 

Default MXML Propertykey



Public Properties
 PropertyDefined by
  enableContinuosZoom : Boolean
Enable the Zoom continuously over map.
GoogleFlexMap
  key : String
The require key generated by google, you have to specify to work.
GoogleFlexMap
  latitude : Number
Set the Latitude for Map
GoogleFlexMap
  longitude : Number
Set the Longitude for Map
GoogleFlexMap
  mapType : int
Definie a Map Type
    • 0 to Normal Map.
      1 to Satellite Map.
      2 to Hybrid Map.
      3 to Physical Map.
  • GoogleFlexMap
      mousewheelZoomEnabled : Boolean
    Enable the Mousewheel to scroll zoom over map.
    GoogleFlexMap
      showPositionControl : Boolean
    Shows the default Position control for the Map.
    GoogleFlexMap
      showTypeControl : Boolean
    Shows the default Type control for the Map.
    GoogleFlexMap
      showZoomControl : Boolean
    Shows the default Zoom control for the Map.
    GoogleFlexMap
      ZoomLevel : Number
    Get the ZoolLevel of Map
    GoogleFlexMap
    Public Methods
     MethodDefined by
      
    Constructor
    GoogleFlexMap
    Protected Methods
     MethodDefined by
      
    updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
    Enable the override to extends the Map and set the site according the user's request
    GoogleFlexMap
    Property detail
    enableContinuosZoomproperty
    enableContinuosZoom:Boolean  [read-write]

    Enable the Zoom continuously over map.

    The default value is false.

    Implementation
        public function get enableContinuosZoom():Boolean
        public function set enableContinuosZoom(value:Boolean):void
    keyproperty 
    key:String  [read-write]

    The require key generated by google, you have to specify to work.

    The default value is ''.

    Implementation
        public function get key():String
        public function set key(value:String):void
    latitudeproperty 
    latitude:Number  [read-write]

    Set the Latitude for Map

    The default value is 37.0625.

    Implementation
        public function get latitude():Number
        public function set latitude(value:Number):void
    longitudeproperty 
    longitude:Number  [read-write]

    Set the Longitude for Map

    The default value is -95.677068.

    Implementation
        public function get longitude():Number
        public function set longitude(value:Number):void
    mapTypeproperty 
    mapType:int  [read-write]

    Definie a Map Type

    • 0 to Normal Map.
      1 to Satellite Map.
      2 to Hybrid Map.
      3 to Physical Map.
  • The default value is 0.

    Implementation
        public function get mapType():int
        public function set mapType(value:int):void

    Example
    The following code set the Type of Map:
         var _myMap:GoogleFlexMap = new GoogleFlexMap();
                _myMap.mapType = 3;
                addChild(_myMap);
                // sets type of map to Physical 
       

    mousewheelZoomEnabledproperty 
    mousewheelZoomEnabled:Boolean  [read-write]

    Enable the Mousewheel to scroll zoom over map.

    The default value is false.

    Implementation
        public function get mousewheelZoomEnabled():Boolean
        public function set mousewheelZoomEnabled(value:Boolean):void
    showPositionControlproperty 
    showPositionControl:Boolean  [read-write]

    Shows the default Position control for the Map.

    The default value is false.

    Implementation
        public function get showPositionControl():Boolean
        public function set showPositionControl(value:Boolean):void
    showTypeControlproperty 
    showTypeControl:Boolean  [read-write]

    Shows the default Type control for the Map.

    The default value is false.

    Implementation
        public function get showTypeControl():Boolean
        public function set showTypeControl(value:Boolean):void
    showZoomControlproperty 
    showZoomControl:Boolean  [read-write]

    Shows the default Zoom control for the Map.

    The default value is false.

    Implementation
        public function get showZoomControl():Boolean
        public function set showZoomControl(value:Boolean):void
    ZoomLevelproperty 
    ZoomLevel:Number  [read-write]

    Get the ZoolLevel of Map

    The default value is 10.

    Implementation
        public function get ZoomLevel():Number
        public function set ZoomLevel(value:Number):void

    Example
    The following code set the zoom level of Map:
         var _myMap:GoogleFlexMap = new GoogleFlexMap();
                _myMap.ZoomLevel = 15;
                addChild(_myMap);
                // sets level starts to 15 
       

    Constructor detail
    GoogleFlexMap()constructor
    public function GoogleFlexMap()

    Constructor

    See also

    Method detail
    updateDisplayList()method
    protected override function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void

    Enable the override to extends the Map and set the site according the user's request

    Parameters
    unscaledWidth:Number
     
    unscaledHeight:Number