Stay organized with collections Save and categorize content based on your preferences.
MapType interfacegoogle.maps.MapType
interface
This interface defines the map type, and is typically used for custom map types. Immutable.
PropertiesmaxZoom
Type: number
The maximum zoom level for the map when displaying this MapType. Required for base MapTypes, ignored for overlay MapTypes.
minZoom
Type: number
The minimum zoom level for the map when displaying this MapType. Optional; defaults to 0.
radius
Type: number
Radius of the planet for the map, in meters. Optional; defaults to Earth's equatorial radius of 6378137 meters.
alt optional
Type: string optional
Alt text to display when this MapType's button is hovered over in the MapTypeControl. Optional.
name optional
Type: string optional
Name to display in the MapTypeControl. Optional.
projection optional
Type: Projection optional
The Projection used to render this MapType. Optional; defaults to Mercator.
tileSize optional
Type: Size optional
The dimensions of each tile. Required.
MethodsgetTile
getTile(tileCoord, zoom, ownerDocument)
tileCoord
: Point
Tile coordinates.zoom
: number
Tile zoom.ownerDocument
: Document
The document which owns this tile.Element|null
Resulting tile.
Returns a tile for the given tile coordinate (x, y) and zoom level. This tile will be appended to the given ownerDocument. Not available for base map types.
releaseTile
releaseTile(tile)
tile
: Element optional
Tile to release.Return Value: void
Releases the given tile, performing any necessary cleanup. The provided tile will have already been removed from the document. Optional.
Projection interfacegoogle.maps.Projection
interface
fromLatLngToPoint
fromLatLngToPoint(latLng[, point])
latLng
: LatLng|LatLngLiteral
point
: Point optional
Point|null
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, but may return null
if the projection cannot calculate the Point
.
fromPointToLatLng
fromPointToLatLng(pixel[, noClampNoWrap])
pixel
: Point
noClampNoWrap
: boolean optional
LatLng|null
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, but may return null
if the projection cannot calculate the LatLng
.
google.maps.ImageMapType
class
This class implements the MapType interface and is provided for rendering image tiles.
This class extends MVCObject
.
This class implements MapType
.
Access by calling const {ImageMapType} = await google.maps.importLibrary("maps")
.
See Libraries in the Maps JavaScript API.
getOpacity
getOpacity()
Parameters: None
Return Value: number
opacity The current opacity.
Returns the opacity level (0
(transparent) to 1.0
) of the ImageMapType
tiles.
getTile
getTile(tileCoord, zoom, ownerDocument)
tileCoord
: Point
Tile coordinates.zoom
: number
Tile zoom.ownerDocument
: Document
The document which owns this tile.Element|null
Resulting tile.
releaseTile
releaseTile(tileDiv)
tileDiv
: Element optional
Tile to release.Return Value: None
setOpacity
setOpacity(opacity)
opacity
: number
The new opacity.Return Value: None
Sets the opacity level (0
(transparent) to 1.0
) of the ImageMapType
tiles.
addListener
, bindTo
, get
, notify
, set
, setValues
, unbind
, unbindAll
Events tilesloaded
function()
Arguments: None
This event is fired when the visible tiles have finished loading.
ImageMapTypeOptions interfacegoogle.maps.ImageMapTypeOptions
interface
This class is used to create a MapType that renders image tiles.
Propertiesalt optional
Type: string optional
Alt text to display when this MapType's button is hovered over in the MapTypeControl.
getTileUrl optional
Type: function(Point, number): (string optional) optional
Returns a string (URL) for given tile coordinate (x, y) and zoom level.
maxZoom optional
Type: number optional
The maximum zoom level for the map when displaying this MapType.
minZoom optional
Type: number optional
The minimum zoom level for the map when displaying this MapType. Optional.
name optional
Type: string optional
Name to display in the MapTypeControl.
opacity optional
Type: number optional
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 optional
Type: Size optional
The tile size.
GroundOverlay classgoogle.maps.GroundOverlay
class
A rectangular image overlay on the map.
This class extends MVCObject
.
Access by calling const {GroundOverlay} = await google.maps.importLibrary("maps")
.
See Libraries in the Maps JavaScript API.
GroundOverlay
GroundOverlay(url, bounds[, opts])
url
: string
bounds
: LatLngBounds|LatLngBoundsLiteral
opts
: GroundOverlayOptions optional
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.
getBounds
getBounds()
Parameters: None
Return Value:LatLngBounds
Gets the LatLngBounds
of this overlay.
getMap
getMap()
Parameters: None
Return Value:Map
Returns the map on which this ground overlay is displayed.
getOpacity
getOpacity()
Parameters: None
Return Value: number
Returns the opacity of this ground overlay.
getUrl
getUrl()
Parameters: None
Return Value: string
Gets the url of the projected image.
setMap
setMap(map)
map
: Map
Return Value: None
Renders the ground overlay on the specified map. If map is set to null
, the overlay is removed.
setOpacity
setOpacity(opacity)
opacity
: number
Return Value: None
Sets the opacity of this ground overlay.
Inherited:addListener
, bindTo
, get
, notify
, set
, setValues
, unbind
, unbindAll
Events click
function(event)
event
: MapMouseEvent
This event is fired when the DOM click event is fired on the GroundOverlay
.
dblclick
function(event)
event
: MapMouseEvent
This event is fired when the DOM dblclick event is fired on the GroundOverlay
.
google.maps.GroundOverlayOptions
interface
This object defines the properties that can be set on a GroundOverlay
object.
clickable optional
Type: boolean optional
If true
, the ground overlay can receive mouse events.
map optional
Type: Map optional
The map on which to display the overlay.
opacity optional
Type: number optional
Default: 1.0
The opacity of the overlay, expressed as a number between 0 and 1. Optional.
StyledMapType classgoogle.maps.StyledMapType
class
Creates a MapType
with a custom style.
This class extends MVCObject
.
This class implements MapType
.
Access by calling const {StyledMapType} = await google.maps.importLibrary("maps")
.
See Libraries in the Maps JavaScript API.
StyledMapType
StyledMapType(styles[, options])
styles
: Array<MapTypeStyle>
options
: StyledMapTypeOptions optional
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
.
Note that the StyledMapType
is not supported when a map ID is set. When using both together, you will receive a console warning.
google.maps.StyledMapTypeOptions
interface
This class is used to specify options when creating a StyledMapType
. These options cannot be changed after the StyledMapType
is instantiated.
alt optional
Type: string optional
Text to display when this MapType
's button is hovered over in the map type control.
maxZoom optional
Type: number optional
The maximum zoom level for the map when displaying this MapType
. Optional.
minZoom optional
Type: number optional
The minimum zoom level for the map when displaying this MapType
. Optional.
name optional
Type: string optional
The name to display in the map type control.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-09 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-09 UTC."],[],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4