Packagecom.google.maps
Classpublic class MapType
Implementsflash.events.IEventDispatcher, IMapType

Defines a map type for the Map. A map type is a set of tile layers, a map projection, a tile size, and assorted other settings, such as link colors and copyrights.



Public Properties
 PropertyDefined by
  DEFAULT_MAP_TYPES : Array
[static][read-only] Provides access to the list of default map types.
MapType
  HYBRID_MAP_TYPE : IMapType
[static][read-only] Provides access to Hybrid Map Type
MapType
  NORMAL_MAP_TYPE : IMapType
[static][read-only] Provides access to Normal Map Type
MapType
  PHYSICAL_MAP_TYPE : IMapType
[static][read-only] Provides access to Physical Map Type
MapType
  SATELLITE_MAP_TYPE : IMapType
[static][read-only] Provides access to Satellite Map Type
MapType
Public Methods
 MethodDefined by
  
MapType(tileLayers:Array, projection:IProjection, name:String, options:MapTypeOptions = null)
Creates an instance of MapType object (for custom map types).
MapType
  
getAlt():String
Returns the text of the hint that is displayed when the user hovers over a control that allows selection of this map type.
MapType
  
getBoundsZoomLevel(bounds:LatLngBounds, viewSize:Point):Number
Returns the highest resolution zoom level required to show the given lat/lng bounds in a map of the given pixel size.
MapType
  
getCopyrights(bounds:LatLngBounds, zoom:Number):Array
Returns an array of copyright notices for the given bounds and zoom level.
MapType
  
getErrorMessage():String
Returns the text to be displayed if a tile fails to download.
MapType
  
getLinkColor():Number
If a control displays a link above the map, returns the color we should use.
MapType
  
getMaximumResolution(opt_point:LatLng = null):Number
Returns the zoom level of the maximum resolution supported by this map type.
MapType
  
Returns the max resolution override.
MapType
  
getMinimumResolution(opt_point:LatLng = null):Number
Returns the zoom level of the minimum resolution supported by this map type.
MapType
  
getName(opt_short:Boolean = false):String
Retrieves the map type name.
MapType
  
Retrieves the map type projection.
MapType
  
getRadius():Number
Returns the radius of the planet for which this map type is defined.
MapType
  
getSpanZoomLevel(center:LatLng, span:LatLng, viewSize:Point):Number
Returns the highest resolution zoom level required to show the given lat/lng span with the given center point.
MapType
  
getTextColor():Number
If controls are textual, returns the appropriate color to display the text.
MapType
  
getTileLayers():Array
Gets the list of tile layers for this map type.
MapType
  
getTileSize():Number
Gets the tile size for this map type.
MapType
  
getUrlArg():String
Returns a string that may be used as a URL parameter to identify this map type in permalinks to the current map view.
MapType
  
setMaxResolutionOverride(maxResolution:Number):void
Sets the max resolution override, such that, if this number is greater than the max resolution that our map type reports to us, we will use this number instead.
MapType
Protected Methods
 MethodDefined by
  
clearWrapper():void
Remove all event listeners and clear the wrapper.
MapType
Property detail
DEFAULT_MAP_TYPESproperty
DEFAULT_MAP_TYPES:Array  [read-only]

Provides access to the list of default map types.

Implementation
    public static function get DEFAULT_MAP_TYPES():Array
HYBRID_MAP_TYPEproperty 
HYBRID_MAP_TYPE:IMapType  [read-only]

Provides access to Hybrid Map Type

Implementation
    public static function get HYBRID_MAP_TYPE():IMapType
NORMAL_MAP_TYPEproperty 
NORMAL_MAP_TYPE:IMapType  [read-only]

Provides access to Normal Map Type

Implementation
    public static function get NORMAL_MAP_TYPE():IMapType
PHYSICAL_MAP_TYPEproperty 
PHYSICAL_MAP_TYPE:IMapType  [read-only]

Provides access to Physical Map Type

Implementation
    public static function get PHYSICAL_MAP_TYPE():IMapType
SATELLITE_MAP_TYPEproperty 
SATELLITE_MAP_TYPE:IMapType  [read-only]

Provides access to Satellite Map Type

Implementation
    public static function get SATELLITE_MAP_TYPE():IMapType
Constructor detail
MapType()constructor
public function MapType(tileLayers:Array, projection:IProjection, name:String, options:MapTypeOptions = null)

Creates an instance of MapType object (for custom map types).

Parameters
tileLayers:Array — Map's TileLayers.
 
projection:IProjection — Map Projection.
 
name:String — Map name.
 
options:MapTypeOptions (default = null) — Map type options.

See also

Method detail
clearWrapper()method
protected function clearWrapper():void

Remove all event listeners and clear the wrapper.

getAlt()method 
public function getAlt():String

Returns the text of the hint that is displayed when the user hovers over a control that allows selection of this map type. MapTypeControl is such a control.

Returns
String — Map type hint text.
getBoundsZoomLevel()method 
public function getBoundsZoomLevel(bounds:LatLngBounds, viewSize:Point):Number

Returns the highest resolution zoom level required to show the given lat/lng bounds in a map of the given pixel size.

Parameters
bounds:LatLngBounds — Bounds to show.
 
viewSize:Point — Size of viewport.

Returns
Number — Required zoom level for display.
getCopyrights()method 
public function getCopyrights(bounds:LatLngBounds, zoom:Number):Array

Returns an array of copyright notices for the given bounds and zoom level. Each element in this array is of type CopyrightNotice.

Parameters
bounds:LatLngBounds — Current viewport.
 
zoom:Number — Current zoom level.

Returns
Array — Array of copyright notices corresponding to this viewport.
getErrorMessage()method 
public function getErrorMessage():String

Returns the text to be displayed if a tile fails to download.

Returns
String — Error message.
getLinkColor()method 
public function getLinkColor():Number

If a control displays a link above the map, returns the color we should use. The "terms of use" link in the copyright control uses this color, for example.

Returns
Number — Link color.
getMaximumResolution()method 
public function getMaximumResolution(opt_point:LatLng = null):Number

Returns the zoom level of the maximum resolution supported by this map type. If opt_point is given, returns the maximum resolution at the given lat/lng. If opt_point is not given, returns the global maximum.

Parameters
opt_point:LatLng (default = null) — Point at which to evaluate resolution.

Returns
Number — Maximum resolution of this map type.
getMaxResolutionOverride()method 
public function getMaxResolutionOverride():Number

Returns the max resolution override.

Returns
Number — Max resolution override.
getMinimumResolution()method 
public function getMinimumResolution(opt_point:LatLng = null):Number

Returns the zoom level of the minimum resolution supported by this map type. If opt_point is given, returns the minimum resolution at the given lat/lng. If opt_point is not given, returns the global minimum.

Parameters
opt_point:LatLng (default = null) — Point at which to evaluate resolution (ignored).

Returns
Number — Minimum resolution of this map type.
getName()method 
public function getName(opt_short:Boolean = false):String

Retrieves the map type name.

Parameters
opt_short:Boolean (default = false) — Return the abbreviated name.

Returns
String — Map type name.
getProjection()method 
public function getProjection():IProjection

Retrieves the map type projection.

Returns
IProjection — Map type projection.
getRadius()method 
public function getRadius():Number

Returns the radius of the planet for which this map type is defined.

Returns
Number — Radius of the planet.
getSpanZoomLevel()method 
public function getSpanZoomLevel(center:LatLng, span:LatLng, viewSize:Point):Number

Returns the highest resolution zoom level required to show the given lat/lng span with the given center point.

Parameters
center:LatLng — Center of viewport.
 
span:LatLng — Span of viewport.
 
viewSize:Point — Size of viewport in pixels.

Returns
Number — Required zoom level for display.
getTextColor()method 
public function getTextColor():Number

If controls are textual, returns the appropriate color to display the text. The copyright control uses this color, for example.

Returns
Number — Text color.
getTileLayers()method 
public function getTileLayers():Array

Gets the list of tile layers for this map type.

Returns
Array — An array of elements of type ITileLayer, the list of tile layers.
getTileSize()method 
public function getTileSize():Number

Gets the tile size for this map type. The predefined map types' tiles are all 256 by 256 pixels in size: this function would, for these map types, return 256.

Returns
Number — Tile size.
getUrlArg()method 
public function getUrlArg():String

Returns a string that may be used as a URL parameter to identify this map type in permalinks to the current map view. This is currently only used by the maps application.

Returns
String — URL argument.
setMaxResolutionOverride()method 
public function setMaxResolutionOverride(maxResolution:Number):void

Sets the max resolution override, such that, if this number is greater than the max resolution that our map type reports to us, we will use this number instead. It represents the number of levels shown on the ZoomControl's scrollbar.

Parameters
maxResolution:Number — Value to set max resolution override to.