| Package | com.igorcosta |
| Class | public class GoogleFlexMap |
| Inheritance | GoogleFlexMap 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 Syntax
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
| Property | Defined 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
| 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 | ||
| Method | Defined by | ||
|---|---|---|---|
|
Constructor
| GoogleFlexMap | ||
| Method | Defined by | ||
|---|---|---|---|
|
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
Enable the override to extends the Map and set the site according the user's request
| GoogleFlexMap | ||
| enableContinuosZoom | property |
enableContinuosZoom:Boolean [read-write]Enable the Zoom continuously over map.
The default value is false.
public function get enableContinuosZoom():Boolean
public function set enableContinuosZoom(value:Boolean):void
| key | property |
key:String [read-write]The require key generated by google, you have to specify to work.
The default value is ''.
public function get key():String
public function set key(value:String):void
| latitude | property |
latitude:Number [read-write]Set the Latitude for Map
The default value is 37.0625.
public function get latitude():Number
public function set latitude(value:Number):void
| longitude | property |
longitude:Number [read-write]Set the Longitude for Map
The default value is -95.677068.
public function get longitude():Number
public function set longitude(value:Number):void
| mapType | property |
mapType:int [read-write]Definie a Map Type
The default value is 0.
public function get mapType():int
public function set mapType(value:int):void
var _myMap:GoogleFlexMap = new GoogleFlexMap();
_myMap.mapType = 3;
addChild(_myMap);
// sets type of map to Physical
| mousewheelZoomEnabled | property |
mousewheelZoomEnabled:Boolean [read-write]Enable the Mousewheel to scroll zoom over map.
The default value is false.
public function get mousewheelZoomEnabled():Boolean
public function set mousewheelZoomEnabled(value:Boolean):void
| showPositionControl | property |
showPositionControl:Boolean [read-write]Shows the default Position control for the Map.
The default value is false.
public function get showPositionControl():Boolean
public function set showPositionControl(value:Boolean):void
| showTypeControl | property |
showTypeControl:Boolean [read-write]Shows the default Type control for the Map.
The default value is false.
public function get showTypeControl():Boolean
public function set showTypeControl(value:Boolean):void
| showZoomControl | property |
showZoomControl:Boolean [read-write]Shows the default Zoom control for the Map.
The default value is false.
public function get showZoomControl():Boolean
public function set showZoomControl(value:Boolean):void
| ZoomLevel | property |
ZoomLevel:Number [read-write]Get the ZoolLevel of Map
The default value is 10.
public function get ZoomLevel():Number
public function set ZoomLevel(value:Number):void
var _myMap:GoogleFlexMap = new GoogleFlexMap();
_myMap.ZoomLevel = 15;
addChild(_myMap);
// sets level starts to 15
| GoogleFlexMap | () | constructor |
| updateDisplayList | () | method |
protected override function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):voidEnable the override to extends the Map and set the site according the user's request
ParametersunscaledWidth:Number |
|
unscaledHeight:Number |