-
Notifications
You must be signed in to change notification settings - Fork 823
/
index.ts
Latest commit
33 lines (29 loc) · 593 Bytes
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/**
* @license
* Copyright 2019 Google LLC. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
// [START maps_marker_simple]
function initMap(): void {
const myLatLng = { lat: -25.363, lng: 131.044 };
const map = new google.maps.Map(
document.getElementById( "map" ) as HTMLElement,
{
zoom: 4,
center: myLatLng,
}
);
new google.maps.Marker({
position: myLatLng,
map,
title: "Hello World!",
});
}
declare global {
interface Window {
initMap: () => void;
}
}
window.initMap = initMap;
// [END maps_marker_simple]
export {};