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 Path | Type | Description |
|---|---|---|
| event.north | Numeric | The latitude value for the Northern boundary. |
| event.east | Numeric | The longitude value for the Eastern boundary. |
| event.south | Numeric | The latitude value for the Southern boundary. |
| event.west | Numeric | The 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 Path | Type | Description |
|---|---|---|
| event.lat | Numeric | The latitude value for the center of the map after being changed. |
| event.lng | Numeric | The 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 Path | Type | Description |
|---|---|---|
| event.lat | Numeric | The latitude of where on the map the user clicked. |
| event.lng | Numeric | The 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 Path | Type | Description |
|---|---|---|
| event.lat | Numeric | The latitude of where on the map the user double-clicked. |
| event.lng | Numeric | The 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 Path | Type | Description |
|---|---|---|
| event.lat | Numeric | The latitude of the map center while the user moves the map. |
| event.lng | Numeric | The 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 Path | Type | Description |
|---|---|---|
| event.lat | Numeric | The latitude of the map center after the map movement is over. |
| event.lng | Numeric | The 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 Path | Type | Description |
|---|---|---|
| event.lat | Numeric | The latitude of the map center when map dragging begins. |
| event.lng | Numeric | The 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 Path | Type | Description |
|---|---|---|
| event.heading | Numeric | The 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 Path | Type | Description |
|---|---|---|
| event.lat | Numeric | The latitude of the mouse location on the map. |
| event.lng | Numeric | The longitude of the mouse location on the map. |
onMapMouseOutβ
Interaction event fired when the user's mouse exits the map container.
| Object Path | Type | Description |
|---|---|---|
| event.lat | Numeric | The latitude of the mouse location when exiting the map. |
| event.lng | Numeric | The longitude of the mouse location exiting the map. |
onMapMouseOverβ
Interaction event fired when the user's mouse enters the map container.
| Object Path | Type | Description |
|---|---|---|
| event.lat | Numeric | The latitude of the mouse location when entering the map. |
| event.lng | Numeric | The 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 Path | Type | Description |
|---|---|---|
| event.width | Numeric | The width value of the map. |
| event.height | Numeric | The height value of the map. |
onMapRightClickβ
Interaction event fired when the DOM contextmenu event is fired on the map container.
| Object Path | Type | Description |
|---|---|---|
| event.lat | Numeric | The latitude of the mouse location. |
| event.lng | Numeric | The longitude of the mouse location. |
onMapTiltChangedβ
Interaction event fired when the map tilt property changes. Returns the new tilt value.
| Object Path | Type | Description |
|---|---|---|
| event.tilt | Numeric | The 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 Path | Type | Description |
|---|---|---|
| event.mapTypeId | String | The mapTypeId value of the map. |
onMapZoomChangedβ
Interaction event fired when the map zoom property changes. Returns the new zoom level.
| Object Path | Type | Description |
|---|---|---|
| event.zoom | Numeric | The zoom level of the map view. |
BicylingLayer Eventsβ
onBicyclingLayerLoadβ
Interaction event fired when the bicycling layer loads.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the bicycling layer. |
onBicyclingLayerUnmountβ
Interaction event fired when the bicycling layer unloads.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the bicycling layer. |
Circle Eventsβ
onCircleCenterChangedβ
Interaction event fired when the center of the circle changes.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the circle. |
| event.lat | Numeric | The latitude value of the center of the circle. |
| event.lng | Numeric | The longitude value of the center of the circle. |
onCircleClickβ
Interaction event fired when the circle is clicked.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the circle. |
| event.lat | Numeric | The latitude of where on the circle the user clicked. |
| event.lng | Numeric | The longitude of where on the circle the user clicked. |
onCircleDoubleClickβ
Interaction event fired when the circle is double-clicked.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the circle. |
| event.lat | Numeric | The latitude of where on the circle the user double-clicked. |
| event.lng | Numeric | The longitude of where on the circle the user double-clicked. |
onCircleDragβ
Interaction event repeatedly fired while the user drags the circle.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the circle. |
| event.lat | Numeric | The latitude of the map center while the user moves the map. |
| event.lng | Numeric | The longitude of the map center while the user moves the map. |
onCircleDragEndβ
Interaction event fired when the user stops dragging the circle.
| Object Path | Type | Description |
|---|---|---|
| event.lat | Numeric | The latitude of the map center while the user moves the map. |
| event.lng | Numeric | The longitude of the map center while the user moves the map. |
onCircleDragStartβ
Interaction event fired when the user starts dragging the circle.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the circle. |
| event.lat | Numeric | The latitude of the map center when map dragging begins. |
| event.lng | Numeric | The longitude of the map center when map dragging begins. |
onCircleLoadβ
Interaction event fired when the circle layer loads.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the circle layer. |
onCircleMouseDownβ
Interaction event fired on the mousedown of the circle
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the circle. |
| event.lat | Numeric | The latitude of the mouse location on the circle layer. |
| event.lng | Numeric | The longitude of the mouse location on the circle layer. |
onCircleMouseMoveβ
Interaction event fired when the mousemove of the circle
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the circle. |
| event.lat | Numeric | The latitude of the mouse location on the circle layer. |
| event.lng | Numeric | The longitude of the mouse location on the circle layer. |
onCircleMouseOutβ
Interaction event fired when the mouseout of the circle
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the circle. |
| event.lat | Numeric | The latitude of the mouse location on the circle layer. |
| event.lng | Numeric | The longitude of the mouse location on the circle layer. |
onCircleMouseOverβ
Interaction event fired when the mouseover of the circle
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the circle. |
| event.lat | Numeric | The latitude of the mouse location on the circle layer. |
| event.lng | Numeric | The longitude of the mouse location on the circle layer. |
onCircleMouseUpβ
Interaction event fired when the mouseup of the circle
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the circle. |
| event.lat | Numeric | The latitude of the mouse location on the circle layer. |
| event.lng | Numeric | The longitude of the mouse location on the circle layer. |
onCircleRadiusChangedβ
Interaction event fired when the radius of the circle is changed.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the circle. |
| event.radius | Numeric | The radius of the circle. |
onCircleRightClickβ
Interaction event fired on right-click of the circle layer.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the circle. |
| event.lat | Numeric | The latitude of the mouse location on the circle layer. |
| event.lng | Numeric | The longitude of the mouse location on the circle layer. |
onCircleUnmountβ
Interaction event fired when the circle unloads.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the circle. |
GroundOverlay Eventsβ
onGroundOverlayClickβ
Interaction event fired when the ground overlay is clicked.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the ground overlay layer. |
| event.lat | Numeric | The latitude of where on the ground overlay the user clicked. |
| event.lng | Numeric | The longitude of where on the ground overlay the user clicked. |
onGroundOverlayDoubleClickβ
Interaction event fired when the ground overlay is double-clicked.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the ground overlay layer. |
| event.lat | Numeric | The latitude of where on the ground overlay the user double-clicked. |
| event.lng | Numeric | The longitude of where on the ground overlay the user double-clicked. |
onGroundOverlayLoadβ
Interaction event fired when the ground overlay layer is loaded.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the ground overlay layer. |
onGroundOverlayUnmountβ
Interaction event fired when the ground overlay layer unloads.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the ground overlay layer. |
KmlLayer Eventsβ
OnKmlLayerClickβ
Interaction event fired when a feature in the KML layer is clicked.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the KML layer. |
| event.featuredData | Object | Contains information about the clicked feature. |
| event.lat | Numeric | The latitude of where the information pop-up window is anchored on the KML layer. |
| event.lng | Numeric | The longitude of where the information pop-up window is anchored on the KML layer. |
| event.pixelOffset | Object | The 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 Path | Type | Description |
|---|---|---|
| event.name | String | The name of the KML layer. |
OnKmlLayerLoadβ
Interaction event fired when the KML layer loads.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the KML layer. |
OnKmlLayerStatusChangedβ
Interaction event fired when the KML layer has finished loading.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the KML layer. |
OnKmlLayerUnmountβ
Interaction event fired when the KML layer unloads.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The 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 Path | Type | Description |
|---|---|---|
| event.name | String | The name of the marker. |
| event.lat | Numeric | The latitude of the marker click. |
| event.lng | Numeric | The 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 Path | Type | Description |
|---|---|---|
| event.name | String | The name of the marker. |
| event.lat | Numeric | The latitude of where the marker was double-clicked. |
| event.lng | Numeric | The 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 Path | Type | Description |
|---|---|---|
| event.name | String | The name of the marker. |
| event.lat | Numeric | The latitude of the marker while being dragged. |
| event.lng | Numeric | The 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 Path | Type | Description |
|---|---|---|
| event.name | String | The name of the marker. |
| event.lat | Numeric | The latitude of the marker after the marker movement is over. |
| event.lng | Numeric | The 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 Path | Type | Description |
|---|---|---|
| event.name | String | The name of the marker. |
| event.lat | Numeric | The latitude of the marker when the marker dragging begins. |
| event.lng | Numeric | The longitude of the marker when the marker dragging begins. |
onMarkerLoadβ
Interaction event fired when the marker layer loads.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the marker layer. |
onMarkerMouseDownβ
Interaction event fired on the mousedown of the marker.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the marker. |
| event.lat | Numeric | The latitude of the marker location. |
| event.lng | Numeric | The longitude of the marker location. |
onMarkerMouseOutβ
Interaction event fired on mouseout of the marker.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the marker. |
| event.lat | Numeric | The latitude of the event. |
| event.lng | Numeric | The longitude of the event. |
onMarkerMouseOverβ
Interaction event fired on mouseover of the marker.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the marker. |
| event.lat | Numeric | The latitude of the event. |
| event.lng | Numeric | The longitude of the event. |
onMarkerMouseUpβ
Interaction event fired when the mouseup of the marker.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the marker. |
| event.lat | Numeric | The latitude of the event. |
| event.lng | Numeric | The longitude of the event. |
onMarkerPositionChangedβ
Interaction event fired when the position of the marker changes.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the marker. |
| event.lat | Numeric | The latitude of the new marker position. |
| event.lng | Numeric | The longitude of the new marker position. |
onMarkerRightClickβ
Interaction event fired on the right-click of the marker.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the marker. |
| event.lat | Numeric | The latitude of the event location. |
| event.lng | Numeric | The longitude of the event location. |
onMarkerUnmountβ
Interaction event fired when the marker layer unloads.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the marker layer. |
onMarkerPopupOpenedβ
Interaction event fired when a marker popup opens.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the marker layer. |
onMarkerPopupClosedβ
Interaction event fired when a marker popup closes.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the marker layer. |
OverlayView Eventsβ
onOverlayViewLoadβ
Interaction event fired when the OverlayView layer loads.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the OverView layer. |
onOverlayViewUnmountβ
Interaction event fired when the OverlayView layer unloads.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The 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 Path | Type | Description |
|---|---|---|
| event.name | String | The name of the polygon layer. |
| event.lat | Numeric | The latitude of where on the map the user clicked. |
| event.lng | Numeric | The 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 Path | Type | Description |
|---|---|---|
| event.name | String | The name of the polygon layer. |
| event.lat | Numeric | The latitude of where on the polygon the user double-clicked. |
| event.lng | Numeric | The longitude of where on the polygon the user double-clicked. |
onPolygonDragβ
Interaction event repeatedly fired while the user drags the polygon.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the polygon layer. |
| event.lat | Numeric | The latitude of the polygon while the user moves it. |
| event.lng | Numeric | The 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 Path | Type | Description |
|---|---|---|
| event.name | String | The name of the polygon layer. |
| event.lat | Numeric | The latitude of the polygon after the polygon movement is over. |
| event.lng | Numeric | The 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 Path | Type | Description |
|---|---|---|
| event.name | String | The name of the polygon layer. |
| event.lat | Numeric | The latitude of the polygon when the users starts dragging the polygon. |
| event.lng | Numeric | The longitude of the polygon when the users starts dragging the polygon. |
onPolygonLoadβ
Interaction event fired when the polygon layer loads.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the polygon layer. |
onPolygonMouseDownβ
Interaction event fired on the mousedown of the polygon.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the polygon. |
| event.lat | Numeric | The latitude of the mouse location on the polygon layer. |
| event.lng | Numeric | The 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 Path | Type | Description |
|---|---|---|
| event.name | String | The name of the polygon layer. |
| event.lat | Numeric | The latitude of the mouse location on the map. |
| event.lng | Numeric | The longitude of the mouse location on the map. |
onPolygonMouseOutβ
Interaction event fired when the user's mouse exits the polygon layer.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the polygon layer. |
| event.lat | Numeric | The latitude of the mouse location when exiting the map. |
| event.lng | Numeric | The longitude of the mouse location exiting the map. |
onPolygonMouseOverβ
Interaction event fired when the user's mouse enters the polygon layer.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the polygon layer. |
| event.lat | Numeric | The latitude of the mouse location when entering the polygon. |
| event.lng | Numeric | The longitude of the mouse location entering the polygon. |
onPolygonMouseUpβ
Interaction event fired when the mouseup of the polygon layer.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the polygon layer. |
| event.lat | Numeric | The latitude of the mouse location on the circle layer. |
| event.lng | Numeric | The 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 Path | Type | Description |
|---|---|---|
| event.lat | Numeric | The latitude of the mouse location. |
| event.lng | Numeric | The longitude of the mouse location. |
onPolygonUnmountβ
Interaction event fired when the polygon layer unloads.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The 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 Path | Type | Description |
|---|---|---|
| event.lat | Numeric | The latitude of where on the polyline the user clicked. |
| event.lng | Numeric | The 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 Path | Type | Description |
|---|---|---|
| event.lat | Numeric | The latitude of where on the polyline the user double-clicked. |
| event.lng | Numeric | The longitude of where on the polyline the user double-clicked. |
onPolylineDragβ
Interaction event repeatedly fired while the user drags the polyline.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the circle. |
| event.lat | Numeric | The latitude of the polyline while the user moves the map. |
| event.lng | Numeric | The 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 Path | Type | Description |
|---|---|---|
| event.lat | Numeric | The latitude of the polyline center after the map movement is over. |
| event.lng | Numeric | The 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 Path | Type | Description |
|---|---|---|
| event.lat | Numeric | The latitude of the polyline center when map dragging begins. |
| event.lng | Numeric | The longitude of the polyline center when map dragging begins. |
onPolylineLoadβ
Interaction event fired when the polyline layer loads.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the polyline layer. |
onPolylineMouseDownβ
Interaction event fired on the mousedown of the polyline.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the polyline. |
| event.lat | Numeric | The latitude of the mouse location on the polyline layer. |
| event.lng | Numeric | The 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 Path | Type | Description |
|---|---|---|
| event.lat | Numeric | The latitude of the mouse location on the polyline. |
| event.lng | Numeric | The longitude of the mouse location on the polyline. |
onPolylineMouseOutβ
Interaction event fired when the user's mouse exits the polyline.
| Object Path | Type | Description |
|---|---|---|
| event.lat | Numeric | The latitude of the mouse location when exiting the polyline. |
| event.lng | Numeric | The longitude of the mouse location exiting the polyline. |
onPolylineMouseOverβ
Interaction event fired when the user's mouse enters the polyline.
| Object Path | Type | Description |
|---|---|---|
| event.lat | Numeric | The latitude of the mouse location when entering the polyline. |
| event.lng | Numeric | The longitude of the mouse location entering the polyline. |
onPolylineMouseUpβ
Interaction event fired when the mouseup of the polyline.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the circle. |
| event.lat | Numeric | The latitude of the mouse location on the polyline layer. |
| event.lng | Numeric | The longitude of the mouse location on the polyline layer. |
onPolylineRightClickβ
Interaction event fired when the DOM contextmenu event is fired on the polyline.
| Object Path | Type | Description |
|---|---|---|
| event.lat | Numeric | The latitude of the mouse location. |
| event.lng | Numeric | The longitude of the mouse location. |
onPolylineUnmountβ
Interaction event fired when the polyline layer unloads.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The 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 Path | Type | Description |
|---|---|---|
| event.north | Numeric | The latitude value for the Northern boundary. |
| event.east | Numeric | The longitude value for the Eastern boundary. |
| event.south | Numeric | The latitude value for the Southern boundary. |
| event.west | Numeric | The 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 Path | Type | Description |
|---|---|---|
| event.lat | Numeric | The latitude of where the user clicked. |
| event.lng | Numeric | The 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 Path | Type | Description |
|---|---|---|
| event.lat | Numeric | The latitude of where the user double-clicked. |
| event.lng | Numeric | The longitude of where the user double-clicked. |
onRectangleDragβ
Interaction event repeatedly fired while the user drags the rectangle.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the rectangle. |
| event.lat | Numeric | The latitude of the rectangle center while the user moves the rectangle. |
| event.lng | Numeric | The 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 Path | Type | Description |
|---|---|---|
| event.name | String | The name of the rectangle. |
| event.lat | Numeric | The latitude of the rectangle center while the user moves the rectangle. |
| event.lng | Numeric | The 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 Path | Type | Description |
|---|---|---|
| event.name | String | The name of the rectangle. |
| event.lat | Numeric | The latitude of the rectangle center while the user moves the rectangle. |
| event.lng | Numeric | The longitude of the rectangle center while the user moves the rectangle. |
onRectangleLoadβ
Interaction event fired when the rectangle layer loads.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the rectangle layer. |
onRectangleMouseDownβ
Interaction event fired on the mousedown of the rectangle.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the rectangle. |
| event.lat | Numeric | The latitude of the mouse location on the rectangle layer. |
| event.lng | Numeric | The 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 Path | Type | Description |
|---|---|---|
| event.name | String | The name of the rectangle. |
| event.lat | Numeric | The latitude of the mouse location on the rectangle layer. |
| event.lng | Numeric | The longitude of the mouse location on the rectangle layer. |
onRectangleMouseOutβ
Interaction event fired when the user's mouse exits the rectangle.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the rectangle. |
| event.lat | Numeric | The latitude of the mouse location on the rectangle layer. |
| event.lng | Numeric | The longitude of the mouse location on the rectangle layer. |
onRectangleMouseOverβ
Interaction event fired when the user's mouse enters the rectangle.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the rectangle. |
| event.lat | Numeric | The latitude of the mouse location on the rectangle layer. |
| event.lng | Numeric | The longitude of the mouse location on the rectangle layer. |
onRectangleMouseUpβ
Interaction event fired when the mouseup of the rectangle.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the rectangle. |
| event.lat | Numeric | The latitude of the mouse location on the rectangle layer. |
| event.lng | Numeric | The longitude of the mouse location on the rectangle layer. |
onRectangleRightClickβ
Interaction event fired when the DOM contextmenu event is fired on the rectangle.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the rectangle. |
| event.lat | Numeric | The latitude of the mouse location. |
| event.lng | Numeric | The longitude of the mouse location. |
onRectangleUnmountβ
Interaction event fired when the KML layer unloads.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the rectangle. |
TrafficLayer Eventsβ
OnTrafficLayerLoadβ
Interaction event fired when the traffic layer loads.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the traffic layer. |
OnTrafficLayerUnmountβ
Interaction event fired when the traffic layer unloads.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the traffic layer. |
TransitLayer Eventsβ
OnTransitLayerLoadβ
Interaction event fired when the transit layer loads.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The name of the transit layer. |
OnTransitLayerUnmountβ
Interaction event fired when the transit layer unloads.
| Object Path | Type | Description |
|---|---|---|
| event.name | String | The 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.
- 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
- 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 }.
- Dictionary latLngBounds - A dictionary consisting of two LatLng objects as
- 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.