Stay organized with collections Save and categorize content based on your preferences.
ElevationElement classgoogle.maps.elevation.ElevationElement
class
Notice: Available only in the v=alpha channel.
An HTML element that visually displays elevation data. Set the element's path
property to show a graph of elevation along the path. To use the Elevation Element, enable the Places UI Kit API for your project in the Google Cloud console.
Custom element:<gmp-elevation unit-system="imperial"></gmp-elevation>
This class extends HTMLElement
.
This class implements ElevationElementOptions
.
Access by calling const {ElevationElement} = await google.maps.importLibrary("elevation")
.
See Libraries in the Maps JavaScript API.
path
Type: Array<LatLng|LatLngLiteral|LatLngAltitude> optional
The path along which to show elevation data. Line segments will be interpolated in between the points of the array; even a small number of points will still produce a detailed elevation graph.
If only one point is provided, the widget will show the elevation number for that point.
unitSystem
Type: UnitSystem optional
Determines if elevation will be shown in feet/miles or meters/km. If undefined, the widget will default to the preferred unit system for the region specified in the API loader.
HTML attribute:<gmp-elevation unit-system="imperial"></gmp-elevation>
<gmp-elevation unit-system="metric"></gmp-elevation>
addEventListener
Notice: Available only in the v=beta channel.
addEventListener(type, listener[, options])
type
: string
A case-sensitive string representing the event type to listen for.listener
: EventListener|EventListenerObject
The object that receives a notification. This must be a function or an object with the handleEvent methodoptions
: boolean|AddEventListenerOptions optional
See options. Custom events only support capture
and passive
.Return Value: void
Sets up a function that will be called whenever the specified event is delivered to the target. See
addEventListener.
removeEventListener
Notice: Available only in the v=beta channel.
removeEventListener(type, listener[, options])
type
: string
A string which specifies the type of event for which to remove an event listener.listener
: EventListener|EventListenerObject
The event listener of the event handler to remove from the event target.options
: boolean|EventListenerOptions optional
See options.Return Value: void
Removes an event listener previously registered with addEventListener from the target. See
removeEventListener.
Eventsgmp-load
function(event)
event
: Event
This event is fired when the element loads and renders its content. This event does not bubble.
gmp-requesterror
function(event)
event
: Event
This event is fired when a request to the backend was denied (e.g. incorrect API key). This event does not bubble.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-09 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-09 UTC."],[],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4