-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
89 lines (84 loc) · 1.78 KB
/
script.js
File metadata and controls
89 lines (84 loc) · 1.78 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
function initMap() {
// Update MAP_ID with custom map ID
map = new google.maps.Map(document.getElementById('map'), {
center: {
lat: 22.33808648430366,
lng: 91.78683790978684,
},
zoom: 17,
mapId: '476d022a1a223c94',
mapTypeControl: true,
fullscreenControl: false,
streetViewControl: false,
});
// Name
// Latitude, Longitude
// Image URL
// scaledSize width, height
const markers = [
[
"RHRiday's House",
22.336738280224676, 91.78770087522804,
'yoshi_house.svg',
38,
31,
],
[
'You Are Here',
22.336558226143534, 91.78275024236284,
'pointer.svg',
30,
47.8,
],
[
'Ghost House',
22.336337418579255, 91.78678963002844,
'ghosthouse.svg',
40,
48,
],
['Castle', 22.339465873836108, 91.79043206980907, 'castle.svg', 40, 53],
['Warp Pipe', 22.339059007253145, 91.78506767091449, 'pipe.svg', 38, 42.5],
['Star World', 22.336052107932158, 91.7904857139885, 'star.svg', 38, 38],
[
'Donut Plains',
22.340666626275834, 91.78162369554563,
'hill_with_eyes.svg',
50,
60.7,
],
[
'Donut Plains',
22.3398528943469, 91.78168806856094,
'hill_with_eyes.svg',
50,
60.7,
],
[
'Donut Plains',
22.337987249412347, 91.7800787622269,
'hill_with_eyes.svg',
50,
60.7,
],
];
for (let i = 0; i < markers.length; i++) {
const currMarker = markers[i];
const marker = new google.maps.Marker({
position: { lat: currMarker[1], lng: currMarker[2] },
map,
title: currMarker[0],
icon: {
url: currMarker[3],
scaledSize: new google.maps.Size(currMarker[4], currMarker[5]),
},
animation: google.maps.Animation.DROP,
});
const infowindow = new google.maps.InfoWindow({
content: currMarker[0],
});
marker.addListener('click', () => {
infowindow.open(map, marker);
});
}
}