Google Maps Javascript API V3.1 Reference
Frozen Version 3.1
This archived reference documents version 3.1 (the frozen version) of the Maps
Javascript API. This frozen version of the API is a feature-stable version of the API whose
interfaces are guaranteed to remain as documented within these pages until this version is
retired.
To
consult the latest (development) version of the Maps Javascript API, see the
Development Reference.
Reference Version 3.1 Table of Contents
Map class
This class extends MVCObject
.
Constructor
| Constructor |
Description |
Map(mapDiv:Node, opts?:MapOptions) |
Creates a new map inside of the given HTML container, which is
typically a DIV element.
|
Methods
| Methods |
Return Value |
Description |
fitBounds(bounds:LatLngBounds) |
None |
Sets the maps to fit to the given bounds.
|
getBounds() |
LatLngBounds |
Returns the lat/lng bounds of the current viewport. If the map is
not yet initialized (i.e. the mapType is still null), or center and zoom
have not been set then the result is null. |
getCenter() |
LatLng |
|
getDiv() |
Node |
|
getMapTypeId() |
MapTypeId |
|
getProjection() |
Projection |
Returns the current Projection . If the map is not yet
initialized (i.e. the mapType is still null) then the result is null.
Listen to projection_changed and check its value to ensure it
is not null. |
getStreetView() |
StreetViewPanorama |
Returns the default StreetViewPanorama bound to the map, which
may be a default panorama embedded within the map, or the panorama set using
setStreetView() .
Changes to the map's streetViewControl will be reflected in the
display of such a bound panorama. |
getZoom() |
number |
|
panBy(x:number, y:number) |
None |
Changes the center of the map by the given distance in pixels. If the
distance is less than both the width and height of the map, the transition
will be smoothly animated. Note that the map coordinate system increases
from west to east (for x values) and north to south (for y values).
|
panTo(latLng:LatLng) |
None |
Changes the center of the map to the given LatLng . If the
change is less than both the width and height of the map, the transition
will be smoothly animated. |
panToBounds(latLngBounds:LatLngBounds) |
None |
Pans the map by the minimum amount necessary to contain the given
LatLngBounds . It makes no guarantee where on the map the
bounds will be, except that as much of the bounds as possible will be
visible. The bounds will be positioned inside the area bounded by the map
type and navigation controls, if they are present on the map. If the bounds
is larger than the map, the map will be shifted to include the northwest
corner of the bounds. If the change in the map's position is less than both
the width and height of the map, the transition will be smoothly animated. |
setCenter(latlng:LatLng) |
None |
|
setMapTypeId(mapTypeId:MapTypeId) |
None |
|
setOptions(options:MapOptions) |
None |
|
setStreetView(panorama:StreetViewPanorama) |
None |
Binds a StreetViewPanorama to the map.
This panorama overrides the default StreetViewPanorama , allowing
the map to bind to an external panorama outside of the map.
Setting the panorama to null binds the default embedded
panorama back to the map. |
setZoom(zoom:number) |
None |
|
Properties
| Properties |
Type |
Description |
controls |
Array.<MVCArray.<Node>> |
Additional controls to attach to the map. To add a control to the map,
add the control's <div> to the MVCArray
corresponding to the ControlPosition where it should be
rendered. |
mapTypes |
MapTypeRegistry |
A registry of MapType instances by string ID. |
overlayMapTypes |
MVCArray.<MapType> |
Additional map types to overlay. |
Events
| Events |
Arguments |
Description |
bounds_changed |
None |
This event is fired when the viewport bounds have changed. |
center_changed |
None |
This event is fired when the map center property changes. |
click |
MouseEvent |
This event is fired when the user clicks on the map
(but not when they click on a marker or infowindow). |
dblclick |
MouseEvent |
This event is fired when the user double-clicks on the map.
Note that the click event will also fire, right before this one. |
drag |
None |
This event is repeatedly fired while the user drags the map. |
dragend |
None |
This event is fired when the user stops dragging the map. |
dragstart |
None |
This event is fired when the user starts dragging the map. |
idle |
None |
This event is fired when the map becomes idle after panning or
zooming. |
maptypeid_changed |
None |
This event is fired when the mapTypeId property changes. |
mousemove |
MouseEvent |
This event is fired whenever the user's mouse moves over the map
container. |
mouseout |
MouseEvent |
This event is fired when the user's mouse exits the map container. |
mouseover |
MouseEvent |
This event is fired when the user's mouse enters the map container. |
projection_changed |
None |
This event is fired when the projection has changed. |
resize |
None |
Developers should trigger this event on the map when the div changes
size: google.maps.event.trigger(map, 'resize')
. |
rightclick |
MouseEvent |
This event is fired when the DOM contextmenu event is fired on the
map container. |
tilesloaded |
None |
This event is fired when the visible tiles have finished loading. |
zoom_changed |
None |
This event is fired when the map zoom property changes. |
MapOptions object specification
Properties
| Properties |
Type |
Description |
backgroundColor |
string |
Color used for the background of the Map div. This color will be
visible when tiles have not yet loaded as the user pans. This option can
only be set when the map is initialized. |
center |
LatLng |
The initial Map center. Required. |
disableDefaultUI |
boolean |
Enables/disables all default UI. May be overridden individually. |
disableDoubleClickZoom |
boolean |
Enables/disables zoom and center on double click. Enabled by default. |
draggable |
boolean |
If false, prevents the map from being dragged. Dragging is enabled by
default. |
draggableCursor |
string |
The name or url of the cursor to display on a draggable object. |
draggingCursor |
string |
The name or url of the cursor to display when an object is dragging. |
keyboardShortcuts |
boolean |
If false, prevents the map from being controlled by the keyboard.
Keyboard shortcuts are enabled by default. |
mapTypeControl |
boolean |
The initial enabled/disabled state of the Map type control. |
mapTypeControlOptions |
MapTypeControlOptions |
The initial display options for the Map type control. |
mapTypeId |
MapTypeId |
The initial Map mapTypeId. Required. |
navigationControl |
boolean |
The initial enabled/disabled state of the navigation control. |
navigationControlOptions |
NavigationControlOptions |
The initial display options for the navigation control. |
noClear |
boolean |
If true, do not clear the contents of the Map div. |
scaleControl |
boolean |
The initial enabled/disabled state of the scale control. |
scaleControlOptions |
ScaleControlOptions |
The initial display options for the scale control. |
scrollwheel |
boolean |
If false, disables scrollwheel zooming on the map. The scrollwheel is
enabled by default. |
streetView |
StreetViewPanorama |
A StreetViewPanorama to display when the Street View
pegman is dropped on the map. If no panorama is specified, a default
StreetViewPanorama will be displayed in the map's
div when the pegman is dropped. |
streetViewControl |
boolean |
The initial enabled/disabled state of the Street View pegman control. |
zoom |
number |
The initial Map zoom level. Required. |
MapTypeId class
Identifiers for common MapTypes.
Constant
| Constant |
Description |
HYBRID |
This map type displays a transparent layer of major streets on
satellite images. |
ROADMAP |
This map type displays a normal street map. |
SATELLITE |
This map type displays satellite images. |
TERRAIN |
This map type displays maps with physical features such as terrain
and vegetation. |
MapTypeControlOptions object specification
Options for the rendering of the map type control.
Properties
| Properties |
Type |
Description |
mapTypeIds |
Array.<MapTypeId>|Array.<string> |
IDs of map types to show in the control. |
position |
ControlPosition |
Position id. Used to specify the position of the control on the map.
The default position is TOP_RIGHT . |
style |
MapTypeControlStyle |
Style id. Used to select what style of map type control to display. |
MapTypeControlStyle class
Identifiers for common MapTypesControls.
Constant
| Constant |
Description |
DEFAULT |
Uses the default map type control. The control which DEFAULT maps
to will vary according to window size and other factors. It may change
in future versions of the API. |
DROPDOWN_MENU |
A dropdown menu for the screen realestate conscious. |
HORIZONTAL_BAR |
The standard horizontal radio buttons bar. |
NavigationControlOptions object specification
Options for the rendering of the navigation control.
Properties
| Properties |
Type |
Description |
position |
ControlPosition |
Position id. Used to specify the position of the control on the map.
The default position is TOP_LEFT . |
style |
NavigationControlStyle |
Style id. Used to select what style of navigation control to display. |
NavigationControlStyle class
Identifiers for common types of navigation controls.
Constant
| Constant |
Description |
ANDROID |
The small zoom control similar to the one used by the native Maps
application on Android. |
DEFAULT |
The default navigation control. The control which DEFAULT maps to
will vary according to map size and other factors. It may change in
future versions of the API. |
SMALL |
The small, zoom only control. |
ZOOM_PAN |
The larger control, with the zoom slider and pan directional pad. |
ScaleControlOptions object specification
Options for the rendering of the scale control.
Properties
| Properties |
Type |
Description |
position |
ControlPosition |
Position id. Used to specify the position of the control on the map.
The default position is BOTTOM_LEFT . |
style |
ScaleControlStyle |
Style id. Used to select what style of scale control to display. |
ScaleControlStyle class
Identifiers for scale control ids.
Constant
| Constant |
Description |
DEFAULT |
The standard scale control. |
ControlPosition class
Identifiers used to specify the placement of controls on the map.
Controls are positioned relative to other controls in the same layout
position. Controls that are added first are positioned closer to the edge
of the map.
+---------------+
+ TL T TR +
+ +
+ L R +
+ +
+ +
+ +
+ BL B BR +
+---------------+
Elements in the top or bottom row flow towards the middle.
Elements at the left or right sides flow downwards.
Constant
| Constant |
Description |
BOTTOM |
Elements are positioned in the center of the bottom row. |
BOTTOM_LEFT |
Elements are positioned in the bottom left and flow towards the
middle. Elements are positioned to the right of the Google logo. |
BOTTOM_RIGHT |
Elements are positioned in the bottom right and flow towards the
middle. Elements are positioned to the left of the copyrights. |
LEFT |
Elements are positioned on the left, below top-left elements, and
flow downwards. |
RIGHT |
Elements are positioned on the right, below top-right elements, and
flow downwards. |
TOP |
Elements are positioned in the center of the top row. |
TOP_LEFT |
Elements are positioned in the top left and flow towards the middle. |
TOP_RIGHT |
Elements are positioned in the top right and flow towards the
middle. |
MapPanes object specification
This object contains the DOM elements in which overlays are rendered.
They are listed below with 'Pane 0' at the bottom and 'Pane 6' at the top.
Properties
| Properties |
Type |
Description |
floatPane |
Node |
This pane contains the info window. It is above all map overlays.
(Pane 6). |
floatShadow |
Node |
This pane contains the info window shadow.
It is above the overlayImage, so that markers can be in the shadow of the
info window. (Pane 4). |
mapPane |
Node |
This pane is the lowest pane and is above the tiles. (Pane 0). |
overlayImage |
Node |
This pane contains the marker foreground images. (Pane 3). |
overlayLayer |
Node |
This pane contains polylines, polygons, ground overlays and tile layer
overlays. (Pane 1). |
overlayMouseTarget |
Node |
This pane contains transparent elements that receive DOM mouse events for
the markers. It is above the floatShadow, so that markers in the shadow of
the info window can be clickable. (Pane 5). |
overlayShadow |
Node |
This pane contains the marker shadows. (Pane 2). |
MapCanvasProjection object specification
Methods
| Methods |
Return Value |
Description |
fromContainerPixelToLatLng(pixel:Point) |
LatLng |
Computes the geographical coordinates from pixel coordinates
in the map's container. |
fromDivPixelToLatLng(pixel:Point) |
LatLng |
Computes the geographical coordinates from pixel coordinates
in the div that holds the draggable map. |
fromLatLngToContainerPixel(latLng:LatLng) |
Point |
Computes the pixel coordinates of the given geographical location in the
DOM element the map's outer container.
|
fromLatLngToDivPixel(latLng:LatLng) |
Point |
Computes the pixel coordinates of the given geographical location in the
DOM element that holds the draggable map.
|
getWorldWidth() |
number |
The width of the world in pixels in the current zoom level.
|
Marker class
This class extends MVCObject
.
Constructor
| Constructor |
Description |
Marker(opts?:MarkerOptions) |
Creates a marker with the options specified.
If a map is specified, the marker is added to the map upon construction.
Note that the position must be set for the marker to display.
|
Methods
| Methods |
Return Value |
Description |
getClickable() |
boolean |
|
getCursor() |
string |
|
getDraggable() |
boolean |
|
getFlat() |
boolean |
|
getIcon() |
string|MarkerImage |
|
getMap() |
Map|StreetViewPanorama |
|
getPosition() |
LatLng |
|
getShadow() |
string|MarkerImage |
|
getShape() |
MarkerShape |
|
getTitle() |
string |
|
getVisible() |
boolean |
|
getZIndex() |
number |
|
setClickable(flag:boolean) |
None |
|
setCursor(cursor:string) |
None |
|
setDraggable(flag:boolean) |
None |
|
setFlat(flag:boolean) |
None |
|
setIcon(icon:string|MarkerImage) |
None |
|
setMap(map:Map|StreetViewPanorama) |
None |
Renders the marker on the specified map or panorama. If map is set to null,
the marker will be removed. |
setOptions(options:MarkerOptions) |
None |
|
setPosition(latlng:LatLng) |
None |
|
setShadow(shadow:string|MarkerImage) |
None |
|
setShape(shape:MarkerShape) |
None |
|
setTitle(title:string) |
None |
|
setVisible(visible:boolean) |
None |
|
setZIndex(zIndex:number) |
None |
|
Events
| Events |
Arguments |
Description |
click |
Event |
This event is fired when the marker icon was clicked. |
clickable_changed |
None |
This event is fired when the marker's clickable property changes. |
cursor_changed |
None |
This event is fired when the marker's cursor property changes. |
dblclick |
Event |
This event is fired when the marker icon was double clicked. |
drag |
MouseEvent |
This event is repeatedly fired while the user drags the marker. |
dragend |
MouseEvent |
This event is fired when the user stops dragging the marker. |
draggable_changed |
None |
This event is fired when the marker's draggable property changes. |
dragstart |
MouseEvent |
This event is fired when the user starts dragging the marker. |
flat_changed |
None |
This event is fired when the marker's flat property changes. |
icon_changed |
None |
This event is fired when the marker icon property changes. |
mousedown |
Event |
This event is fired when the DOM mousedown event is fired on the
marker icon. |
mouseout |
Event |
This event is fired when the mouse leaves the area of the marker icon. |
mouseover |
Event |
This event is fired when the mouse enters the area of the marker icon. |
mouseup |
Event |
This event is fired for the DOM mouseup on the marker. |
position_changed |
None |
This event is fired when the marker position property changes. |
rightclick |
Event |
This event is fired when the marker is right clicked on. |
shadow_changed |
None |
This event is fired when the marker's shadow property changes. |
shape_changed |
None |
This event is fired when the marker's shape property changes. |
title_changed |
None |
This event is fired when the marker title property changes. |
visible_changed |
None |
This event is fired when the marker's visible property changes. |
zindex_changed |
None |
This event is fired when the marker's zIndex property changes. |
MarkerOptions object specification
Properties
| Properties |
Type |
Description |
clickable |
boolean |
If true, the marker receives mouse and touch events. Default value is
true. |
cursor |
string |
Mouse cursor to show on hover |
draggable |
boolean |
If true, the marker can be dragged. Default value is false. |
flat |
boolean |
If true, the marker shadow will not be displayed. |
icon |
string|MarkerImage |
Icon for the foreground |
map |
Map|StreetViewPanorama |
Map on which to display Marker. |
position |
LatLng |
Marker position. Required. |
shadow |
string|MarkerImage |
Shadow image |
shape |
MarkerShape |
Image map region definition used for drag/click. |
title |
string |
Rollover text |
visible |
boolean |
If true, the marker is visible |
zIndex |
number |
All Markers are displayed on the map in order of their zIndex,
with higher values displaying in front of Markers with lower values.
By default, Markers are displayed according to their latitude, with
Markers of lower latitudes appearing in front of Markers at higher
latitudes. |
MarkerImage class
Constructor
| Constructor |
Description |
MarkerImage(url:string, size?:Size, origin?:Point, anchor?:Point, scaledSize?:Size) |
Defines an image to be used as the icon or shadow for a Marker. 'origin' and
'size' are used to select a segment of a sprite image and 'anchor' overrides
the position of the anchor point from its default bottom middle position.
The anchor of an image is the pixel to which the system refers in tracking
the image's position. By default, the anchor is set to the bottom middle of
the image (coordinates width/2, height). So when a marker is placed at a
given LatLng, the pixel defined as the anchor is positioned at the specified
LatLng. To scale the image, whether sprited or not, set the value of
scaledSize to the size of the whole image and set size, origin and anchor in
scaled values.
The MarkerImage cannot be changed once constructed.
|
MarkerShape object specification
This object defines the marker shape to use in determination of a
marker's clickable region. The shape consists of two properties —
type
and coord
— which define the general
type of marker and coordinates specific to that type of marker.
Properties
| Properties |
Type |
Description |
coord |
Array.<number> |
The format of this attribute depends on the value of the
type and follows the w3 AREA coords specification
found at
http://www.w3.org/TR/REC-html40/struct/objects.html#adef-coords.
coord is an array of integers that specify the pixel
position of the shape relative to the top-left corner of the target image.
The coordinates depend on the value of type as follows:
- circle : coord is [x1,y1,r] where
x1,y2 are the coordinates of the center of the circle, and r is the radius
of the circle.
- poly : coord is
[x1,y1,x2,y2...xn,yn] where each x,y pair contains the
coordinates of one vertex of the polygon.
- rect : coord is [x1,y1,x2,y2]
where x1,y1 are the coordinates of the upper-left corner of the rectangle
and x2,y2 are the coordinates of the lower-right coordinates of the
rectangle. |
type |
string |
Describes the shape's type and can be circle ,
poly or rect . |
Polyline class
A polyline is a linear overlay of connected line segments on the
map. This class extends MVCObject
.
Constructor
| Constructor |
Description |
Polyline(opts?:PolylineOptions) |
Create a polyline using the passed
Polyline options ,
which specify both the path of the polyline and the stroke style to use
when drawing the polyline.
You may pass either an array of LatLng s or an
MVCArray of LatLng s when
constructing a polyline, though simple arrays are converted to
MVCArray s within the polyline upon instantiation. |
Methods
| Methods |
Return Value |
Description |
getMap() |
Map |
Returns the map on which this poly is attached. |
getPath() |
MVCArray.<LatLng> |
Retrieves the first path. |
setMap(map:Map) |
None |
Renders this Polyline or Polygon on the specified map. If map is set to
null, the Poly will be removed. |
setOptions(options:PolylineOptions) |
None |
|
setPath(path: MVCArray.<LatLng>| Array.<LatLng>) |
None |
Sets the first path. See Polyline
options for more details. |
Events
| Events |
Arguments |
Description |
click |
MouseEvent |
This event is fired when the DOM click event is fired on the Polyline. |
dblclick |
MouseEvent |
This event is fired when the DOM dblclick event is fired on the
Polyline. |
mousedown |
MouseEvent |
This event is fired when the DOM mousedown event is fired on the Polyline. |
mousemove |
MouseEvent |
This event is fired when the DOM mousemove event is fired on the Polyline. |
mouseout |
MouseEvent |
This event is fired on Polyline mouseout. |
mouseover |
MouseEvent |
This event is fired on Polyline mouseover. |
mouseup |
MouseEvent |
This event is fired when the DOM mouseup event is fired on the Polyline. |
rightclick |
MouseEvent |
This event is fired when the Polyline is right-clicked on. |
PolylineOptions object specification
Properties
| Properties |
Type |
Description |
clickable |
boolean |
Indicates whether this Polyline handles
click events. Defaults to true . |
geodesic |
boolean |
Render each edge as a geodesic (a segment of a "great circle"). A
geodesic is the shortest path between two points along the surface of the
Earth. |
map |
Map |
Map on which to display Polyline. |
path |
MVCArray.<LatLng>| Array.<LatLng> |
The ordered sequence of coordinates of the Polyline. This path may
be specified using either a simple array of LatLng s,
or an MVCArray of LatLng s. Note that if you pass
a simple array, it will be converted to an MVCArray
Inserting or removing LatLngs in the MVCArray will automatically
update the polyline on the map. |
strokeColor |
string |
The stroke color in HTML hex style, ie. "#FFAA00" |
strokeOpacity |
number |
The stroke opacity between 0.0 and 1.0 |
strokeWeight |
number |
The stroke width in pixels. |
zIndex |
number |
The zIndex compared to other polys. |
Polygon class
A polygon (like a polyline) defines a series of connected coordinates
in an ordered sequence; additionally, polygons form a closed loop and define
a filled region. This class extends MVCObject
.
Constructor
| Constructor |
Description |
Polygon(opts?:PolygonOptions) |
Create a polygon using the passed
Polygon options , which
specify the polygon's path, the stroke style for the polygon's edges, and
the fill style for the polygon's interior regions.
A polygon may contain one or more paths, where each path consists of an array
of LatLng s. You may pass either an array of LatLngs or an
MVCArray of LatLng s when
constructing these paths. Arrays are converted to MVCArray s
within the polygon upon instantiation. |
Methods
Events
| Events |
Arguments |
Description |
click |
MouseEvent |
This event is fired when the DOM click event is fired on the Polygon. |
dblclick |
MouseEvent |
This event is fired when the DOM dblclick event is fired on the
Polygon. |
mousedown |
MouseEvent |
This event is fired when the DOM mousedown event is fired on the Polygon. |
mousemove |
MouseEvent |
This event is fired when the DOM mousemove event is fired on the Polygon. |
mouseout |
MouseEvent |
This event is fired on Polygon mouseout. |
mouseover |
MouseEvent |
This event is fired on Polygon mouseover. |
mouseup |
MouseEvent |
This event is fired when the DOM mouseup event is fired on the Polygon. |
rightclick |
MouseEvent |
This event is fired when the Polygon is right-clicked on. |
PolygonOptions object specification
Properties
| Properties |
Type |
Description |
clickable |
boolean |
Indicates whether this Polygon handles
click events. Defaults to true . |
fillColor |
string |
The fill color in HTML hex style, ie. "#00AAFF" |
fillOpacity |
number |
The fill opacity between 0.0 and 1.0 |
geodesic |
boolean |
Render each edge as a geodesic (a segment of a "great circle"). A
geodesic is the shortest path between two points along the surface of the
Earth. |
map |
Map |
Map on which to display Polygon. |
paths |
MVCArray.<MVCArray.<LatLng>>| MVCArray.<LatLng>| Array.<Array.<LatLng>>| Array.<LatLng> |
The ordered sequence of coordinates that designates a closed loop.
Unlike polylines, a polygon may consist of one or more paths. As a result,
the paths property may specify one or more arrays of LatLng
coordinates.
Simple polygons may be defined using a single array of LatLng s.
More complex polygons may specify an array of arrays. Any simple arrays are
convered into MVCArray s.
Inserting or removing LatLng s from the MVCArray
will automatically update the polygon on the map. |
strokeColor |
string |
The stroke color in HTML hex style, ie. "#FFAA00" |
strokeOpacity |
number |
The stroke opacity between 0.0 and 1.0 |
strokeWeight |
number |
The stroke width in pixels. |
zIndex |
number |
The zIndex compared to other polys. |
InfoWindow class
An overlay that looks like a bubble and is often
connected to a marker. This class extends MVCObject
.
Constructor
| Constructor |
Description |
InfoWindow(opts?:InfoWindowOptions) |
Creates an info window with the given options. An InfoWindow can be
placed on a map at a particular position or above a marker, depending on
what is specified in the options. Unless auto-pan is disabled, an
InfoWindow will pan the map to make itself visible when it is opened.
After constructing an InfoWindow, you must call open to display it on the
map. The user can click the close button on the InfoWindow to remove it
from the map, or the developer can call close() for the same effect.
|
Methods
| Methods |
Return Value |
Description |
close() |
None |
Closes this InfoWindow by removing it from the DOM structure. |
getContent() |
string|Node |
|
getPosition() |
LatLng |
|
getZIndex() |
number |
|
open(map:Map|StreetViewPanorama, anchor?:MVCObject) |
None |
Opens this InfoWindow on the given map. Optionally, an InfoWindow can be
associated with an anchor. In the core API, the only anchor is the Marker
class. However, an anchor can be any MVCObject that exposes the position
property and optionally pixelBounds for calculating the pixelOffset (see
InfoWindowOptions). |
setContent(content:string|Node) |
None |
|
setOptions(options:InfoWindowOptions) |
None |
|
setPosition(position:LatLng) |
None |
|
setZIndex(zIndex:number) |
None |
|
Events
| Events |
Arguments |
Description |
closeclick |
None |
This event is fired when the close button was clicked. |
content_changed |
None |
This event is fired when the content property changes. |
domready |
None |
This event is fired when the <div>
containing the InfoWindow 's content
is attached to the DOM. You may wish to monitor this event if you are
building out your info window content dynamically. |
position_changed |
None |
This event is fired when the position property changes. |
zindex_changed |
None |
This event is fired when the InfoWindow's zIndex changes. |
InfoWindowOptions object specification
Properties
| Properties |
Type |
Description |
content |
string|Node |
Content to display in the InfoWindow. This can be an HTML element, a
plain-text string, or a string containing HTML. The InfoWindow will be
sized according to the content. To set an explicit size for the content,
set content to be a HTML element with that size. |
disableAutoPan |
boolean |
Disable auto-pan on open. By default, the info window will pan the
map so that it is fully visible when it opens. |
maxWidth |
number |
Maximum width of the infowindow, regardless of content's width. This
value is only considered if it is set before a call to open. To change the
maximum width when changing content, call close, setOptions, and then open. |
pixelOffset |
Size |
The offset, in pixels, of the tip of the info window from the point on the
map at whose geographical coordinates the info window is anchored. If an
InfoWindow is opened with an anchor, the pixelOffset will be calculated from
the top-center of the anchor's bounds. |
position |
LatLng |
The LatLng at which to display this InfoWindow. If the InfoWindow is opened
with an anchor, the anchor's position will be used instead. |
zIndex |
number |
All InfoWindows are displayed on the map in order of their zIndex,
with higher values displaying in front of InfoWindows with lower values.
By default, InfoWinodws are displayed according to their latitude, with
InfoWindows of lower latitudes appearing in front of InfoWindows at higher
latitudes. InfoWindows are always displayed in front of markers. |
Geocoder class
A service for converting between an address and a
LatLng
.
Constructor
| Constructor |
Description |
Geocoder() |
Creates a new instance of a Geocoder that sends geocode
requests to Google servers.
|
Methods
GeocoderRequest object specification
The specification for a geocoding request to be sent to the
Geocoder
.
Properties
| Properties |
Type |
Description |
address |
string |
Address. Optional. |
bounds |
LatLngBounds |
LatLngBounds within which to search. Optional. |
language |
string |
Preferred language for results. Optional. |
location |
LatLng |
LatLng about which to search. Optional. |
region |
string |
Country code top-level domain within which to search. Optional. |
GeocoderStatus class
The status returned by the Geocoder
on the completion of
a call to geocode()
.
Constant
| Constant |
Description |
ERROR |
There was a problem contacting the Google servers. |
INVALID_REQUEST |
This GeocoderRequest was invalid. |
OK |
The response contains a valid GeocoderResponse . |
OVER_QUERY_LIMIT |
The webpage has gone over the requests limit in too short a period
of time. |
REQUEST_DENIED |
The webpage is not allowed to use the geocoder. |
UNKNOWN_ERROR |
A geocoding request could not be processed due to a server error.
The request may succeed if you try again. |
ZERO_RESULTS |
No result was found for this GeocoderRequest . |
GeocoderResult object specification
A single geocoder result in JSON format retrieved from the geocode
server. Note that a geocode may return multiple result objects.
Properties
| Properties |
Type |
Description |
address_components |
Array.<GeocoderAddressComponent> |
An array of GeocoderAddressComponent s |
geometry |
GeocoderGeometry |
A GeocoderGeometry object |
types |
Array.<string> |
An array of strings denoting the type of the returned geocoded
element. A type consists of a unique string identifying the geocode
result. (For example, "administrative_area_level_1", "country", etc.) |
GeocoderAddressComponent object specification
A single address component within a GeocoderResult
.
A full address may consist of multiple address components.
Properties
| Properties |
Type |
Description |
long_name |
string |
The full text of the address component |
short_name |
string |
The abbreviated, short text of the given address component |
types |
Array.<string> |
An array of strings denoting the type of this address component |
GeocoderGeometry object specification
Geometry information about this GeocoderResult
Properties
| Properties |
Type |
Description |
bounds |
LatLngBounds |
The precise bounds of this GeocodeResult ,
if applicable |
location |
LatLng |
The latitude/longitude coordinates of this result |
location_type |
GeocoderLocationType |
The type of location returned in location |
viewport |
LatLngBounds |
The bounds of the recommended viewport for displaying this
GeocodeResult |
GeocoderLocationType class
Describes the type of location returned from a geocode.
Constant
| Constant |
Description |
APPROXIMATE |
The returned result is approximate. |
GEOMETRIC_CENTER |
The returned result is the geometric center of a result such a
line (e.g. street) or polygon (region). |
RANGE_INTERPOLATED |
The returned result reflects an approximation (usually on a road)
interpolated between two precise points (such as intersections).
Interpolated results are generally returned when rooftop geocodes
are unavilable for a street address. |
ROOFTOP |
The returned result reflects a precise geocode. |
DirectionsRenderer class
Renders directions retrieved in the form of a
DirectionsResult
object retrieved from the
DirectionsService
. This class extends MVCObject
.
Constructor
| Constructor |
Description |
DirectionsRenderer(opts?:DirectionsRendererOptions) |
Creates the renderer with the given options. Directions can be
rendered on a map (as visual overlays) or additionally on a
<div> panel (as textual instructions). |
Methods
| Methods |
Return Value |
Description |
getDirections() |
DirectionsResult |
Returns the renderer's current set of directions. |
getMap() |
Map |
Returns the map on which the DirectionsResult is rendered. |
getPanel() |
Node |
Returns the panel <div> in which the
DirectionsResult is rendered. |
getRouteIndex() |
number |
Returns the current (zero-based) route index in use by this
DirectionsRenderer object. |
setDirections(directions:DirectionsResult) |
None |
Set the renderer to use the result from the DirectionsService .
Setting a valid set of directions in this manner will display the directions
on the renderer's designated map and panel. |
setMap(map:Map) |
None |
This method specifies the map on which directions will be rendered. Pass
null to remove the directions from the map. |
setOptions(options:DirectionsRendererOptions) |
None |
Change the options settings of this DirectionsRenderer after
initialization. |
setPanel(panel:Node) |
None |
This method renders the directions in a
<div> . Pass null to remove the content from
the panel. |
setRouteIndex(routeIndex:number) |
None |
Set the (zero-based) index of the route in the DirectionsResult
object to render. By default, the first route in the array will be rendered. |
DirectionsRendererOptions object specification
This object defines the properties that can be set on a
DirectionsRenderer
object.
Properties
| Properties |
Type |
Description |
directions |
DirectionsResult |
The directions to display on the map and/or in a
<div> panel, retrieved as a
DirectionsResult object from DirectionsService . |
hideRouteList |
boolean |
This property indicates whether the renderer should provide UI to
select amongst alternative routes. By default, this flag is false and a
user-selectable list of routes will be shown in the directions' associated
panel. To hide that list, set hideRouteList to
true . |
map |
Map |
Map on which to display the directions. |
markerOptions |
MarkerOptions |
Options for the markers. All markers rendered by the
DirectionsRenderer will use these options. |
panel |
Node |
The <div> in which to display the directions steps. |
polylineOptions |
PolylineOptions |
Options for the polylines. All polylines rendered by the
DirectionsRenderer will use these options. |
preserveViewport |
boolean |
By default, the input map is centered and zoomed to the bounding box
of this set of directions. If this option is set to true , the
viewport is left unchanged, unless the map's center and zoom were never set. |
routeIndex |
number |
The index of the route within the DirectionsResult
object. The default value is 0. |
suppressBicyclingLayer |
boolean |
Suppress the rendering of the BicyclingLayer when
bicycling directions are requested. |
suppressInfoWindows |
boolean |
Suppress the rendering of info windows. |
suppressMarkers |
boolean |
Suppress the rendering of markers. |
suppressPolylines |
boolean |
Suppress the rendering of polylines. |
DirectionsService class
A service for computing directions between two or more places.
Constructor
| Constructor |
Description |
DirectionsService() |
Creates a new instance of a DirectionsService that sends
directions queries to Google servers.
|
Methods
DirectionsRequest object specification
A directions query to be sent to the
DirectionsService
.
Properties
| Properties |
Type |
Description |
avoidHighways |
boolean |
If true, instructs the Directions service to avoids highways where
possible. Optional. |
avoidTolls |
boolean |
If true, instructs the Directions service to avoids toll roads where
possible. Optional. |
destination |
LatLng|string |
Location of destination. This can be specified as either a string to
be geocoded or a LatLng . Required. |
optimizeWaypoints |
boolean |
If set to true, the DirectionService will attempt to
re-order the supplied intermediate waypoints to minimize overall cost of the
route.
If waypoints are optimized, inspect
DirectionsRoute.waypoint_order in the response to
determine the new ordering. |
origin |
LatLng|string |
Location of origin. This can be specified as either a string to be
geocoded or a LatLng . Required. |
provideRouteAlternatives |
boolean |
Whether or not route alternatives should be provided. Optional. |
region |
string |
Region code used as a bias for geocoding requests. Optional. |
travelMode |
DirectionsTravelMode |
Type of routing requested. Required. |
unitSystem |
DirectionsUnitSystem |
Preferred unit system to use when displaying distance.
Defaults to the unit system used in the country of origin. |
waypoints |
Array.<DirectionsWaypoint> |
Array of intermediate waypoints. Directions will be calculated from
the origin to the destination by way of each waypoint in this array.
Optional. |
DirectionsTravelMode class
The valid travel modes that can be specified in a
DirectionsRequest
as well as the travel modes returned in a
DirectionsStep
.
Constant
| Constant |
Description |
BICYCLING |
Specifies a bicycling directions request. |
DRIVING |
Specifies a driving directions request. |
WALKING |
Specifies a walking directions request. |
DirectionsUnitSystem class
The valid unit systems that can be specified in a
DirectionsRequest
.
Constant
| Constant |
Description |
IMPERIAL |
Specifies that distances in the DirectionsResult
should be expressed in imperial units. |
METRIC |
Specifies that distances in the DirectionsResult
should be expressed in metric units. |
DirectionsWaypoint object specification
A DirectionsWaypoint
represents a location between
origin and destination through which the trip should be routed.
Properties
| Properties |
Type |
Description |
location |
LatLng|string |
Waypoint location. Can be an address string or LatLng .
Optional. |
stopover |
boolean |
If true , indicates that this waypoint is a stop between
the origin and destination. This has the effect of splitting the route into
two. This value is true by default. Optional. |
DirectionsStatus class
The status returned by the DirectionsService
on the
completion of a call to route()
.
Constant
| Constant |
Description |
INVALID_REQUEST |
The DirectionsRequest provided was invalid. |
MAX_WAYPOINTS_EXCEEDED |
Too many DirectionsWaypoint s were provided in the
DirectionsRequest . The total allowed waypoints is 8, plus
the origin and destination. |
NOT_FOUND |
At least one of the origin, destination, or waypoints could not be
geocoded. |
OK |
The response contains a valid DirectionsResult . |
OVER_QUERY_LIMIT |
The webpage has gone over the requests limit in too short a period
of time. |
REQUEST_DENIED |
The webpage is not allowed to use the directions service. |
UNKNOWN_ERROR |
A directions request could not be processed due to a server error.
The request may succeed if you try again. |
ZERO_RESULTS |
No route could be found between the origin and destination. |
DirectionsResult object specification
The directions response in JSON format retrieved from the directions
server. You can render these using a
DirectionsRenderer
or parse
this object and render it yourself. You must display the warnings and
copyrights as noted in the
Maps API terms of service.
Properties
| Properties |
Type |
Description |
routes |
Array.<DirectionsRoute> |
An array of DirectionsRoute s, each of which contains
information about the legs and steps of which it is composed. There will
only be one route unless the DirectionsRequest was made with
provideRouteAlternatives set to true . (This
property was formerly known as "trips".) |
DirectionsRoute object specification
A single route containing a set of legs in JSON format in a
DirectionsResult
. (This object
was formerly known as "DirectionsTrip".)
Properties
| Properties |
Type |
Description |
bounds |
LatLngBounds |
The bounds for this route. |
copyrights |
string |
Copyrights text to be displayed for this route. |
legs |
Array.<DirectionsLeg> |
An array of DirectionsLeg s, each of which contains
information about the steps of which it is composed. There will
be one leg for each waypoint or destination specified. So a route with no
waypoints will contain one DirectionsLeg and a route with one
waypoint will contain two. (This property was formerly known as "routes".) |
overview_path |
Array.<LatLng> |
An array of LatLng s representing the entire course of
this route. The path is simplified in order to make it suitable in contexts
where a small number of vertices is required (such as Static Maps API URLs). |
warnings |
Array.<string> |
Warnings to be displayed when showing these directions. |
waypoint_order |
Array.<number> |
If optimizeWaypoints was set to true , this
field will contain the re-ordered permutation of the input waypoints. For
example, if the input was:
Origin: Los Angeles
Waypoints: Dallas, Bangor, Phoenix
Destination: New York
and the optimized output was ordered as follows:
Origin: Los Angeles
Waypoints: Phoenix, Dallas, Bangor
Destination: New York
then this field will be an Array containing the values
[2, 0, 1]. Note that the numbering of waypoints is zero-based.
If any of the input waypoints has stopover set to
false , this field will be empty, since route optimization is not
available for such queries. |
DirectionsLeg object specification
A single leg consisting of a set of steps in JSON format in a
DirectionsResult
.
Some fields in the leg may not be returned for all requests. (This object
was formerly known as "DirectionsRoute".)
Properties
| Properties |
Type |
Description |
distance |
DirectionsDistance |
The total distance covered by this leg. This property may be
undefined as the distance may be unknown. |
duration |
DirectionsDuration |
The total duration of this leg. This property may be undefined as
the duration may be unknown. |
end_address |
string |
The address of the destination of this leg. |
end_location |
LatLng |
The DirectionsService calculates directions between
locations by using the nearest transportation option (usually a road) at the
start and end locations. end_location indicates the actual
geocoded destination, which may be different than the
end_location of the last step if, for example, the road is not
near the destination of this leg. |
start_address |
string |
The address of the origin of this leg. |
start_location |
LatLng |
The DirectionsService calculates directions between
locations by using the nearest transportation option (usually a road) at the
start and end locations. start_location indicates the actual
geocoded origin, which may be different than the start_location
of the first step if, for example, the road is not near the origin of this
leg. |
steps |
Array.<DirectionsStep> |
An array of DirectionsStep s, each of which contains
information about the individual steps in this leg. |
DirectionsStep object specification
A single DirectionsStep
in JSON format in a
DirectionsResult
. Some fields may be undefined.
Properties
| Properties |
Type |
Description |
distance |
DirectionsDistance |
The distance covered by this step. This property may be undefined as
the distance may be unknown. |
duration |
DirectionsDuration |
The typical time required to perform this step in seconds and in text
form. This property may be undefined as the duration may be unknown. |
end_location |
LatLng |
The ending location of this step. |
instructions |
string |
Instructions for this step. |
path |
Array.<LatLng> |
A sequence of LatLng s describing the course of this step. |
start_location |
LatLng |
The starting location of this step. |
DirectionsDistance object specification
A representation of distance as a numeric value and a display string.
Properties
| Properties |
Type |
Description |
text |
string |
A string representation of the distance value, using the
DirectionsUnitSystem specified in the request. |
value |
number |
The distance in meters. |
DirectionsDuration object specification
A representation of duration as a numeric value and a display string.
Properties
| Properties |
Type |
Description |
text |
string |
A string representation of the duration value. |
value |
number |
The duration in seconds. |
ElevationService class
Defines a service class that talks directly to Google servers
for requesting elevation data.
Constructor
| Constructor |
Description |
ElevationService() |
Creates a new instance of a ElevationService that sends
elevation queries to Google servers. |
Methods
LocationElevationRequest object specification
An elevation request sent by the ElevationService
containing the list of discrete coordinates (LatLng
s)
for which to return elevation data.
Properties
| Properties |
Type |
Description |
locations |
Array.<LatLng> |
The discrete locations for which to retrieve elevations. |
PathElevationRequest object specification
An elevation query sent by the ElevationService
containing the path along which to return sampled data. This request
defines a continuous path along the earth along which elevation
samples should be taken at evenly-spaced distances. All paths from
vertex to vertex use segments of the great circle between
those two points.
Properties
| Properties |
Type |
Description |
path |
Array.<LatLng> |
The path along which to collect elevation values. |
samples |
Number |
Required. The number of equidistant points along the given path for
which to retrieve elevation data, including the endpoints. The number of
samples must be a value between 2 and 1024. |
ElevationResult object specification
The result of an ElevationService
request, consisting
of the set of elevation coordinates and their elevation values. Note that
a single request may produce multiple ElevationResult
s.
Properties
| Properties |
Type |
Description |
elevation |
Number |
The elevation of this point on Earth, in meters above sea level. |
location |
LatLng |
The location of this elevation result. |
ElevationStatus class
The status returned by the ElevationService
upon
completion of an elevation requerst.
Constant
| Constant |
Description |
INVALID_REQUEST |
This request was invalid. |
OK |
The request did not encounter any errors. |
OVER_QUERY_LIMIT |
The webpage has gone over the requests limit in too short a period
of time. |
REQUEST_DENIED |
The webpage is not allowed to use the elevation service for some
reason. |
UNKNOWN_ERROR |
A geocoding, directions or elevation request could not be
successfully processed, yet the exact reason for the failure is not known. |
OverlayView class
You can implement this class if you want to display custom types
of overlay objects on the map. This class extends MVCObject
.
Constructor
| Constructor |
Description |
OverlayView() |
You should inherit from this class by setting your overlay's
prototype to new OverlayView.prototype . You must implement
three methods:
onAdd(), draw(), and onRemove(). In the add() method, you should create DOM
objects and append them as children of the panes. In the draw() method,
you should position these elements. In the onRemove() method, you should
remove the objects from the DOM. You must call setMap() with a valid Map
object to trigger the call to the onAdd() method and setMap(null) in order
to trigger the onRemove() method. The setMap() method can be called at the
time of construction or at any point afterward when the overlay should be
re-shown after removing. The draw() method will then be called whenever a
map property changes that could change the position of the element, such as
zoom, center, or map type.
|
Methods
| Methods |
Return Value |
Description |
draw() |
None |
Implement this method to draw or update the overlay. This method is called
after onAdd() and when the position from projection.fromLatLngToPixel() would
return a new value for a given LatLng. This can happen on change of zoom,
center, or map type. It is not necessarily called on drag or resize. |
getMap() |
Map |
|
getPanes() |
MapPanes |
Returns the panes in which this OverlayView can be rendered. Only available
after draw has been called. |
getProjection() |
MapCanvasProjection |
Returns the MapCanvasProjection object associated with this OverlayView.
Only available after draw has been called. |
onAdd() |
None |
Implement this method to initialize the overlay DOM elements. This method
is called once after setMap() is called with a valid map. At this point,
panes and projection will have been initialized. |
onRemove() |
None |
Implement this method to remove your elements from the DOM. This method is
called once following a call to setMap(null). |
setMap(map:Map|StreetViewPanorama) |
None |
Adds the overlay to the map or panorama.
|
MapType object specification
This interface defines map type. This interface
is typically used for base maps such as road, satellite
or hybrid maps. Immutable.
Methods
| Methods |
Return Value |
Description |
getTile(tileCoord:Point, zoom:number, ownerDocument:Document) |
Node |
Returns a tile for the given tile coordinate (x, y) and zoom level.
This tile will be appended to the given ownerDocument. |
releaseTile(tile:Node) |
None |
Releases the given tile, performing any necessary cleanup.
The provided tile will have already been removed from the document.
Optional. |
Properties
| Properties |
Type |
Description |
alt |
string |
Alt text to display when this MapType's button is hovered over in the
MapTypeControl. Optional. |
maxZoom |
number |
The maximum zoom level for the map when displaying this MapType.
Required for base MapTypes, ignored for overlay MapTypes. |
minZoom |
number |
The minimum zoom level for the map when displaying this MapType.
Optional; defaults to 0. |
name |
string |
Name to display in the MapTypeControl. Optional. |
projection |
Projection |
The Projection used to render this MapType.
Optional; defaults to Mercator. |
radius |
number |
Radius of the planet for the map, in meters.
Optional; defaults to Earth's equatorial radius of 6378137 meters. |
tileSize |
Size |
The dimensions of each tile.
Required. |
MapTypeRegistry class
This class extends MVCObject
.
Constructor
| Constructor |
Description |
MapTypeRegistry() |
The MapTypeRegistry holds the collection of custom map
types available to the map for its use. The API consults this registry when
providing the list of avaiable map types within controls, for example.
|
Methods
| Methods |
Return Value |
Description |
set(id:string, mapType:MapType) |
None |
Sets the registry to associate the passed string identifier with
the passed MapType. |
Projection object specification
Methods
| Methods |
Return Value |
Description |
fromLatLngToPoint(latLng:LatLng, point?:Point) |
Point |
Translates from the LatLng cylinder to the Point plane.
This interface specifies a function which implements translation from given
LatLng values to world coordinates on the map projection. The
Maps API calls this method when it needs to plot locations on screen.
Projection objects must implement this method. |
fromPointToLatLng(pixel:Point, nowrap?:boolean) |
LatLng |
This interface specifies a function which implements translation from world
coordinates on a map projection to LatLng values. The Maps API
calls this method when it needs to translate actions on screen to positions
on the map. Projection objects must implement this method. |
ImageMapType class
This class implements the MapType interface and
is provided for rendering image tiles.
Constructor
| Constructor |
Description |
ImageMapType(opts:ImageMapTypeOptions) |
Constructs an ImageMapType using the provided
ImageMapTypeOptions |
ImageMapTypeOptions object specification
This class is used to create a MapType that renders
image tiles.
Properties
| Properties |
Type |
Description |
alt |
string |
Alt text to display when this MapType's button is hovered over in the
MapTypeControl. |
getTileUrl |
Function(Point, number):string |
Returns a string (URL) for given tile coordinate (x, y) and zoom level.
This function should have a signature of:
getTileUrl(Point, number):string |
isPng |
boolean |
Is the image a PNG? This is needed by some old browsers. |
maxZoom |
number |
The maximum zoom level for the map when displaying this MapType. |
minZoom |
number |
The minimum zoom level for the map when displaying this MapType.
Optional. |
name |
string |
Name to display in the MapTypeControl. |
opacity |
number |
The opacity to apply to the tiles. The opacity should be specified as
a float value between 0 and 1.0, where 0 is fully transparent and 1 is fully
opaque. |
tileSize |
Size |
The tile size. |
StyledMapType class
Creates a MapType
with a custom style. This class extends MVCObject
.
Constructor
| Constructor |
Description |
StyledMapType(style:Array.<MapTypeStyle>, options?:StyledMapTypeOptions) |
Creates a styled MapType with the specified options.
The StyledMapType takes an array of MapTypeStyle s,
where each MapTypeStyle is applied to the map consecutively. A
later MapTypeStyle that applies the same
MapTypeStyler s to the same selectors as an
earlier MapTypeStyle will override the earlier
MapTypeStyle . |
StyledMapTypeOptions object specification
This class is used to specify options when creating a
StyledMapType
.
Properties
| Properties |
Type |
Description |
alt |
string |
Alt text to display when this MapType 's button is hovered
over in the map type control. |
baseMapType |
StyledMapType |
A StyledMapType whose style should be used as a base for
defining a StyledMapType 's style. The
MapTypeStyle rules will be appended to the base's styles. |
maxZoom |
number |
The maximum zoom level for the map when displaying this
MapType . Optional. |
minZoom |
number |
The minimum zoom level for the map when displaying this
MapType . Optional. |
name |
string |
Name to display in the map type control. |
MapTypeStyle object specification
The MapTypeStyle
is a collection of selectors and
stylers that define how the map should be styled. Selectors specify what
map elements should be affected and stylers specify how those elements
should be modified.
Properties
| Properties |
Type |
Description |
elementType |
MapTypeStyleElementType |
Selects the element type to which a styler should be applied. An element
type distinguishes between the different representations of a
feature. Optional; if elementType is not specified, the value
is assumed to be 'all' . |
featureType |
MapTypeStyleFeatureType |
Selects the feature, or group of features, to which a styler should be
applied. Optional; if featureType is not specified, the value
is assumed to be 'all' . |
stylers |
Array.<MapTypeStyler> |
The style rules to apply to the selectors. The rules are applied to the
map's elements in the order they are listed in this array. |
MapTypeStyleFeatureType object specification
Possible values for feature types. Specify these values as strings,
i.e. 'administrative'
or 'poi.park'
.
Stylers applied to a parent feature type automatically apply
to all child feature types. Note however that parent features may include
some additional features that are not included in one of their child feature
types.
Constant
| Constant |
Description |
administrative |
Apply the rule to administrative areas. |
administrative.country |
Apply the rule to countries. |
administrative.land_parcel |
Apply the rule to land parcels. |
administrative.locality |
Apply the rule to localities. |
administrative.neighborhood |
Apply the rule to neighborhoods. |
administrative.province |
Apply the rule to provinces. |
all |
Apply the rule to all selector types. |
landscape |
Apply the rule to landscapes. |
landscape.man_made |
Apply the rule to man made structures. |
landscape.natural |
Apply the rule to natural features. |
poi |
Apply the rule to points of interest. |
poi.attraction |
Apply the rule to attractions for tourists. |
poi.business |
Apply the rule to businesses. |
poi.government |
Apply the rule to government buildings. |
poi.medical |
Apply the rule to emergency services (hospitals, pharmacies, police,
doctors, etc). |
poi.park |
Apply the rule to parks. |
poi.place_of_worship |
Apply the rule to places of worship, such as church, temple, or
mosque. |
poi.school |
Apply the rule to schools. |
poi.sports_complex |
Apply the rule to sports complexes. |
road |
Apply the rule to all roads. |
road.arterial |
Apply the rule to arterial roads. |
road.highway |
Apply the rule to highways. |
road.local |
Apply the rule to local roads. |
transit |
Apply the rule to all transit stations and lines. |
transit.line |
Apply the rule to transit lines. |
transit.station |
Apply the rule to all transit stations. |
transit.station.airport |
Apply the rule to airports. |
transit.station.bus |
Apply the rule to bus stops. |
transit.station.rail |
Apply the rule to rail stations. |
water |
Apply the rule to bodies of water. |
MapTypeStyleElementType object specification
Each MapTypeStyleElementType
distinguishes between the
different representations of a feature.
Constant
| Constant |
Description |
all |
Apply the rule to all elements of the specified feature. |
geometry |
Apply the rule to the feature's geometry. |
labels |
Apply the rule to the feature's labels. |
MapTypeStyler object specification
A styler affects how a map's elements will be styled. Each
MapTypeStyler
should contain one and only one key.
If more than one key is specified in a single MapTypeStyler
,
all but one will be ignored. For example:
var rule = {hue: '#ff0000'}
.
Properties
| Properties |
Type |
Description |
gamma |
number |
Gamma. Modifies the gamma by raising the lightness to the given
power. Valid values: Floating point numbers, [0.01, 10], with 1.0
representing no change. |
hue |
string |
Sets the hue of the feature to match the hue of the color supplied. Note
that the saturation and lightness of the feature is conserved, which means
that the feature will not match the color supplied exactly. Valid values:
An RGB hex string, i.e. '#ff0000' . |
invert_lightness |
boolean |
Inverts lightness. A value of true will invert the lightness of
the feature while preserving the hue and saturation. |
lightness |
number |
Lightness. Shifts lightness of colors by a percentage of the
original value if decreasing and a percentage of the remaining value if
increasing. Valid values: [-100, 100]. |
saturation |
number |
Saturation. Shifts the saturation of colors by a percentage of the
original value if decreasing and a percentage of the remaining value
if increasing. Valid values: [-100, 100]. |
visibility |
string |
Visibility: Valid values: 'on', 'off' or 'simplifed'. |
Rectangle class
A rectangle overlay. This class extends MVCObject
.
Constructor
Methods
| Methods |
Return Value |
Description |
getBounds() |
LatLngBounds |
Returns the bounds of this rectangle. |
getMap() |
Map |
Returns the map on which this rectangle is displayed. |
setBounds(bounds:LatLngBounds) |
None |
Sets the bounds of this rectangle. |
setMap(map:Map) |
None |
Renders the rectangle on the specified map. If map is set to null, the
rectangle will be removed. |
setOptions(options:RectangleOptions) |
None |
|
Events
| Events |
Arguments |
Description |
click |
MouseEvent |
This event is fired when the DOM click event is fired on the
Rectangle. |
dblclick |
MouseEvent |
This event is fired when the DOM dblclick event is fired on the
Rectangle. |
mousedown |
MouseEvent |
This event is fired when the DOM mousedown event is fired on the
Rectangle. |
mousemove |
MouseEvent |
This event is fired when the DOM mousemove event is fired on the
Rectangle. |
mouseout |
MouseEvent |
This event is fired on Rectangle mouseout. |
mouseover |
MouseEvent |
This event is fired on Rectangle mouseover. |
mouseup |
MouseEvent |
This event is fired when the DOM mouseup event is fired on the
Rectangle. |
rightclick |
MouseEvent |
This event is fired when the Rectangle is right-clicked on. |
RectangleOptions object specification
Properties
| Properties |
Type |
Description |
bounds |
LatLngBounds |
The bounds. |
clickable |
boolean |
Indicates whether this Rectangle handles
click events. Defaults to true . |
fillColor |
string |
The fill color in HTML hex style, ie. "#00AAFF" |
fillOpacity |
number |
The fill opacity between 0.0 and 1.0 |
map |
Map |
Map on which to display Rectangle. |
strokeColor |
string |
The stroke color in HTML hex style, ie. "#FFAA00" |
strokeOpacity |
number |
The stroke opacity between 0.0 and 1.0 |
strokeWeight |
number |
The stroke width in pixels. |
zIndex |
number |
The zIndex compared to other polys. |
Circle class
A circle on the Earth's surface; also known as a "spherical cap". This class extends MVCObject
.
Constructor
| Constructor |
Description |
Circle(opts?:CircleOptions) |
Create a circle using the passed
CircleOptions , which
specify the center, radius, and style. |
Methods
| Methods |
Return Value |
Description |
getBounds() |
LatLngBounds |
Gets the LatLngBounds of this Circle. |
getCenter() |
LatLng |
Returns the center of this circle. |
getMap() |
Map |
Returns the map on which this circle is displayed. |
getRadius() |
number |
Returns the radius of this circle (in meters). |
setCenter(center:LatLng) |
None |
Sets the center of this circle. |
setMap(map:Map) |
None |
Renders the circle on the specified map. If map is set to null, the circle
will be removed. |
setOptions(options:CircleOptions) |
None |
|
setRadius(radius:number) |
None |
Sets the radius of this circle (in meters). |
Events
| Events |
Arguments |
Description |
click |
MouseEvent |
This event is fired when the DOM click event is fired on the Circle. |
dblclick |
MouseEvent |
This event is fired when the DOM dblclick event is fired on the
Circle. |
mousedown |
MouseEvent |
This event is fired when the DOM mousedown event is fired on the
Circle. |
mousemove |
MouseEvent |
This event is fired when the DOM mousemove event is fired on the
Circle. |
mouseout |
MouseEvent |
This event is fired on Circle mouseout. |
mouseover |
MouseEvent |
This event is fired on Circle mouseover. |
mouseup |
MouseEvent |
This event is fired when the DOM mouseup event is fired on the Circle. |
rightclick |
MouseEvent |
This event is fired when the Circle is right-clicked on. |
CircleOptions object specification
Properties
| Properties |
Type |
Description |
center |
LatLng |
The center |
clickable |
boolean |
Indicates whether this Circle handles click
events. Defaults to true . |
fillColor |
string |
The fill color in HTML hex style, ie. "#00AAFF" |
fillOpacity |
number |
The fill opacity between 0.0 and 1.0 |
map |
Map |
Map on which to display Circle. |
radius |
number |
The radius in meters on the Earth's surface |
strokeColor |
string |
The stroke color in HTML hex style, ie. "#FFAA00" |
strokeOpacity |
number |
The stroke opacity between 0.0 and 1.0 |
strokeWeight |
number |
The stroke width in pixels. |
zIndex |
number |
The zIndex compared to other polys. |
GroundOverlay class
A rectangular image overlay on the map. This class extends MVCObject
.
Constructor
| Constructor |
Description |
GroundOverlay(url:string, bounds:LatLngBounds, opts?:GroundOverlayOptions) |
Creates a ground overlay from the provided image URL and its
LatLngBounds . The image is scaled to fit the current bounds,
and projected using the current map projection. |
Methods
| Methods |
Return Value |
Description |
getBounds() |
LatLngBounds |
Gets the LatLngBounds of this overlay. |
getMap() |
Map |
Returns the map on which this ground overlay is displayed. |
getUrl() |
string |
Gets the url of the projected image. |
setMap(map:Map) |
None |
Renders the ground overlay on the specified map. If map is set to null, the
overlay is removed. |
Events
| Events |
Arguments |
Description |
click |
MouseEvent |
This event is fired when the DOM click event is fired on the
GroundOverlay . |
GroundOverlayOptions object specification
This object defines the properties that can be set on a
GroundOverlay
object.
Properties
| Properties |
Type |
Description |
clickable |
boolean |
If true , the ground overlay can receive
click events. |
map |
Map |
The map on which to display the overlay. |
BicyclingLayer class
A layer showing bike lanes and paths. This class extends MVCObject
.
Constructor
| Constructor |
Description |
BicyclingLayer() |
A layer that displays bike lanes and paths and demotes large roads. |
Methods
| Methods |
Return Value |
Description |
getMap() |
Map |
Returns the map on which this layer is displayed. |
setMap(map:Map) |
None |
Renders the layer on the specified map. If map is set to null, the layer
will be removed. |
FusionTablesLayer class
A FusionTablesLayer
allows you to display data from a
Google Fusion Table on a map, as a rendered layer. (See
http://code.google.com/apis/fusiontables for more information about Fusion
Tables). Table data can be queried using the same query language as is used
in the Fusion Tables API. This class extends MVCObject
.
Constructor
| Constructor |
Description |
FusionTablesLayer(tableId:string, opts?:FusionTablesLayerOptions) |
A layer that displays data from a Fusion Table. |
Methods
| Methods |
Return Value |
Description |
getMap() |
Map |
Returns the map on which this layer is displayed. |
getQuery() |
string |
|
getTableId() |
number |
Returns the ID of the table from which to query data. |
setMap(map:Map) |
None |
Renders the layer on the specified map. If map is set to null, the layer
will be removed. |
setOptions(options:FusionTablesLayerOptions) |
None |
|
setQuery(query:string) |
None |
Sets the query to execute on the table specified by the tableId
property. The layer will be updated to display the results of the query. |
setTableId(tableId:number) |
None |
Sets the ID of the table from which to query data.
Setting this value will cause the layer to be redrawn. |
Events
| Events |
Arguments |
Description |
click |
FusionTablesMouseEvent |
This event is fired when a feature in the layer is clicked. |
FusionTablesLayerOptions object specification
This object defines the properties that can be set on a
FusionTablesLayer
object.
Properties
| Properties |
Type |
Description |
heatmap |
boolean |
By default, table data is displayed as geographic features. If true,
the layer is used to display a heatmap representing the density of the
geographic features returned by querying the selected table. |
map |
Map |
The map on which to display the layer. |
query |
string |
A Fusion Tables query to apply when selecting the data to display.
Queries should not be URL escaped. |
suppressInfoWindows |
boolean |
Suppress the rendering of info windows when layer features are clicked. |
FusionTablesMouseEvent object specification
The properties of a mouse event on a FusionTablesLayer
.
Properties
| Properties |
Type |
Description |
infoWindowHtml |
string |
Pre-rendered HTML content, as placed in the infowindow by the default
UI. |
latLng |
LatLng |
The position at which to anchor an infowindow on the clicked feature. |
pixelOffset |
Size |
The offset to apply to an infowindow anchored on the clicked feature. |
row |
Object |
A collection of FusionTablesCell objects, indexed by
column name, representing the contents of the table row which included the
clicked feature. |
FusionTablesCell object specification
Describes a single cell from a Fusion Tables table.
Properties
| Properties |
Type |
Description |
columnName |
string |
The name of the column in which the cell was located. |
value |
string |
The contents of the cell. |
KmlLayer class
A KmlLayer
adds geographic markup to the map from a KML,
KMZ or GeoRSS file that is hosted on a publicly accessible web server.
A KmlFeatureData
object is provided for each feature when
clicked. This class extends MVCObject
.
Constructor
| Constructor |
Description |
KmlLayer(url:string, opts?:KmlLayerOptions) |
Creates a KmlLayer which renders the contents of the
specified KML/KMZ file
(http://code.google.com/apis/kml/documentation/kmlreference.html) or
GeoRSS file (www.georss.org). |
Methods
| Methods |
Return Value |
Description |
getDefaultViewport() |
LatLngBounds |
Get the default viewport for the layer being displayed. |
getMap() |
Map |
Get the map on which the KML Layer is being rendered. |
getMetadata() |
KmlLayerMetadata |
Get the metadata associated with this layer, as specified in the layer
markup. |
getUrl() |
string |
Get the URL of the geographic markup which is being displayed. |
setMap(map:Map) |
None |
Renders the KML Layer on the specified map. If map is set to null, the
layer is removed. |
Events
| Events |
Arguments |
Description |
click |
KmlMouseEvent |
This event is fired when a feature in the layer is clicked. |
defaultviewport_changed |
None |
This event is fired when the KML layers default viewport has changed. |
KmlLayerOptions object specification
This object defines the properties that can be set on a
KmlLayer
object.
Properties
| Properties |
Type |
Description |
map |
Map |
The map on which to display the layer. |
preserveViewport |
boolean |
By default, the input map is centered and zoomed to the bounding box
of the contents of the layer. If this option is set to true , the
viewport is left unchanged, unless the map's center and zoom were never set. |
suppressInfoWindows |
boolean |
Suppress the rendering of info windows when layer features are clicked. |
KmlLayerMetadata object specification
Metadata for a single KML layer, in JSON format.
Properties
| Properties |
Type |
Description |
author |
KmlAuthor |
The layer's <atom:author> , extracted from the
layer markup. |
description |
string |
The layer's <description> , extracted from the
layer markup. |
name |
string |
The layer's <name> , extracted from the
layer markup. |
snippet |
string |
The layer's <Snippet> , extracted from the
layer markup |
KmlMouseEvent object specification
The properties of a click event on a KML/KMZ or GeoRSS document.
Properties
| Properties |
Type |
Description |
featureData |
KmlFeatureData |
A KmlFeatureData object, containing information about the
clicked feature. |
latLng |
LatLng |
The position at which to anchor an infowindow on the clicked feature. |
pixelOffset |
Size |
The offset to apply to an infowindow anchored on the clicked feature. |
KmlFeatureData object specification
Data for a single KML feature in JSON format, returned when a KML
feature is clicked. The data contained in this object mirrors that
associated with the feature in the KML or GeoRSS markup in which it is
declared.
Properties
| Properties |
Type |
Description |
author |
KmlAuthor |
The feature's <atom:author> , extracted from the
layer markup (if specified). |
description |
string |
The feature's <description> , extracted from the
layer markup. |
id |
string |
The feature's <id> , extracted from the layer
markup. If no <id> has been specified, a unique ID will be
generated for this feature. |
infoWindowHtml |
string |
The feature's balloon styled text, if set. |
name |
string |
The feature's <name> , extracted from the layer
markup. |
snippet |
string |
The feature's <Snippet> , extracted from the layer
markup. |
KmlAuthor object specification
Contains details of the author of a KML document or feature.
Properties
| Properties |
Type |
Description |
email |
string |
The author's e-mail address, or an empty string if not specified. |
name |
string |
The author's name, or an empty string if not specified. |
uri |
string |
The author's home page, or an empty string if not specified. |
TrafficLayer class
A traffic layer. This class extends MVCObject
.
Constructor
| Constructor |
Description |
TrafficLayer() |
A layer that displays current road traffic. |
Methods
| Methods |
Return Value |
Description |
getMap() |
Map |
Returns the map on which this layer is displayed. |
setMap(map:Map) |
None |
Renders the layer on the specified map. If map is set to null, the layer
will be removed. |
StreetViewPanorama class
Displays the panorama for a given LatLng
or panorama ID.
A StreetViewPanorama
object provides a Street View "viewer"
which can be stand-alone within a separate <div>
or bound
to a Map
.
This class extends MVCObject
.
Constructor
| Constructor |
Description |
StreetViewPanorama(container:Node, opts?:StreetViewPanoramaOptions) |
Creates a panorama with the passed StreetViewPanoramaOptions . |
Methods
| Methods |
Return Value |
Description |
getLinks() |
Array.<StreetViewLink> |
Returns the set of navigation links for the Street View panorama. |
getPano() |
string |
Returns the current panorama ID for the Street View panorama. This id is
stable within the browser's current session only. |
getPosition() |
LatLng |
Returns the current LatLng position for the Street View panorama. |
getPov() |
StreetViewPov |
Returns the current point of view for the Street View panorama. |
getVisible() |
boolean |
Returns true if the panorama is visible. It does not specify
whether Street View imagery is available at the specified position. |
registerPanoProvider(provider:function(string):StreetViewPanoramaData)) |
None |
Set the custom panorama provider called on pano change to load custom
panoramas. |
setPano(pano:string) |
None |
Sets the current panorama ID for the Street View panorama. |
setPosition(latLng:LatLng) |
None |
Sets the current LatLng position for the Street View panorama. |
setPov(pov:StreetViewPov) |
None |
Sets the point of view for the Street View panorama. |
setVisible(flag:boolean) |
None |
Sets to true to make the panorama visible. If set to
false , the panorama will be hidden whether it is embedded in
the map or in its own <div> . |
Properties
| Properties |
Type |
Description |
controls |
Array.<MVCArray.<Node>> |
Additional controls to attach to the panorama. To add a control to the
panorama, add the control's <div> to the
MVCArray corresponding to the ControlPosition
where it should be rendered. |
Events
| Events |
Arguments |
Description |
closeclick |
Event |
This event is fired when the close button is clicked. |
links_changed |
None |
This event is fired when the panorama's links change. The links
change asynchronously following a pano id change. |
pano_changed |
None |
This event is fired when the panorama's pano id changes. The pano may
change as the user navigates through the panorama or the position is
manually set. Note that not all position changes trigger a
pano_changed . |
position_changed |
None |
This event is fired when the panorama's position changes. The
position changes as the user navigates through the panorama or the position
is set manually. |
pov_changed |
None |
This event is fired when the panorama's point-of-view changes. The
point of view changes as the pitch, zoom, or heading changes. |
resize |
None |
Developers should trigger this event on the panorama when its div
changes size:
google.maps.event.trigger(panorama, 'resize') . |
visible_changed |
None |
This event is fired when the panorama's visibility changes. The
visibility is changed when the Pegman id dragged onto the map, the close
button is clicked, or setVisible() is called. |
StreetViewPanoramaOptions object specification
Options defining the properties of a StreetViewPanorama
object.
Properties
| Properties |
Type |
Description |
addressControl |
boolean |
The enabled/disabled state of the address control. |
addressControlOptions |
StreetViewAddressControlOptions |
The display options for the address control. |
enableCloseButton |
boolean |
If true , the close button is displayed. Disabled by
default. |
linksControl |
boolean |
The enabled/disabled state of the links control. |
navigationControl |
boolean |
The enabled/disabled state of the navigation control. |
navigationControlOptions |
NavigationControlOptions |
The display options for the navigation control. |
pano |
string |
The panorama ID, which should be set when specifying a custom
panorama. |
panoProvider |
Function(string):StreetViewPanoramaData |
Custom panorama provider, which takes a string pano id and returns an
object defining the panorama given that id. This function must be defined
to specify custom panorama imagery. |
position |
LatLng |
The LatLng position of the Street View panorama. |
pov |
StreetViewPov |
The camera orientation, specified as heading, pitch, and zoom, for the
panorama. |
visible |
boolean |
If true , the Street View panorama is visible on load. |
StreetViewAddressControlOptions object specification
Options for the rendering of the Street View address control.
Properties
| Properties |
Type |
Description |
position |
ControlPosition |
Position id. This id is used to specify the position of the control
on the map. The default position is TOP_LEFT . |
style |
Object.<string> |
CSS styles to apply to the Street View address control. For example,
{backgroundColor: 'red'} . |
StreetViewLink object specification
A collection of references to adjacent Street View panos.
Properties
| Properties |
Type |
Description |
description |
string |
A localized string describing the link. |
heading |
number |
The heading of the link. |
pano |
string |
A unique identifier for the panorama. This id is stable within a
session but unstable across sessions. |
roadColor |
string |
Color of the link |
roadOpacity |
number |
Opacity of the link |
StreetViewPov object specification
A point of view object which specifies the camera's orientation at
the Street View panorama's position. The point of view is defined as
heading, pitch and zoom.
Properties
| Properties |
Type |
Description |
heading |
number |
The camera heading in degrees relative to true north. True north is 0°,
east is 90°, south is 180°, west is 270°. |
pitch |
number |
The camera pitch in degrees, relative to the street view vehicle.
Ranges from 90° (directly upwards) to -90° (directly downwards). |
zoom |
number |
The zoom level. Fully zoomed-out is level 0, zooming in increases the
zoom level. |
StreetViewPanoramaData object specification
The representation of a panorama returned from the provider defined
using registerPanoProvider
.
Properties
| Properties |
Type |
Description |
copyright |
string |
Specifies the copyright text for this panorama. |
links |
Array.<StreetViewLink> |
Specifies the navigational links to adjacent panoramas. |
location |
StreetViewLocation |
Specifies the location meta-data for this panorama. |
tiles |
StreetViewTileData |
Specifies the custom tiles for this panorama. |
StreetViewLocation object specification
A representation of a location in the Street View panorama.
Properties
| Properties |
Type |
Description |
description |
string |
A localized string describing the location. |
latLng |
LatLng |
The latlng of the panorama. |
pano |
string |
A unique identifier for the panorama. This is stable within a session
but unstable across sessions. |
StreetViewTileData object specification
The properties of the tile set used in a Street View panorama.
Methods
| Methods |
Return Value |
Description |
getTileUrl(pano:string, tileZoom:number, tileX:number, tileY:number) |
string |
Gets the tile image URL for the specified tile.
pano is the panorama ID of the Street View tile.
tileZoom is the zoom level of the tile.
tileX is the x-coordinate of the tile.
tileY is the y-coordinate of the tile.
Returns the URL for the tile image.
|
Properties
| Properties |
Type |
Description |
centerHeading |
number |
The heading (in degrees) at the center of the panoramic tiles. |
tileSize |
Size |
The size (in pixels) at which tiles will be rendered.
This may not be the native tile image size. |
worldSize |
Size |
The size (in pixels) of the whole panorama's "world". |
StreetViewService class
A StreetViewService
object performs searches for Street
View data.
Methods
| Methods |
Return Value |
Description |
getPanoramaById(pano:string, callback:function(StreetViewPanoramaData, StreetViewStatus):void)) |
None |
Retrieves the data for the given pano id and passes it to the provided
callback as a StreetViewPanoramaData object. Pano ids are
unique per panorama and stable for the lifetime of a session, but are liable
to change between sessions. |
getPanoramaByLocation(latlng:LatLng, radius:number, callback:function(StreetViewPanoramaData, StreetViewStatus):void)) |
None |
Retrieves the StreetViewPanoramaData for a panorama within a
given radius of the given LatLng . The
StreetViewPanoramaData is passed to the provided callback.
If the radius is less than 50 meters, the nearest panorama will be returned. |
StreetViewStatus class
The status returned by the StreetViewService
on
completion of a Street View request.
Constant
| Constant |
Description |
OK |
The request was successful. |
UNKNOWN_ERROR |
The request could not be successfully processed, yet the exact
reason for failure is unknown. |
ZERO_RESULTS |
There are no nearby panoramas. |
MapsEventListener object specification
This class is opaque. It has no methods and no constructor.
Its instances are returned from addListener(), addDomListener() and
are eventually passed back to removeListener().
event namespace
Static Methods
| Static Methods |
Return Value |
Description |
addDomListener(instance:Object, eventName:string, handler:Function, capture?:boolean) |
MapsEventListener |
Cross browser event handler registration. This listener is removed
by calling removeListener(handle) for the handle that is
returned by this function. |
addDomListenerOnce(instance:Object, eventName:string, handler:Function, capture?:boolean) |
MapsEventListener |
Wrapper around addDomListener that removes the listener after the first
event. |
addListener(instance:Object, eventName:string, handler:Function) |
MapsEventListener |
Adds the given listener function to the given event name for
the given object instance. Returns an identifier for this listener
that can be used with removeListener(). |
addListenerOnce(instance:Object, eventName:string, handler:Function) |
MapsEventListener |
Like addListener, but the handler removes itself after handling the
first event. |
clearInstanceListeners(instance:Object) |
None |
Removes all listeners for all events for the given instance. |
clearListeners(instance:Object, eventName:string) |
None |
Removes all listeners for the given event for the given instance. |
removeListener(listener:MapsEventListener) |
None |
Removes the given listener, which should have been returned by
addListener above. |
trigger(instance:Object, eventName:string, var_args:*) |
None |
Triggers the given event. All arguments after eventName are passed
as arguments to the listeners. |
MouseEvent object specification
This object is returned from various mouse events on the map
and overlays, and contains all the fields shown below.
Properties
| Properties |
Type |
Description |
latLng |
LatLng |
The latitude/longitude that was below the cursor
when the event occurred. |
LatLng class
LatLng
is a point in geographical coordinates, latitude and longitude.
Notice that although usual map projections
associate longitude with the x-coordinate of the map, and latitude
with the y-coordinate, the latitude coordinate is always written
first, followed by the longitude.
Notice also that you cannot modify the coordinates
of a LatLng
.
If you want to compute another point, you
have to create a new one.
Constructor
| Constructor |
Description |
LatLng(lat:number, lng:number, noWrap?:boolean) |
Notice the ordering of latitude and longitude.
If the noWrap flag is true, then the numbers will be
used as passed, otherwise latitude will be clamped to lie
between -90 degrees and +90 degrees, and longitude will be
wrapped to lie between -180 degrees and +180 degrees.
|
Methods
| Methods |
Return Value |
Description |
equals(other:LatLng) |
boolean |
Comparison function. |
lat() |
number |
Returns the latitude in degrees. |
lng() |
number |
Returns the longitude in degrees. |
toString() |
string |
Converts to string representation. |
toUrlValue(precision?:number) |
string |
Returns a string of the form "lat,lng" for this LatLng. We round the lat/lng
values to 6 decimal places by default.
|
LatLngBounds class
A LatLngBounds
instance
represents a rectangle in geographical coordinates, including one that
crosses the 180 degrees longitudinal meridian.
Constructor
| Constructor |
Description |
LatLngBounds(sw?:LatLng, ne?:LatLng) |
Constructs a rectangle from the points at its south-west
and north-east corners.
|
Methods
| Methods |
Return Value |
Description |
contains(latLng:LatLng) |
boolean |
Returns true if the given lat/lng is in this bounds. |
equals(other:LatLngBounds) |
boolean |
Returns true if this bounds approximately equals the given bounds. |
extend(point:LatLng) |
LatLngBounds |
Extends this bounds to contain the given point. |
getCenter() |
LatLng |
Computes the center of this LatLngBounds |
getNorthEast() |
LatLng |
Returns the north-east corner of this bounds. |
getSouthWest() |
LatLng |
Returns the south-west corner of this bounds. |
intersects(other:LatLngBounds) |
boolean |
Returns true if this bounds shares any points with this bounds. |
isEmpty() |
boolean |
Returns if the bounds are empty. |
toSpan() |
LatLng |
Converts the given map bounds to a lat/lng span. |
toString() |
string |
Converts to string. |
toUrlValue(precision?:number) |
string |
Returns a string of the form "lat_lo,lng_lo,lat_hi,lng_hi" for this
bounds, where "lo" corresponds to the southwest corner of the
bounding box, while "hi" corresponds to the northeast corner of that box.
|
union(other:LatLngBounds) |
LatLngBounds |
Extends this bounds to contain the union of this and the given bounds. |
Point class
Constructor
| Constructor |
Description |
Point(x:number, y:number) |
A point on a two-dimensional plane. |
Methods
| Methods |
Return Value |
Description |
equals(other:Point) |
boolean |
Compares two Points |
toString() |
string |
Returns a string representation of this Point. |
Properties
| Properties |
Type |
Description |
x |
number |
The X coordinate |
y |
number |
The Y coordinate |
Size class
Constructor
| Constructor |
Description |
Size(width:number, height:number, widthUnit?:string, heightUnit?:string) |
Two-dimensonal size, where width is the distance on the x-axis, and height
is the distance on the y-axis. |
Methods
| Methods |
Return Value |
Description |
equals(other:Size) |
boolean |
Compares two Sizes. |
toString() |
string |
Returns a string representation of this Size. |
Properties
| Properties |
Type |
Description |
height |
number |
The height along the y-axis, in pixels. |
width |
number |
The width along the x-axis, in pixels. |
MVCObject class
Constructor
| Constructor |
Description |
MVCObject() |
Base class implementing KVO. |
Methods
| Methods |
Return Value |
Description |
bindTo(key:string, target:MVCObject, targetKey?:string, noNotify?:boolean) |
None |
Binds a View to a Model. |
changed(key:string) |
None |
Generic handler for state changes.
Override this in derived classes to handle arbitrary state changes. |
get(key:string) |
* |
Gets a value. |
notify(key:string) |
None |
Notify all observers of a change on this property.
This notifies both objects that are bound to the object's property as well as
the object that it is bound to. |
set(key:string, value:*) |
None |
Sets a value. |
setValues(values:Object|undefined) |
None |
Sets a collection of key-value pairs. |
unbind(key:string) |
None |
Removes a binding. Unbinding will set the unbound property to the current
value. The object will not be notified, as the value has not changed. |
unbindAll() |
None |
Removes all bindings. |
MVCArray class
This class extends MVCObject
.
Constructor
| Constructor |
Description |
MVCArray(array?:Array) |
A mutable MVC Array. |
Methods
| Methods |
Return Value |
Description |
forEach(callback:function(*, number))) |
None |
Iterate over each element, calling the provided callback.
The callback is called for each element like: callback(element, index). |
getAt(i:number) |
* |
Get an element at the specified index. |
getLength() |
number |
Returns the number of elements in this array. |
insertAt(i:number, elem:*) |
None |
Inserts an element at the specified index. |
pop() |
* |
Removes the last element of the array and returns that element. |
push(elem:*) |
number |
Adds one element to the end of the array and returns the new length of the
array. |
removeAt(i:number) |
* |
Removes an element from the specified index. |
setAt(i:number, elem:*) |
None |
Sets an element at the specified index. |
Events
| Events |
Arguments |
Description |
insert_at |
number |
This event is fired when insertAt() is called. The event
passes the index that was passed to insertAt() . |
remove_at |
number, * |
This event is fired when removeAt() is called. The event
passes the index that was passed to removeAt() and the element
that was removed from the array. |
set_at |
number, * |
This event is fired when setAt() is called. The event
passes the index that was passed to setAt() and the element that
was previously in the array at that index. |
Back to top


Unified Modeling Language
Python Module of the Week
Dennis Terhorst
2018-04-20
Standard / Specification
- Definition by Object Management Group (OMG) (till 2005), now International Organization for Standardization (ISO)
- Specification documents
Diagrams
UML 2 defines categories
TOC
- Scope
- Conformance
- Normative References
- Terms and Definitions
- Notational Conventions
- Addtitional Information
TOC (continued)
- Common Structure
- Values
- Classification
- Simple Classifiers
- Structured Classifiers
- Packages
- Common Behaviour
- State Machines
TOC (continued)
- Activities
- Actions
- Interactions
- UseCases
- Deployments
- Information Flows
- Primitive Types
- Standard Profile
Abstract Syntax


Create your account
Your organisation must be UK based to receive funding from Innovate UK
Research organisation
Research organisation
Organisation details
Organisation name
Postcode
Find UK address
Select your address
BS1 4NT, Peter Brett Associates, 10, Queen Square, Bristol
BS1 4NT, Sybase (UK) Ltd, 10, Queen Square, Bristol
BS1 4NT, Hydrock, 11-12, Queen Square, Bristol
BS1 4NT, Nomensa Ltd, King William House, 13, Queen Square, Bristol
Enter address manually
Address details
Street
Street line 2
Street line 3
Town
County
Postcode
Continue


This demonstrates a UX called Narrow Focus. The idea is that the user is presented with a very small amount of information and a single input at a time. The focus is narrow rather than having to broaden the focus to a busy screen.
Click the button to begin. Narrow Focus will ask a few questions. after you've answered a question, you can hit enter or tab. That will move you on to the next question. Repeat till you get to the end. you can also move back and forth with the left and right arrow buttons. Shift+Tab will move backward.
You could ask as many quesitons as you want with different types of answers: numbers, dates, text, a choice like a dropdown or radio buttons.
There's lots of other stuff you could do with this. Show a progress bar, have clickable UI to move back and forth through the questions, show a summary at the end, etc.


Netbios listens on TCP Port 139, 445 and UDP Port 137.
How do we machines on which these three ports or a combination are open and feed that IP information to nbtscan and enum4linux. We can do this by using grep such as
grep -E "^Host.*[ ]137/open/udp" <Nmap .gnmap file> : Grep 137 UDP Ports to run nbtscan
grep -E "^Host.*[ ]139/open/tcp" <Nmap .gnmap file>
#If we want that tcp port 139 and 445 both must be open
grep -E "^Host.*[ ]139/open/tcp" <Nmap .gnmap file> | grep -E "^Host.*[ ]445/open/tcp" <Nmap .gnmap file> : Grep TCP 135 and 445 port to run enum4linux
#If we want that tcp port 139 or 445 must be open
grep -E "^Host.*[ ]139/open/tcp|[ ]443/open/tcp" <Nmap .gnmap file>
NBTSCAN:
nbtscan
-v Verbose output. Print all names received from each host.
-f filename Take IP addresses to scan from file "filename"
enum4linux: A Linux alternative to enum.exe for enumerating data from Windows and Samba hosts. It is is basically a wrapper around the Samba tools smbclient, rpclient, net and nmblookup. A very good usage guide is here
enum4linux -a <IP_ADDRESS> : enumerate all the information it can from a remote host


Hey you, first of all, great work and well done. i really like and enjoy your extension.
i was wondering if it is possible to integrate a feature which makes you appear offline in battlelog while you are playing on a server..
sometimes i just wanna play by my own without friends following me or telling me to join teamspeak.
i wish it was simple as it is in steam, just switch on " appear offline! " :P
that would be a really nice improvement.
besides that i am 100% satisfied with the addon!
gj
BrainFooLong
Administrator
I think its not possible. When you in Battlelog and Origin you are compellingly online, you cant switch to invisible or offline. This must be done by EA/DICE.
Greetz
schnub
i´m using bblog not so long but its very very cool ^^
but i´m still searching for a way to play on a server and no one see me playing in battlelog, but this would never happen i think, privacy is still a big issue for ea / origin.
ORFK
Global Moderator
like brain said, we have no possibility to change settings and data wich are generated by battlelog to others. we can just modify the data wich YOU see, not what your friends see.