forked from jason00111/parking
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
93 lines (59 loc) · 1.93 KB
/
index.html
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
90
91
92
93
<!DOCTYPE html>
<html>
<body>
<h1>My First Google Map</h1>
<div id="googleMap" style="width:100%;height:400px;"></div>
<script src="meter.js"></script>
<script>
function myMap() {
var mapProp = {
// center:new google.maps.LatLng(2112625.9794610441, 6059698.9833894819),
center: new google.maps.LatLng(37.78409100, -122.23709600),
zoom: 20,
};
var map = new google.maps.Map(document.getElementById("googleMap"), mapProp);
var marker = new google.maps.Marker({
position: {
lat: 37.78409100,
lng: -122.23709600
},
map: map,
title: 'Hello World!'
})
var bigArray = meter.result.records.map(record => record.lonlatconc.split(', ').map(string => JSON.parse(string)) )
// console.log('asdf', x)
bigArray.forEach( subarray =>
new google.maps.Marker({
position: {
lat: subarray[1],
lng: subarray[0]
},
map: map,
title: 'two'
})
)
}
// alert(meter)
// function initMap() {
// var myLatLng = {
// lat: 122.237096,
// lng: 37.784091
// };
//
// var map = new google.maps.Map(document.getElementById('map'), {
// zoom: 4,
// center: myLatLng
// });
//
// var marker = new google.maps.Marker({
// position: myLatLng,
// map: map,
// title: 'Hello World!'
// });
// }
</script>
<script src="https://maps.googleapis.com/maps/api/js?callback=myMap"></script>
<style>
</style>
</body>
</html>