We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 36f5905 commit a21fd5eCopy full SHA for a21fd5e
1 file changed
samples/layer-traffic/index.ts
@@ -8,15 +8,14 @@
8
async function initMap(): Promise<void> {
9
await google.maps.importLibrary('maps');
10
11
- const mapElement = document.querySelector(
12
- 'gmp-map'
13
- ) as google.maps.MapElement;
+ const mapElement =
+ document.querySelector<google.maps.MapElement>('gmp-map')!;
14
const innerMap = mapElement.innerMap;
15
16
const trafficLayer = new google.maps.TrafficLayer();
17
18
trafficLayer.setMap(innerMap);
19
}
20
21
-initMap();
+void initMap();
22
// [END maps_layer_traffic]
0 commit comments