Package | com.google.maps.interfaces |
Interface | public interface IMap extends IWrappableEventDispatcher, flash.events.IEventDispatcher, IWrappable |
Implementors | Map, MapType |
Property | Defined by | ||
---|---|---|---|
![]() | interfaceChain : Array
List of interfaces for wrapping this object.
| IWrappable | |
MERCATOR_PROJECTION : IProjection
[read-only]
Retrieves Mercator projection.
| IMap | ||
overlayRaising : Boolean
Set to
true to enable raising of overlays upon mouse-over. | IMap | ||
![]() | wrapper : Object
Instance of the cross-domain wrapper for this object.
| IWrappable |
Method | Defined by | ||
---|---|---|---|
addControl(control:IControl):void
Registers a new control.
| IMap | ||
addMapType(newMapType:IMapType):void
Registers a new map type.
| IMap | ||
addOverlay(overlay:IOverlay):void
Adds an overlay to the map.
| IMap | ||
clearControls():void
Removes all controls from the map.
| IMap | ||
clearOverlays():void
Removes all overlays from the map.
| IMap | ||
closeInfoWindow():Boolean
Closes the information window.
| IMap | ||
continuousZoomEnabled():Boolean
Checks whether continuous zoom is enabled.
| IMap | ||
controlByKeyboardEnabled():Boolean
Checks whether control by keyboard is enabled.
| IMap | ||
crosshairsEnabled():Boolean
Checks whether center crosshairs are enabled.
| IMap | ||
disableContinuousZoom():void
Disables continuous smooth zooming.
| IMap | ||
disableControlByKeyboard():void
Disables control by keyboard.
| IMap | ||
disableCrosshairs():void
Disables the center crosshairs.
| IMap | ||
disableDragging():void
Disables dragging of the map.
| IMap | ||
disableScrollWheelZoom():void
Disables zooming using a mouse's scroll wheel.
| IMap | ||
draggingEnabled():Boolean
Checks whether dragging of the map is enabled.
| IMap | ||
enableContinuousZoom():void
Enables continuous smooth zooming.
| IMap | ||
enableControlByKeyboard():void
Enables control by keyboard.
| IMap | ||
enableCrosshairs():void
Enables the center crosshairs.
| IMap | ||
enableDragging():void
Enables dragging of the map.
| IMap | ||
enableScrollWheelZoom():void
Enables zooming using a mouse's scroll wheel.
| IMap | ||
fromLatLngToPoint(latLng:LatLng, opt_zoom:Number):Point
Returns x,y coordinates of specified lat, lng and zoom relative to the
origin of the map's projection
(the origin is the top left corner of the top left tile of the map for
the specified map zoom level).
| IMap | ||
fromLatLngToViewport(latLng:LatLng, opt_disablewrap:Boolean = false):Point
Returns the pixel coordinates for the specified latLng location
in the coordinate system of the map's view port ([0,0] being the top
left corner of the map object).
| IMap | ||
fromPointToLatLng(pos:Point, opt_zoom:Number, opt_nowrap:Boolean = false):LatLng
Returns lat,lng coordinates of specified x, y and zoom.
| IMap | ||
fromViewportToLatLng(pos:Point, opt_nowrap:Boolean = false):LatLng
Returns the lat-lng of the point at the given coordinates in the map's
view port (the top left corner of the map object).
| IMap | ||
![]() |
getBaseEventDispatcher():Object
Retrieves the base event dispatcher object that allows access to event
dispatching capability for cross-domain objects.
| IWrappableEventDispatcher | |
getBoundsZoomLevel(bounds:LatLngBounds):Number
Returns the highest resolution zoom level at which the given rectangular
region fits in the map view.
| IMap | ||
Retrieves coordinates of the center in the map view control.
| IMap | ||
Retrieves the current map type.
| IMap | ||
getDisplayObject():DisplayObject
Retrieves the display object that represents the map.
| IMap | ||
getDoubleClickMode():Number
Get the mouse double click mode.
| IMap | ||
getImplementationVersion():String
Gets the version of the implementation library SWF.
| IMap | ||
Returns the the visible rectangular region of the map view in
geographical coordinates.
| IMap | ||
getMapTypes():Array
Retrieves the list of the map types available for the location.
| IMap | ||
Retrieves the maximum zoom level.
| IMap | ||
Retrieves the minimum zoom level.
| IMap | ||
Retrieves the full set of options used by the map.
| IMap | ||
Retrieves the pane manager for the map.
| IMap | ||
Returns the projection being applied to the map.
| IMap | ||
getSize():Point
Retrieves the map view size.
| IMap | ||
getZoom():Number
Retrieves the map zoom level.
| IMap | ||
isLoaded():Boolean
Checks whether the map has been initialized.
| IMap | ||
Opens a simple information window at the given point.
| IMap | ||
panBy(distance:Point):void
Starts a pan animation by the given distance in pixels.
| IMap | ||
Pans the map to the specified centre location.
| IMap | ||
removeControl(control:IControl):void
Removes a control from the map.
| IMap | ||
removeMapType(oldMapType:IMapType):void
Removes a registered map type.
| IMap | ||
removeOverlay(overlay:IOverlay):void
Removes an overlay from the map.
| IMap | ||
returnToSavedPosition():void
Returns map to the saved position.
| IMap | ||
savePosition():void
Stores the current map position and zoom level for later recall
by returnToSavedPosition.
| IMap | ||
scrollWheelZoomEnabled():Boolean
Checks whether scroll wheel zooming is enabled.
| IMap | ||
Changes the centre point of the map.
| IMap | ||
setDoubleClickMode(val:Number):void
Set the mouse double click mode.
| IMap | ||
setMapType(mapType:IMapType):void
Changes the map type for the map.
| IMap | ||
setSize(newSize:Point):void
Sets the size of the map view.
| IMap | ||
setZoom(level:Number, opt_doContinuousZoom:Boolean = false):void
Changes the zoom level for the map view control.
| IMap | ||
unload():void
Removes the map from its parent and attempts to unload it to free up
memory associated with the map.
| IMap | ||
zoomIn(opt_latlng:LatLng = null, opt_doCenter:Boolean = false, opt_doContinuousZoom:Boolean = false):void
Zooms in the map by one zoom level if possible.
| IMap | ||
Zooms out the map by one zoom level if possible.
| IMap |
MERCATOR_PROJECTION | property |
MERCATOR_PROJECTION:IProjection
[read-only]Retrieves Mercator projection.
Implementation public function get MERCATOR_PROJECTION():IProjection
overlayRaising | property |
overlayRaising:Boolean
[read-write]
Set to true
to enable raising of overlays upon mouse-over.
If enabled then a mouse-over event over an overlay that supports it (only
markers do at present) will bring that overlay to the top.
By default overlay raising is enabled.
public function get overlayRaising():Boolean
public function set overlayRaising(value:Boolean):void
addControl | () | method |
public function addControl(control:IControl):void
Registers a new control. This can be called before the MAP_READY event has been received.
Parameterscontrol:IControl — New control to register.
|
public class MyMap extends Map { public function MyMap() { super(); addEventListener(MapEvent.MAP_READY, onMapReady); addControl(new MapTypeControl()); } }
addMapType | () | method |
public function addMapType(newMapType:IMapType):void
Registers a new map type.
ParametersnewMapType:IMapType — New map type to register.
|
addOverlay | () | method |
public function addOverlay(overlay:IOverlay):void
Adds an overlay to the map.
Parametersoverlay:IOverlay — The overlay to be added to the map.
|
var marker:Marker = new Marker( new LatLng(48.858842, 2.346997), new MarkerOptions({ fillRGB: 0x004000, name: "Paris, France", description: "City on the Seine" })); map.addOverlay(marker);
clearControls | () | method |
public function clearControls():void
Removes all controls from the map.
clearOverlays | () | method |
public function clearOverlays():void
Removes all overlays from the map.
closeInfoWindow | () | method |
public function closeInfoWindow():Boolean
Closes the information window.
ReturnsBoolean — true iff there was an info window to close.
|
continuousZoomEnabled | () | method |
public function continuousZoomEnabled():Boolean
Checks whether continuous zoom is enabled.
ReturnsBoolean — true if continuous zoom is enabled.
|
controlByKeyboardEnabled | () | method |
public function controlByKeyboardEnabled():Boolean
Checks whether control by keyboard is enabled.
ReturnsBoolean — true if control by keyboard is enabled.
|
crosshairsEnabled | () | method |
public function crosshairsEnabled():Boolean
Checks whether center crosshairs are enabled.
ReturnsBoolean — true if center crosshairs are enabled.
|
disableContinuousZoom | () | method |
public function disableContinuousZoom():void
Disables continuous smooth zooming.
disableControlByKeyboard | () | method |
public function disableControlByKeyboard():void
Disables control by keyboard.
disableCrosshairs | () | method |
public function disableCrosshairs():void
Disables the center crosshairs.
disableDragging | () | method |
public function disableDragging():void
Disables dragging of the map.
disableScrollWheelZoom | () | method |
public function disableScrollWheelZoom():void
Disables zooming using a mouse's scroll wheel.
draggingEnabled | () | method |
public function draggingEnabled():Boolean
Checks whether dragging of the map is enabled.
ReturnsBoolean — true if dragging of the map is enabled.
|
enableContinuousZoom | () | method |
public function enableContinuousZoom():void
Enables continuous smooth zooming.
enableControlByKeyboard | () | method |
public function enableControlByKeyboard():void
Enables control by keyboard.
enableCrosshairs | () | method |
public function enableCrosshairs():void
Enables the center crosshairs.
enableDragging | () | method |
public function enableDragging():void
Enables dragging of the map.
enableScrollWheelZoom | () | method |
public function enableScrollWheelZoom():void
Enables zooming using a mouse's scroll wheel.
fromLatLngToPoint | () | method |
public function fromLatLngToPoint(latLng:LatLng, opt_zoom:Number):Point
Returns x,y coordinates of specified lat, lng and zoom relative to the origin of the map's projection (the origin is the top left corner of the top left tile of the map for the specified map zoom level).
ParameterslatLng:LatLng — latLng location on the map
|
|
opt_zoom:Number — target zoom level (defaults to current zoom level)
|
Point — Point object with x and y properties
|
fromLatLngToViewport | () | method |
public function fromLatLngToViewport(latLng:LatLng, opt_disablewrap:Boolean = false):Point
Returns the pixel coordinates for the specified latLng location in the coordinate system of the map's view port ([0,0] being the top left corner of the map object).
ParameterslatLng:LatLng — LatLng coordinate of the point on the map.
|
|
opt_disablewrap:Boolean (default = false ) — Whether wrapping of the map around +180/-180 degree
longtitude is disabled.Depending on the value of this parameter, the call may return the same or two different pixel coordinates depending on whether or not the shortest path between the current centre of the map and the target location crosses the +180/-180 degree longtitude wrap-around. For example, the map is currently centred at Sydney, Australia [LatLng(-33.857, 151.215)] and the location passed into this call is San Francisco, USA [LatLng(37.779, -122.420)] This call will return two different pixel coordinates for the two values of the opt_disablewrap parameter. By default (opt_disablewrap set to false), the map will wrap the around the +180/-180 degree longtitude to return the pixel coordinate that will lie to the right of the current centre of the map (picking the shorter path from Sydney to San Francisco that goes across the Pacific Ocean). If the wrapping of the map is disabled (opt_disablewrap set to true), the pixel coordinate returned by the call will be to the left of the current centre (the longer path from Sydney to San Francisco going across the Indian and Atlantic Oceans). The value returned by the call will be the same for either value of opt_disablewrap parameter if the shorter path from the current centre of the map to the target point does not cross the +180/-180 degree longtitude (such as in case where the current centre of the map is Sydney, Australia while the target location is Tokyo, Japan). |
Point |
fromPointToLatLng | () | method |
public function fromPointToLatLng(pos:Point, opt_zoom:Number, opt_nowrap:Boolean = false):LatLng
Returns lat,lng coordinates of specified x, y and zoom. The coordinates are relative to the origin of the map's projection (the top left corner of the top left tile of the map for the specified zoom level).
Parameterspos:Point — x, y of a point
|
|
opt_zoom:Number — target zoom level (defaults to the current zoom level)
|
|
opt_nowrap:Boolean (default = false ) — Do not wrap longitudes outside of [-180, 180)
|
LatLng —
LatLng object with lat and lng
|
fromViewportToLatLng | () | method |
public function fromViewportToLatLng(pos:Point, opt_nowrap:Boolean = false):LatLng
Returns the lat-lng of the point at the given coordinates in the map's view port (the top left corner of the map object).
Parameterspos:Point — Coordinates in the map's view port.
|
|
opt_nowrap:Boolean (default = false ) — Do not wrap longitudes outside of [-180, 180)
|
LatLng —
LatLng of the specified view port coordinates.
|
getBoundsZoomLevel | () | method |
public function getBoundsZoomLevel(bounds:LatLngBounds):Number
Returns the highest resolution zoom level at which the given rectangular region fits in the map view. The zoom level is computed for the currently selected map type.
Parametersbounds:LatLngBounds — Bounds to show.
|
Number — Required zoom level to show these bounds.
|
getCenter | () | method |
public function getCenter():LatLng
Retrieves coordinates of the center in the map view control.
ReturnsLatLng —
LatLng for the center of the map view control.
|
getCurrentMapType | () | method |
public function getCurrentMapType():IMapType
Retrieves the current map type.
ReturnsIMapType —
Current map type.
|
getDisplayObject | () | method |
public function getDisplayObject():DisplayObject
Retrieves the display object that represents the map.
ReturnsDisplayObject — Map display object
|
getDoubleClickMode | () | method |
public function getDoubleClickMode():Number
Get the mouse double click mode.
ReturnsNumber — mouse double click mode (one of the MapAction constants).
|
See also
getImplementationVersion | () | method |
public function getImplementationVersion():String
Gets the version of the implementation library SWF.
ReturnsString — Version of the implementation library SWF.
|
getLatLngBounds | () | method |
public function getLatLngBounds():LatLngBounds
Returns the the visible rectangular region of the map view in geographical coordinates.
ReturnsLatLngBounds —
Lat-Lng for the visible map rectangle.
|
getMapTypes | () | method |
public function getMapTypes():Array
Retrieves the list of the map types available for the location.
ReturnsArray — Array of available map types
|
getMaxZoomLevel | () | method |
public function getMaxZoomLevel(opt_mapType:IMapType = null, opt_point:LatLng = null):Number
Retrieves the maximum zoom level.
Parametersopt_mapType:IMapType (default = null ) — Map type used to determine maximum resolution.
|
|
opt_point:LatLng (default = null ) — Point for which to get the maximum zoom.
|
Number — The maximum zoom level.
|
getMinZoomLevel | () | method |
public function getMinZoomLevel(opt_mapType:IMapType = null, opt_point:LatLng = null):Number
Retrieves the minimum zoom level.
Parametersopt_mapType:IMapType (default = null ) — MapType to determine minimum resolution.
|
|
opt_point:LatLng (default = null ) — Point to get minimum zoom level for.
|
Number — The minimum zoom level.
|
getOptions | () | method |
public function getOptions():MapOptions
Retrieves the full set of options used by the map. Note that since MapOptions is used only during map initialization, this method only allows those original settings to be retrieved and does not support re-configuration of the map.
ReturnsMapOptions —
Options used by the map.
|
See also
getPaneManager | () | method |
public function getPaneManager():IPaneManager
Retrieves the pane manager for the map.
ReturnsIPaneManager —
The instance of pane manager.
|
See also
getProjection | () | method |
public function getProjection():IProjection
Returns the projection being applied to the map.
ReturnsIProjection —
Projection being applied to the map.
|
getSize | () | method |
public function getSize():Point
Retrieves the map view size.
ReturnsPoint — Map view size.
|
getZoom | () | method |
public function getZoom():Number
Retrieves the map zoom level.
ReturnsNumber — Zoom level for the map.
|
isLoaded | () | method |
public function isLoaded():Boolean
Checks whether the map has been initialized.
ReturnsBoolean — Returns true iff the map was initialized by
a call to setCenter() since it was created.
|
openInfoWindow | () | method |
public function openInfoWindow(latlng:LatLng, options:InfoWindowOptions = null):IInfoWindow
Opens a simple information window at the given point.
Parameterslatlng:LatLng — Point at which the info window is opened.
|
|
options:InfoWindowOptions (default = null ) — Info window options.
|
IInfoWindow —
Reference to newly created info window.
|
panBy | () | method |
public function panBy(distance:Point):void
Starts a pan animation by the given distance in pixels.
Parametersdistance:Point — Distance in pixels
|
panTo | () | method |
public function panTo(latLng:LatLng):void
Pans the map to the specified centre location.
ParameterslatLng:LatLng — Coordinates for the new centre.
|
removeControl | () | method |
public function removeControl(control:IControl):void
Removes a control from the map. If the control was not added to the map, this does nothing.
Parameterscontrol:IControl — The control to remove.
|
removeMapType | () | method |
public function removeMapType(oldMapType:IMapType):void
Removes a registered map type.
ParametersoldMapType:IMapType — Map type to unregister.
|
removeOverlay | () | method |
public function removeOverlay(overlay:IOverlay):void
Removes an overlay from the map.
Parametersoverlay:IOverlay — Overlay to be removed from the map.
|
returnToSavedPosition | () | method |
public function returnToSavedPosition():void
Returns map to the saved position.
savePosition | () | method |
public function savePosition():void
Stores the current map position and zoom level for later recall by returnToSavedPosition.
scrollWheelZoomEnabled | () | method |
public function scrollWheelZoomEnabled():Boolean
Checks whether scroll wheel zooming is enabled.
ReturnsBoolean — true if scroll wheel zooming is enabled.
|
setCenter | () | method |
public function setCenter(latLng:LatLng, opt_zoom:Number, opt_mapType:IMapType = null):void
Changes the centre point of the map.
ParameterslatLng:LatLng — Coordinates for the new centre.
|
|
opt_zoom:Number — New zoom level.
|
|
opt_mapType:IMapType (default = null ) — New map type.
|
setDoubleClickMode | () | method |
public function setDoubleClickMode(val:Number):void
Set the mouse double click mode.
Parametersval:Number — mouse double click mode (one of the MapAction constants).
|
See also
setMapType | () | method |
public function setMapType(mapType:IMapType):void
Changes the map type for the map.
ParametersmapType:IMapType — Map type.
|
setSize | () | method |
public function setSize(newSize:Point):void
Sets the size of the map view.
ParametersnewSize:Point — New view size for the map.
|
setZoom | () | method |
public function setZoom(level:Number, opt_doContinuousZoom:Boolean = false):void
Changes the zoom level for the map view control.
Parameterslevel:Number — New zoom level.
|
|
opt_doContinuousZoom:Boolean (default = false ) — Whether the zoom operation should be continuous
(provided that continuous zoom is enabled for the map).
|
See also
unload | () | method |
public function unload():void
Removes the map from its parent and attempts to unload it to free up memory associated with the map. The map object will no longer be usable after the call to this method.
zoomIn | () | method |
public function zoomIn(opt_latlng:LatLng = null, opt_doCenter:Boolean = false, opt_doContinuousZoom:Boolean = false):void
Zooms in the map by one zoom level if possible.
Parametersopt_latlng:LatLng (default = null ) — If set, this is the point around which we zoom.
Otherwise we will zoom in around the center of the map.
|
|
opt_doCenter:Boolean (default = false ) — If true, we also want to center at opt_latlng.
|
|
opt_doContinuousZoom:Boolean (default = false ) — Whether the zoom operation should be continuous
(provided that continuous zoom is enabled for the map).
|
See also
zoomOut | () | method |
public function zoomOut(opt_latlng:LatLng = null, opt_doContinuousZoom:Boolean = false):void
Zooms out the map by one zoom level if possible.
Parametersopt_latlng:LatLng (default = null ) — If set, this is the point around which we zoom.
Otherwise we will zoom out around the center of the map.
|
|
opt_doContinuousZoom:Boolean (default = false ) — Whether the zoom operation should be continuous
(provided that continuous zoom is enabled for the map).
|
See also