Skip to main content
Version: 8.1

Perspective - Google Map Scripting

This page details the various scripting, component, and extension functions available for Perspective's Google Map component.

Component Events

The Perspective Event Types Reference page describes all the possible component event types for Perspective components. Not all component events support each Perspective component. The Component Events and Actions page shows how to configure events and actions on a Perspective component. Component scripting is handled separately and can be accessed from the Component menubar or by right clicking on the component.

MapBounds Events

onMapBoundsChanged

Called when the viewport bounds of the map have changed. Returns the north, south, east, and west bound points.

Object PathTypeDescription
event.northNumericThe latitude value for the Northern boundary.
event.eastNumericThe longitude value for the Eastern boundary.
event.southNumericThe latitude value for the Southern boundary.
event.westNumericThe longitude value for the Western boundary.

onMapCenterChanged

Called when the center of the map has changed. Returns the new map center as lat and lng.

Object PathTypeDescription
event.latNumericThe latitude value for the center of the map after being changed.
event.lngNumericThe longitude value for the center of the map after being changed.

Map Events

onMapClick

Interaction event fired when the map is clicked. Returns the lat and lng of the mouse click as it translates on the map.

Object PathTypeDescription
event.latNumericThe latitude of where on the map the user clicked.
event.lngNumericThe longitude of where on the map the user clicked.

onMapDoubleClick

Interaction event fired when the map is double-clicked. Returns the lat and lng of the mouse double-click as it translates on the map.

Object PathTypeDescription
event.latNumericThe latitude of where on the map the user double-clicked.
event.lngNumericThe longitude of where on the map the user double-clicked.

onMapDrag

Interaction event fired while the user drags the map. Returns the lat and lng of the map center while moving.

Object PathTypeDescription
event.latNumericThe latitude of the map center while the user moves the map.
event.lngNumericThe longitude of the map center while the user moves the map.

onMapDragEnd

Interaction event fired when the user stops dragging the map. Returns the lat and lng of the new map center.

Object PathTypeDescription
event.latNumericThe latitude of the map center after the map movement is over.
event.lngNumericThe longitude of the map center after the map movement is over.

onMapDragStart

Interaction event fired when the user starts dragging the map. Returns the lat and lng of the starting map center.

Object PathTypeDescription
event.latNumericThe latitude of the map center when map dragging begins.
event.lngNumericThe longitude of the map center when map dragging begins.

onMapHeadingChanged

Interaction event fired when the map heading property changes. Returns the new map heading value.

Object PathTypeDescription
event.headingNumericThe heading value of the map.

onMapMouseMove

Interaction event fired when the user's mouse moves over the map container. Returns the lat and lng of the mouse location on the map.

Object PathTypeDescription
event.latNumericThe latitude of the mouse location on the map.
event.lngNumericThe longitude of the mouse location on the map.

onMapMouseOut

Interaction event fired when the user's mouse exits the map container.

Object PathTypeDescription
event.latNumericThe latitude of the mouse location when exiting the map.
event.lngNumericThe longitude of the mouse location exiting the map.

onMapMouseOver

Interaction event fired when the user's mouse enters the map container.

Object PathTypeDescription
event.latNumericThe latitude of the mouse location when entering the map.
event.lngNumericThe longitude of the mouse location entering the map.

onMapResize

Interaction event fired when the map size has changed. Returns the width and height of the new map size.

Object PathTypeDescription
event.widthNumericThe width value of the map.
event.heightNumericThe height value of the map.

onMapRightClick

Interaction event fired when the DOM contextmenu event is fired on the map container.

Object PathTypeDescription
event.latNumericThe latitude of the mouse location.
event.lngNumericThe longitude of the mouse location.

onMapTiltChanged

Interaction event fired when the map tilt property changes. Returns the new tilt value.

Object PathTypeDescription
event.tiltNumericThe tilt value of the map. Value will be null, 0, or 45.

onMapTypeIdChanged

Interaction event fired when the map type ID property changes. Returns the new map type ID value.

Object PathTypeDescription
event.mapTypeIdStringThe mapTypeId value of the map.

onMapZoomChanged

Interaction event fired when the map zoom property changes. Returns the new zoom level.

Object PathTypeDescription
event.zoomNumericThe zoom level of the map view.

BicylingLayer Events

onBicyclingLayerLoad

Interaction event fired when the bicycling layer loads.

Object PathTypeDescription
event.nameStringThe name of the bicycling layer.

onBicyclingLayerUnmount

Interaction event fired when the bicycling layer unloads.

Object PathTypeDescription
event.nameStringThe name of the bicycling layer.

Circle Events

onCircleCenterChanged

Interaction event fired when the center of the circle changes.

Object PathTypeDescription
event.nameStringThe name of the circle.
event.latNumericThe latitude value of the center of the circle.
event.lngNumericThe longitude value of the center of the circle.

onCircleClick

Interaction event fired when the circle is clicked.

Object PathTypeDescription
event.nameStringThe name of the circle.
event.latNumericThe latitude of where on the circle the user clicked.
event.lngNumericThe longitude of where on the circle the user clicked.

onCircleDoubleClick

Interaction event fired when the circle is double-clicked.

Object PathTypeDescription
event.nameStringThe name of the circle.
event.latNumericThe latitude of where on the circle the user double-clicked.
event.lngNumericThe longitude of where on the circle the user double-clicked.

onCircleDrag

Interaction event repeatedly fired while the user drags the circle.

Object PathTypeDescription
event.nameStringThe name of the circle.
event.latNumericThe latitude of the map center while the user moves the map.
event.lngNumericThe longitude of the map center while the user moves the map.

onCircleDragEnd

Interaction event fired when the user stops dragging the circle.

Object PathTypeDescription
event.latNumericThe latitude of the map center while the user moves the map.
event.lngNumericThe longitude of the map center while the user moves the map.

onCircleDragStart

Interaction event fired when the user starts dragging the circle.

Object PathTypeDescription
event.nameStringThe name of the circle.
event.latNumericThe latitude of the map center when map dragging begins.
event.lngNumericThe longitude of the map center when map dragging begins.

onCircleLoad

Interaction event fired when the circle layer loads.

Object PathTypeDescription
event.nameStringThe name of the circle layer.

onCircleMouseDown

Interaction event fired on the mousedown of the circle

Object PathTypeDescription
event.nameStringThe name of the circle.
event.latNumericThe latitude of the mouse location on the circle layer.
event.lngNumericThe longitude of the mouse location on the circle layer.

onCircleMouseMove

Interaction event fired when the mousemove of the circle

Object PathTypeDescription
event.nameStringThe name of the circle.
event.latNumericThe latitude of the mouse location on the circle layer.
event.lngNumericThe longitude of the mouse location on the circle layer.

onCircleMouseOut

Interaction event fired when the mouseout of the circle

Object PathTypeDescription
event.nameStringThe name of the circle.
event.latNumericThe latitude of the mouse location on the circle layer.
event.lngNumericThe longitude of the mouse location on the circle layer.

onCircleMouseOver

Interaction event fired when the mouseover of the circle

Object PathTypeDescription
event.nameStringThe name of the circle.
event.latNumericThe latitude of the mouse location on the circle layer.
event.lngNumericThe longitude of the mouse location on the circle layer.

onCircleMouseUp

Interaction event fired when the mouseup of the circle

Object PathTypeDescription
event.nameStringThe name of the circle.
event.latNumericThe latitude of the mouse location on the circle layer.
event.lngNumericThe longitude of the mouse location on the circle layer.

onCircleRadiusChanged

Interaction event fired when the radius of the circle is changed.

Object PathTypeDescription
event.nameStringThe name of the circle.
event.radiusNumericThe radius of the circle.

onCircleRightClick

Interaction event fired on right-click of the circle layer.

Object PathTypeDescription
event.nameStringThe name of the circle.
event.latNumericThe latitude of the mouse location on the circle layer.
event.lngNumericThe longitude of the mouse location on the circle layer.

onCircleUnmount

Interaction event fired when the circle unloads.

Object PathTypeDescription
event.nameStringThe name of the circle.

GroundOverlay Events

onGroundOverlayClick

Interaction event fired when the ground overlay is clicked.

Object PathTypeDescription
event.nameStringThe name of the ground overlay layer.
event.latNumericThe latitude of where on the ground overlay the user clicked.
event.lngNumericThe longitude of where on the ground overlay the user clicked.

onGroundOverlayDoubleClick

Interaction event fired when the ground overlay is double-clicked.

Object PathTypeDescription
event.nameStringThe name of the ground overlay layer.
event.latNumericThe latitude of where on the ground overlay the user double-clicked.
event.lngNumericThe longitude of where on the ground overlay the user double-clicked.

onGroundOverlayLoad

Interaction event fired when the ground overlay layer is loaded.

Object PathTypeDescription
event.nameStringThe name of the ground overlay layer.

onGroundOverlayUnmount

Interaction event fired when the ground overlay layer unloads.

Object PathTypeDescription
event.nameStringThe name of the ground overlay layer.

KmlLayer Events

OnKmlLayerClick

Interaction event fired when a feature in the KML layer is clicked.

Object PathTypeDescription
event.nameStringThe name of the KML layer.
event.featuredDataObjectContains information about the clicked feature.
event.latNumericThe latitude of where the information pop-up window is anchored on the KML layer.
event.lngNumericThe longitude of where the information pop-up window is anchored on the KML layer.
event.pixelOffsetObjectThe offset to apply to the anchored information pop-up window on the clicked feature.

OnKmlLayerDefaultViewportChanged

Interaction event fired when the KML layer default viewport has changed.

Object PathTypeDescription
event.nameStringThe name of the KML layer.

OnKmlLayerLoad

Interaction event fired when the KML layer loads.

Object PathTypeDescription
event.nameStringThe name of the KML layer.

OnKmlLayerStatusChanged

Interaction event fired when the KML layer has finished loading.

Object PathTypeDescription
event.nameStringThe name of the KML layer.

OnKmlLayerUnmount

Interaction event fired when the KML layer unloads.

Object PathTypeDescription
event.nameStringThe name of the KML layer.

Marker Events

onMarkerClick

Interaction event fired when the marker is clicked. Returns the lat and lng of the marker click.

Object PathTypeDescription
event.nameStringThe name of the marker.
event.latNumericThe latitude of the marker click.
event.lngNumericThe longitude of the marker click.

onMarkerDoubleClick

Interaction event fired when the marker is double-clicked. Returns the lat and lng of the marker double- click.

Object PathTypeDescription
event.nameStringThe name of the marker.
event.latNumericThe latitude of where the marker was double-clicked.
event.lngNumericThe longitude of where the marker was double-clicked.

onMarkerDrag

Interaction event repeatedly fired while the user drags the marker. Returns the lat and lng of the marker while moving.

Object PathTypeDescription
event.nameStringThe name of the marker.
event.latNumericThe latitude of the marker while being dragged.
event.lngNumericThe longitude of the marker while being dragged.

onMarkerDragEnd

Interaction event fired when the user stops dragging the marker. Returns the lat and lng of the new marker position.

Object PathTypeDescription
event.nameStringThe name of the marker.
event.latNumericThe latitude of the marker after the marker movement is over.
event.lngNumericThe longitude of the marker after the marker movement is over.

onMarkerDragStart

Interaction event fired when the user starts dragging the marker. Returns the lat and lng of the starting marker position.

Object PathTypeDescription
event.nameStringThe name of the marker.
event.latNumericThe latitude of the marker when the marker dragging begins.
event.lngNumericThe longitude of the marker when the marker dragging begins.

onMarkerLoad

Interaction event fired when the marker layer loads.

Object PathTypeDescription
event.nameStringThe name of the marker layer.

onMarkerMouseDown

Interaction event fired on the mousedown of the marker.

Object PathTypeDescription
event.nameStringThe name of the marker.
event.latNumericThe latitude of the marker location.
event.lngNumericThe longitude of the marker location.

onMarkerMouseOut

Interaction event fired on mouseout of the marker.

Object PathTypeDescription
event.nameStringThe name of the marker.
event.latNumericThe latitude of the event.
event.lngNumericThe longitude of the event.

onMarkerMouseOver

Interaction event fired on mouseover of the marker.

Object PathTypeDescription
event.nameStringThe name of the marker.
event.latNumericThe latitude of the event.
event.lngNumericThe longitude of the event.

onMarkerMouseUp

Interaction event fired when the mouseup of the marker.

Object PathTypeDescription
event.nameStringThe name of the marker.
event.latNumericThe latitude of the event.
event.lngNumericThe longitude of the event.

onMarkerPositionChanged

Interaction event fired when the position of the marker changes.

Object PathTypeDescription
event.nameStringThe name of the marker.
event.latNumericThe latitude of the new marker position.
event.lngNumericThe longitude of the new marker position.

onMarkerRightClick

Interaction event fired on the right-click of the marker.

Object PathTypeDescription
event.nameStringThe name of the marker.
event.latNumericThe latitude of the event location.
event.lngNumericThe longitude of the event location.

onMarkerUnmount

Interaction event fired when the marker layer unloads.

Object PathTypeDescription
event.nameStringThe name of the marker layer.

onMarkerPopupOpened

Interaction event fired when a marker popup opens.

Object PathTypeDescription
event.nameStringThe name of the marker layer.

onMarkerPopupClosed

Interaction event fired when a marker popup closes.

Object PathTypeDescription
event.nameStringThe name of the marker layer.

OverlayView Events

onOverlayViewLoad

Interaction event fired when the OverlayView layer loads.

Object PathTypeDescription
event.nameStringThe name of the OverView layer.

onOverlayViewUnmount

Interaction event fired when the OverlayView layer unloads.

Object PathTypeDescription
event.nameStringThe name of the OverView layer.

Polygon Events

onPolygonClick

Interaction event fired when the polygon is clicked. Returns the lat and lng of the mouse click as it translates on the polygon later

Object PathTypeDescription
event.nameStringThe name of the polygon layer.
event.latNumericThe latitude of where on the map the user clicked.
event.lngNumericThe longitude of where on the map the user clicked.

onPolygonDoubleClick

Interaction event fired when the polygon is double-clicked. Returns the lat and lng of the mouse double-click as it translates on the polygon layer.

Object PathTypeDescription
event.nameStringThe name of the polygon layer.
event.latNumericThe latitude of where on the polygon the user double-clicked.
event.lngNumericThe longitude of where on the polygon the user double-clicked.

onPolygonDrag

Interaction event repeatedly fired while the user drags the polygon.

Object PathTypeDescription
event.nameStringThe name of the polygon layer.
event.latNumericThe latitude of the polygon while the user moves it.
event.lngNumericThe longitude of the polygon while the user moves it.

onPolygonDragEnd

Interaction event fired when the user stops dragging the polygon. Returns the lat and lng of the new polygon location.

Object PathTypeDescription
event.nameStringThe name of the polygon layer.
event.latNumericThe latitude of the polygon after the polygon movement is over.
event.lngNumericThe longitude of the polygon after the polygon movement is over.

onPolygonDragStart

Interaction event fired when the user starts dragging the polygon. Returns the lat and lng of the starting polygon location.

Object PathTypeDescription
event.nameStringThe name of the polygon layer.
event.latNumericThe latitude of the polygon when the users starts dragging the polygon.
event.lngNumericThe longitude of the polygon when the users starts dragging the polygon.

onPolygonLoad

Interaction event fired when the polygon layer loads.

Object PathTypeDescription
event.nameStringThe name of the polygon layer.

onPolygonMouseDown

Interaction event fired on the mousedown of the polygon.

Object PathTypeDescription
event.nameStringThe name of the polygon.
event.latNumericThe latitude of the mouse location on the polygon layer.
event.lngNumericThe longitude of the mouse location on the polygon layer.

onPolygonMouseMove

Interaction event fired when the user's mouse moves over the polygon layer. Returns the lat and lng of the mouse location on the map.

Object PathTypeDescription
event.nameStringThe name of the polygon layer.
event.latNumericThe latitude of the mouse location on the map.
event.lngNumericThe longitude of the mouse location on the map.

onPolygonMouseOut

Interaction event fired when the user's mouse exits the polygon layer.

Object PathTypeDescription
event.nameStringThe name of the polygon layer.
event.latNumericThe latitude of the mouse location when exiting the map.
event.lngNumericThe longitude of the mouse location exiting the map.

onPolygonMouseOver

Interaction event fired when the user's mouse enters the polygon layer.

Object PathTypeDescription
event.nameStringThe name of the polygon layer.
event.latNumericThe latitude of the mouse location when entering the polygon.
event.lngNumericThe longitude of the mouse location entering the polygon.

onPolygonMouseUp

Interaction event fired when the mouseup of the polygon layer.

Object PathTypeDescription
event.nameStringThe name of the polygon layer.
event.latNumericThe latitude of the mouse location on the circle layer.
event.lngNumericThe longitude of the mouse location on the circle layer.

onPolygonRightClick

Interaction event fired when the DOM contextmenu event is fired on the polygon layer.

Object PathTypeDescription
event.latNumericThe latitude of the mouse location.
event.lngNumericThe longitude of the mouse location.

onPolygonUnmount

Interaction event fired when the polygon layer unloads.

Object PathTypeDescription
event.nameStringThe name of the polygon layer.

Polyline Events

onPolylineClick

Interaction event fired when the map is clicked. Returns the lat and lng of the mouse click as it translates on the map.

Object PathTypeDescription
event.latNumericThe latitude of where on the polyline the user clicked.
event.lngNumericThe longitude of where on the polyline the user clicked.

onPolylineDoubleClick

Interaction event fired when the map is double-clicked. Returns the lat and lng of the mouse double-click as it translates on the polyline.

Object PathTypeDescription
event.latNumericThe latitude of where on the polyline the user double-clicked.
event.lngNumericThe longitude of where on the polyline the user double-clicked.

onPolylineDrag

Interaction event repeatedly fired while the user drags the polyline.

Object PathTypeDescription
event.nameStringThe name of the circle.
event.latNumericThe latitude of the polyline while the user moves the map.
event.lngNumericThe longitude of the polyline while the user moves the map.

onPolylineDragEnd

Interaction event fired when the user stops dragging thepolyline. Returns the lat and lng of the new polyline.

Object PathTypeDescription
event.latNumericThe latitude of the polyline center after the map movement is over.
event.lngNumericThe longitude of the polyline center after the map movement is over.

onPolylineDragStart

Interaction event fired when the user starts dragging the polyline. Returns the lat and lng of the starting polyline center.

Object PathTypeDescription
event.latNumericThe latitude of the polyline center when map dragging begins.
event.lngNumericThe longitude of the polyline center when map dragging begins.

onPolylineLoad

Interaction event fired when the polyline layer loads.

Object PathTypeDescription
event.nameStringThe name of the polyline layer.

onPolylineMouseDown

Interaction event fired on the mousedown of the polyline.

Object PathTypeDescription
event.nameStringThe name of the polyline.
event.latNumericThe latitude of the mouse location on the polyline layer.
event.lngNumericThe longitude of the mouse location on the polyline layer.

onPolylineMouseMove

Interaction event fired when the user's mouse moves over the polyline layer. Returns the lat and lng of the mouse location on the polyline.

Object PathTypeDescription
event.latNumericThe latitude of the mouse location on the polyline.
event.lngNumericThe longitude of the mouse location on the polyline.

onPolylineMouseOut

Interaction event fired when the user's mouse exits the polyline.

Object PathTypeDescription
event.latNumericThe latitude of the mouse location when exiting the polyline.
event.lngNumericThe longitude of the mouse location exiting the polyline.

onPolylineMouseOver

Interaction event fired when the user's mouse enters the polyline.

Object PathTypeDescription
event.latNumericThe latitude of the mouse location when entering the polyline.
event.lngNumericThe longitude of the mouse location entering the polyline.

onPolylineMouseUp

Interaction event fired when the mouseup of the polyline.

Object PathTypeDescription
event.nameStringThe name of the circle.
event.latNumericThe latitude of the mouse location on the polyline layer.
event.lngNumericThe longitude of the mouse location on the polyline layer.

onPolylineRightClick

Interaction event fired when the DOM contextmenu event is fired on the polyline.

Object PathTypeDescription
event.latNumericThe latitude of the mouse location.
event.lngNumericThe longitude of the mouse location.

onPolylineUnmount

Interaction event fired when the polyline layer unloads.

Object PathTypeDescription
event.nameStringThe name of the polyline.

Rectangle Events

onRectangleBoundsChanged

Called when the viewport bounds of the rectangle have changed. Returns the north, south, east, and west bound points.

Object PathTypeDescription
event.northNumericThe latitude value for the Northern boundary.
event.eastNumericThe longitude value for the Eastern boundary.
event.southNumericThe latitude value for the Southern boundary.
event.westNumericThe longitude value for the Western boundary.

onRectangleClick

Interaction event fired when the rectangle is clicked. Returns the lat and lng of the mouse click.

Object PathTypeDescription
event.latNumericThe latitude of where the user clicked.
event.lngNumericThe longitude of where the user clicked.

onRectangleDoubleClick

Interaction event fired when the rectangle is double-clicked. Returns the lat and lng of the mouse double-click as it translates on the map.

Object PathTypeDescription
event.latNumericThe latitude of where the user double-clicked.
event.lngNumericThe longitude of where the user double-clicked.

onRectangleDrag

Interaction event repeatedly fired while the user drags the rectangle.

Object PathTypeDescription
event.nameStringThe name of the rectangle.
event.latNumericThe latitude of the rectangle center while the user moves the rectangle.
event.lngNumericThe longitude of the rectangle center while the user moves the rectangle.

onRectangleDragEnd

Interaction event fired when the user stops dragging the rectangle. Returns the lat and lng of the new rectangle center.

Object PathTypeDescription
event.nameStringThe name of the rectangle.
event.latNumericThe latitude of the rectangle center while the user moves the rectangle.
event.lngNumericThe longitude of the rectangle center while the user moves the rectangle.

onRectangleDragStart

Interaction event fired when the user starts dragging the rectangle. Returns the lat and lng of the starting rectangle center.

Object PathTypeDescription
event.nameStringThe name of the rectangle.
event.latNumericThe latitude of the rectangle center while the user moves the rectangle.
event.lngNumericThe longitude of the rectangle center while the user moves the rectangle.

onRectangleLoad

Interaction event fired when the rectangle layer loads.

Object PathTypeDescription
event.nameStringThe name of the rectangle layer.

onRectangleMouseDown

Interaction event fired on the mousedown of the rectangle.

Object PathTypeDescription
event.nameStringThe name of the rectangle.
event.latNumericThe latitude of the mouse location on the rectangle layer.
event.lngNumericThe longitude of the mouse location on the rectangle layer.

onRectangleMouseMove

Interaction event fired when the user's mouse moves over the rectangle. Returns the lat and lng of the mouse location.

Object PathTypeDescription
event.nameStringThe name of the rectangle.
event.latNumericThe latitude of the mouse location on the rectangle layer.
event.lngNumericThe longitude of the mouse location on the rectangle layer.

onRectangleMouseOut

Interaction event fired when the user's mouse exits the rectangle.

Object PathTypeDescription
event.nameStringThe name of the rectangle.
event.latNumericThe latitude of the mouse location on the rectangle layer.
event.lngNumericThe longitude of the mouse location on the rectangle layer.

onRectangleMouseOver

Interaction event fired when the user's mouse enters the rectangle.

Object PathTypeDescription
event.nameStringThe name of the rectangle.
event.latNumericThe latitude of the mouse location on the rectangle layer.
event.lngNumericThe longitude of the mouse location on the rectangle layer.

onRectangleMouseUp

Interaction event fired when the mouseup of the rectangle.

Object PathTypeDescription
event.nameStringThe name of the rectangle.
event.latNumericThe latitude of the mouse location on the rectangle layer.
event.lngNumericThe longitude of the mouse location on the rectangle layer.

onRectangleRightClick

Interaction event fired when the DOM contextmenu event is fired on the rectangle.

Object PathTypeDescription
event.nameStringThe name of the rectangle.
event.latNumericThe latitude of the mouse location.
event.lngNumericThe longitude of the mouse location.

onRectangleUnmount

Interaction event fired when the KML layer unloads.

Object PathTypeDescription
event.nameStringThe name of the rectangle.

TrafficLayer Events

OnTrafficLayerLoad

Interaction event fired when the traffic layer loads.

Object PathTypeDescription
event.nameStringThe name of the traffic layer.

OnTrafficLayerUnmount

Interaction event fired when the traffic layer unloads.

Object PathTypeDescription
event.nameStringThe name of the traffic layer.

TransitLayer Events

OnTransitLayerLoad

Interaction event fired when the transit layer loads.

Object PathTypeDescription
event.nameStringThe name of the transit layer.

OnTransitLayerUnmount

Interaction event fired when the transit layer unloads.

Object PathTypeDescription
event.nameStringThe name of the transit layer.

Component Functions

fitBounds

  • Description
    • Sets the viewport to contain the given bounds. When the map is set to display none, the fitBounds function reads the map's size as 0x0 and does not do anything.
  • Parameters
    • Dictionary latLngBounds - A dictionary consisting of two LatLng objects. The LatLng objects combined represent the geographical bounds the map view should be set to.
    • Numeric padding - Padding in pixels. The value represents the same padding for all four sides of the map. The bounds will be fit in the part of the map that remains after padding is removed. [optional]
  • Return None

panBy

  • Description
    • 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).
  • Parameters
    • Numeric x - Number of pixels to move the map in the x direction.
    • Numeric y - Number of pixels to move the map in the y direction.
  • Return
    • None

panTo

  • Description
    • Pans the map to a given center. If the change is less than both the width and height of the map, the transition will be smoothly animated.
  • Parameters
    • Dictionary latLng - The geographic point to pan to.
  • Return
    • None

panToBounds

  • Description
    • Pans the map by the minimum amount necessary to contain the given LatLngBounds so that the map will be panned to show as much of the bounds as possible inside {currentMapSizeInPx} - {padding}. The map's zoom, tilt, and heading will not be changed.
  • Parameters
    • Dictionary latLngBounds - A dictionary consisting of two LatLng objects. The LatLng objects combined represent the geographical bounds the map view will be set to.
    • Numeric padding - Padding in pixels. The value represents the same padding for all four sides of the map. [optional]
  • Return
    • None

setCenter

  • Description
    • Sets the geographical center of the map in latitude and longitude.
  • Parameters
    • Dictionary latLngBounds - A dictionary consisting of two LatLng objects as { lat: number, lng: number }.
  • Return
    • None

setClickableIcons

  • Description
    • Controls whether the map icons are clickable or not. A map icon represents a point of interest (POI).
  • Parameters
    • Boolean value - True to enable clickable map icons, false to disable the clickability of map icons.
  • Return
    • None

setHeading

  • Description
    • Sets the compass heading for map measured in degrees from cardinal direction North. This method only applies to aerial imagery.
  • Parameters
    • Numeric heading - The numerical value in degrees to set the compass heading for the map.
  • Return
    • None

setMapTypeId

  • Description
  • Parameters
    • String mapTypeId - A string identifier that is used to associate a MapType with a unique value.
  • Return
    • None

setTilt

  • Description
    • Controls the automatic switching behavior for the angle of incidence of the map. The only allowed values are 0 (default overhead view) and 45. A 45 degree tilt angle will automatically switch to 45 whenever 45° imagery is available for the current zoom level and viewport and switch back when not available.
  • Parameters
    • Numeric tilt - The numerical value of the tilt angle.
  • Return
    • None

setZoom

  • Description
    • Sets the zoom of the map.
  • Parameters
    • Numeric zoom - The numerical value to increase the zoom by. Larger zoom values correspond to a higher resolution.
  • Return
    • None

Extension Functions

This component does not have extension functions associated with it.