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.