AirQualityMeterElement class
google.maps.airQuality
. AirQualityMeterElement
class
Displays air quality information for a given location.
Custom element: <gmp-air-quality-meter location="lat,lng" requested-language="string"></gmp-air-quality-meter>
This class extends HTMLElement
.
This class implements AirQualityMeterElementOptions
.
Access by calling const {AirQualityMeterElement} = await google.maps.importLibrary("airQuality")
.See Libraries in the Maps JavaScript API
.
Constructor
AirQualityMeterElement([options])
-
options
:AirQualityMeterElementOptions optional
Properties
LatLngLiteral
| LatLng
| LatLngAltitudeLiteral
| LatLngAltitude
optional
null
LatLngAltitude
.-
<gmp-air-quality-meter location="lat,lng"></gmp-air-quality-meter>
string optional
null
-
<gmp-air-quality-meter requested-language="string"></gmp-air-quality-meter>
Methods
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 method -
options
:boolean| AddEventListenerOptions optional
See options . Custom events only supportcapture
andpassive
.
void
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 .
void
Events |
|
---|---|
gmp-error
|
function()
Arguments: None
Event fired when the
AirQualityMeterElement
has an error in loading. |
gmp-load
|
function()
Arguments: None
Event fired when the
AirQualityMeterElement
has finished loading. |
AirQualityMeterElementOptions interface
google.maps.airQuality
. AirQualityMeterElementOptions
interface
AirQualityMeterElement options.
Properties |
|
---|---|
location
optional
|
Type:
LatLngLiteral
| LatLng
| LatLngAltitudeLiteral
| LatLngAltitude
optional
|
requestedLanguage
optional
|
Type:
string optional
|