Packagecom.google.maps
Classpublic class MapOptions

MapOptions specifies a set of parameters for initialization of the map. Please note that there is a very specific time when you should use MapOptions and that is whilst handling a MapEvent.MAP_PREINITIALIZE event.


Example
MapEvent.MAP_PREINITIALIZE event handler
 private static function onMapPreinitialize(event:Event):void {
   var map:Map = event.target as Map;
   map.setInitOptions(
       new MapOptions({
         // Set our initial map type.
         mapType: MapType.PHYSICAL_MAP_TYPE,
         // Example of changing the order of the standard map types.
         mapTypes: [MapType.PHYSICAL_MAP_TYPE,
                    MapType.SATELLITE_MAP_TYPE,
                    MapType.HYBRID_MAP_TYPE,
                    MapType.NORMAL_MAP_TYPE],
         // Set our initial location.
         center: new LatLng(-33.9, 151.2),
         // Set our initial zoom level.
         zoom: 10
   }));
 }



Public Properties
 PropertyDefined by
  backgroundFillStyle : FillStyle
The fill style for the map background.
MapOptions
  center : LatLng
The initial map center.
MapOptions
  continuousZoom : Object
A Boolean value that indicates whether the map initially uses continuous zooming.
MapOptions
  controlByKeyboard : Object
A Boolean value that indicates whether the map initially can be controlled by the keyboard.
MapOptions
  crosshairs : Object
A Boolean value that indicates whether the map initially has crosshairs.
MapOptions
  crosshairsStrokeStyle : StrokeStyle
The stroke style for crosshairs.
MapOptions
  doubleClickMode : Object
A Number value that specifies the initial map double-click mode.
MapOptions
  dragging : Object
A Boolean value that indicates whether the map initially supports dragging.
MapOptions
  mapType : IMapType
The initial map type.
MapOptions
  mapTypes : Array
The initial map types with which the map initially is populated.
MapOptions
  mouseClickRange : Object
A Number value that indicates the maximum number of pixels that the mouse is allowed to move from where a MouseEvent.MOUSE_DOWN event occurred before any pending MapMouseEvent.CLICK and MapMouseEvent.DOUBLE_CLICK events are canceled.
MapOptions
  overlayRaising : Object
A Boolean value that indicates whether automatic raising of overlays is initially enabled.
MapOptions
  zoom : Object
A Number value that specifies the initial map zoom level.
MapOptions
Public Methods
 MethodDefined by
  
MapOptions(param:Object = null)
Constructs a new MapOptions object, optionally initializing it from an object.
MapOptions
  
toString():String
Returns a String representation of this object.
MapOptions
Property detail
backgroundFillStyleproperty
backgroundFillStyle:FillStyle  [read-write]

The fill style for the map background.

Implementation
    public function get backgroundFillStyle():FillStyle
    public function set backgroundFillStyle(value:FillStyle):void
centerproperty 
center:LatLng  [read-write]

The initial map center.

Implementation
    public function get center():LatLng
    public function set center(value:LatLng):void

See also

continuousZoomproperty 
continuousZoom:Object  [read-write]

A Boolean value that indicates whether the map initially uses continuous zooming.

Implementation
    public function get continuousZoom():Object
    public function set continuousZoom(value:Object):void

See also

controlByKeyboardproperty 
controlByKeyboard:Object  [read-write]

A Boolean value that indicates whether the map initially can be controlled by the keyboard.

Implementation
    public function get controlByKeyboard():Object
    public function set controlByKeyboard(value:Object):void

See also

crosshairsproperty 
crosshairs:Object  [read-write]

A Boolean value that indicates whether the map initially has crosshairs.

Implementation
    public function get crosshairs():Object
    public function set crosshairs(value:Object):void

See also

crosshairsStrokeStyleproperty 
crosshairsStrokeStyle:StrokeStyle  [read-write]

The stroke style for crosshairs.

Implementation
    public function get crosshairsStrokeStyle():StrokeStyle
    public function set crosshairsStrokeStyle(value:StrokeStyle):void
doubleClickModeproperty 
doubleClickMode:Object  [read-write]

A Number value that specifies the initial map double-click mode.

Implementation
    public function get doubleClickMode():Object
    public function set doubleClickMode(value:Object):void

See also

draggingproperty 
dragging:Object  [read-write]

A Boolean value that indicates whether the map initially supports dragging.

Implementation
    public function get dragging():Object
    public function set dragging(value:Object):void

See also

mapTypeproperty 
mapType:IMapType  [read-write]

The initial map type. Note that if this is null then Google's default map type will be used. Set this if you wish to override this selection.

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

See also

mapTypesproperty 
mapTypes:Array  [read-write]

The initial map types with which the map initially is populated. Note that if this is null the Google's default list of map types will be used. Set this if you wish to override this set.

Implementation
    public function get mapTypes():Array
    public function set mapTypes(value:Array):void

See also

mouseClickRangeproperty 
mouseClickRange:Object  [read-write]

A Number value that indicates the maximum number of pixels that the mouse is allowed to move from where a MouseEvent.MOUSE_DOWN event occurred before any pending MapMouseEvent.CLICK and MapMouseEvent.DOUBLE_CLICK events are canceled. Generally, it is undesirable for a MapMouseEvent.CLICK event to occur after dragging the map; this property enforces this.

Implementation
    public function get mouseClickRange():Object
    public function set mouseClickRange(value:Object):void
overlayRaisingproperty 
overlayRaising:Object  [read-write]

A Boolean value that indicates whether automatic raising of overlays is initially enabled.

Implementation
    public function get overlayRaising():Object
    public function set overlayRaising(value:Object):void

See also

zoomproperty 
zoom:Object  [read-write]

A Number value that specifies the initial map zoom level.

Implementation
    public function get zoom():Object
    public function set zoom(value:Object):void

See also

Constructor detail
MapOptions()constructor
public function MapOptions(param:Object = null)

Constructs a new MapOptions object, optionally initializing it from an object.

Parameters
param:Object (default = null) — An initialization object that contains a set of initial values for the MapOptions instance.

Example
Creating a MapOptions instance that corresponds to the default configuration for creating a map.
   var options:MapOptions = new MapOptions({
     backgroundFillStyle: {
       alpha: Alpha.OPAQUE,
       color: Color.GRAY14
     },
     crosshairs: false,
     crosshairsStrokeStyle: {
       thickness: 1,
       color: Color.BLACK,
       alpha: 1,
       pixelHinting: false
     },
     controlByKeyboard: false,
     overlayRaising: true,
     doubleClickMode: MapAction.ACTION_PAN_ZOOM_IN,
     dragging: true,
     continuousZoom: false,
     mapType: null,
     mapTypes: null,
     center: new LatLng(0, 0),
     zoom: 1
     mouseClickRange: 2
   });

Method detail
toString()method
public function toString():String

Returns a String representation of this object.

Returns
String — String representation of this object.