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