Options
All
  • Public
  • Public/Protected
  • All
Menu

Type parameters

  • E: Element = Element

Hierarchy

Index

Constructors

constructor

Properties

controls

controls: 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.

see

Maps JavaScript API

data

data: Data

An instance of Data, bound to the map. Add features to this Data object to conveniently display them on this map.

see

Maps JavaScript API

mapTypes

mapTypes: MapTypeRegistry

A registry of MapType instances by string ID.

see

Maps JavaScript API

overlayMapTypes

overlayMapTypes: MVCArray<MapType>

Additional map types to overlay. Overlay map types will display on top of the base map they are attached to, in the order in which they appear in the overlayMapTypes array (overlays with higher index values are displayed in front of overlays with lower index values).

see

Maps JavaScript API

Methods

addListener

  • see

    {@link MapHandlerMap#bounds_changed bounds_changed} event

    see

    {@link MapHandlerMap#center_changed center_changed} event

    see

    {@link MapHandlerMap#click click} event

    see

    {@link MapHandlerMap#dblclick dblclick} event

    see

    {@link MapHandlerMap#drag drag} event

    see

    {@link MapHandlerMap#dragend dragend} event

    see

    {@link MapHandlerMap#dragstart dragstart} event

    see

    {@link MapHandlerMap#heading_changed heading_changed} event

    see

    {@link MapHandlerMap#idle idle} event

    see

    {@link MapHandlerMap#maptypeid_changed maptypeid_changed} event

    see

    {@link MapHandlerMap#mousemove mousemove} event

    see

    {@link MapHandlerMap#mouseout mouseout} event

    see

    {@link MapHandlerMap#mouseover mouseover} event

    see

    {@link MapHandlerMap#projection_changed projection_changed} event

    see

    {@link MapHandlerMap#rightclick rightclick} event

    see

    {@link MapHandlerMap#tilesloaded tilesloaded} event

    see

    {@link MapHandlerMap#tilt_changed tilt_changed} event

    see

    {@link MapHandlerMap#zoom_changed zoom_changed} event

    Type parameters

    • N: "drag" | "click" | "dblclick" | "dragend" | "dragstart" | "mousemove" | "mouseout" | "mouseover" | "idle" | "bounds_changed" | "center_changed" | "heading_changed" | "maptypeid_changed" | "projection_changed" | "rightclick" | "tilesloaded" | "tilt_changed" | "zoom_changed"

    Parameters

    Returns MapsEventListener

  • deprecated

    Parameters

    • eventName: string
    • handler: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns MapsEventListener

bindTo

  • bindTo(key: string, target: MVCObject, targetKey?: string, noNotify?: boolean): void
  • Binds a View to a Model.

    Parameters

    • key: string
    • target: MVCObject
    • Optional targetKey: string
    • Optional noNotify: boolean

    Returns void

changed

  • changed(key: string): void

fitBounds

  • Sets the viewport to contain the given bounds. Note: When the map is set to display: none, the fitBounds function reads the map's size as 0x0, and therefore does not do anything. To change the viewport while the map is hidden, set the map to visibility: hidden, thereby ensuring the map div has an actual size.

    see

    Maps JavaScript API

    see

    {@link MapHandlerMap#bounds_changed event bounds_changed}

    see

    getBounds

    see

    panBy

    see

    panTo

    see

    panToBounds

    see

    setCenter

    Parameters

    Returns void

get

  • get(key: string): any
  • Gets a value.

    Parameters

    • key: string

    Returns any

getBounds

  • Returns the lat/lng bounds of the current viewport. If more than one copy of the world is visible, the bounds range in longitude from -180 to 180 degrees inclusive. 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 or undefined.

    see

    Maps JavaScript API

    see

    {@link MapHandlerMap#bounds_changed bounds_changed} event

    see

    fitBounds

    see

    getCenter

    see

    panToBounds

    Returns undefined | null | LatLngBounds

getCenter

  • Returns the position displayed at the center of the map. Note that this LatLng object is not wrapped.

    see

    Maps JavaScript API

    see

    {@link MapOptions#center}

    see

    {@link MapHandlerMap#center_changed center_changed} event

    see

    getBounds

    see

    setCenter

    Returns LatLng

getClickableIcons

  • getClickableIcons(): boolean
  • Returns the clickability of the map icons. A map icon represents a point of interest, also known as a POI. If the returned value is true, then the icons are clickable on the map.

    see

    Maps JavaScript API

    see

    {@link MapOptions#clickableIcons}

    see

    setClickableIcons

    Returns boolean

getDiv

  • getDiv(): E

getHeading

  • getHeading(): number
  • Returns the compass heading of aerial imagery. The heading value is measured in degrees (clockwise) from cardinal direction North.

    see

    Maps JavaScript API

    see

    {@link MapOptions#heading}

    see

    {@link MapHandlerMap#heading_changed heading_changed} event

    see

    setHeading

    Returns number

getMapTypeId

getProjection

  • If the map is not yet initialized (i.e. the mapType is still null) then the result is null.

    see

    Maps JavaScript API

    see

    {@link MapHandlerMap#projection_changed projection_changed} event

    Returns null | Projection

getStreetView

getTilt

  • getTilt(): number
  • Returns the current angle of incidence of the map, in degrees from the viewport plane to the map plane. The result will be 0 for imagery taken directly overhead or 45 for 45° imagery. 45° imagery is only available for satellite and hybrid map types, within some locations, and at some zoom levels. Note: This method does not return the value set by setTilt. See setTilt for details.

    see

    Maps JavaScript API

    see

    {@link MapOptions#tilt}

    see

    {@link MapHandlerMap#tilt_changed tilt_changed} event

    see

    setTilt

    Returns number

getZoom

  • getZoom(): number

notify

  • notify(key: string): void
  • 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.

    Parameters

    • key: string

    Returns void

panBy

  • panBy(x: number, y: number): void
  • 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).

    see

    Maps JavaScript API

    see

    panTo

    see

    panToBounds

    see

    setCenter

    Parameters

    • x: number
    • y: number

    Returns void

panTo

panToBounds

set

  • set(key: string, value: any): void
  • Sets a value.

    Parameters

    • key: string
    • value: any

    Returns void

setCenter

setClickableIcons

  • setClickableIcons(clickable: boolean): void
  • Controls whether the map icons are clickable or not. A map icon represents a point of interest, also known as a POI. To disable the clickability of map icons, pass a value of false to this method.

    see

    Maps JavaScript API

    see

    {@link MapOptions#clickableIcons}

    see

    getClickableIcons

    Parameters

    • clickable: boolean

    Returns void

setHeading

  • setHeading(heading: number): void
  • Sets the compass heading for aerial imagery measured in degrees from cardinal direction North.

    see

    Maps JavaScript API

    see

    {@link MapOptions#heading}

    see

    {@link MapHandlerMap#heading_changed} event

    see

    getHeading

    Parameters

    • heading: number

    Returns void

setMapTypeId

  • setMapTypeId(mapTypeId: string): void

setOptions

setStreetView

setTilt

  • setTilt(tilt: number): void
  • Controls the automatic switching behavior for the angle of incidence of the map. The only allowed values are 0 and 45. setTilt(0) causes the map to always use a 0° overhead view regardless of the zoom level and viewport. setTilt(45) causes the tilt angle to automatically switch to 45 whenever 45° imagery is available for the current zoom level and viewport, and switch back to 0 whenever 45° imagery is not available (this is the default behavior). 45° imagery is only available for satellite and hybrid map types, within some locations, and at some zoom levels. Note: getTilt returns the current tilt angle, not the value set by setTilt. Because getTilt and setTilt refer to different things, do not bind() the tilt property; doing so may yield unpredictable effects.

    see

    Maps JavaScript API

    see

    {@link MapOptions#tilt}

    see

    {@link MapHandlerMap#tilt_changed}

    see

    getTilt

    Parameters

    • tilt: number

    Returns void

setValues

  • setValues(values: any): void
  • Sets a collection of key-value pairs.

    Parameters

    • values: any

    Returns void

setZoom

  • setZoom(zoom: number): void

unbind

  • unbind(key: string): void
  • 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.

    Parameters

    • key: string

    Returns void

unbindAll

  • unbindAll(): void

Generated using TypeDoc