This repository has been archived by the owner on May 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathhome.html
147 lines (143 loc) · 4.22 KB
/
home.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<!DOCTYPE html>
<html lang="en-us">
<head>
<title>CAM2 Cameras</title>
<link rel="stylesheet" href="jquery-jvectormap-2.0.3.css" type="text/css" media="screen"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script src="jquery-jvectormap-2.0.3.min.js"></script>
<script src="jquery-jvectormap-world-mill.js"></script>
<script type="text/javascript" src="data/cameraData.js" ></script>
<script type="text/javascript" src="data/stateData.js"></script>
<script src="jquery-jvectormap-us-aea.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?KEY=AIzaSyDRb6HaVtHDbpHkJq8a3MEODFZlmkBt7f4"></script>
<script src="data/cameras.json"></script>
<script type="text/javascript" src="https://cdn.rawgit.com/googlemaps/js-marker-clusterer/gh-pages/src/markerclusterer.js"></script>
<script>
function initialize() {
var center = new google.maps.LatLng(39, -95)
var map = new google.maps.Map(document.getElementById('map-cluster'), {
zoom: 1,
center: center,
mapTypeId: google.maps.MapTypeId.ROADMAP,
disableDefaultUI: true,
styles: [
{
featureType: "all",
elementType: "labels",
stylers: [
{ visibility: "off" }
]
},
{
featureType: "administrative.country",
elementType: "geometry.stroke",
stylers: [
{ visibility: "off" }
]
}
]
});
var markers = [];
for (var i = 0; i < 118264; i++) {
var camera = cameras.cameras[i];
var latLng = new google.maps.LatLng(camera.latitude,
camera.longitude);
var marker = new google.maps.Marker({
position: latLng
});
markers.push(marker);
}
var markerCluster = new MarkerClusterer(map, markers, {imagePath: google.maps.SymbolPath.CIRCLE, gridSize: 31});
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
<style >
body {
margin: 0;
padding: 10px 20px 20px;
font-family: Arial;
font-size: 16px;
}
#map-container {
padding: 6px;
border-width: 1px;
border-style: solid;
border-color: #ccc #ccc #999 #ccc;
-webkit-box-shadow: rgba(64, 64, 64, 0.5) 0 2px 5px;
-moz-box-shadow: rgba(64, 64, 64, 0.5) 0 2px 5px;
box-shadow: rgba(64, 64, 64, 0.1) 0 2px 5px;
width: 600px;
}
#map-cluster {
width: 600px;
height: 400px;
}
#map-heat {
width: 600px;
height: 400px;
}
#floating-panel {
position: absolute;
top: 10px;
left: 25%;
z-index: 5;
background-color: #fff;
padding: 5px;
border: 1px solid #999;
text-align: center;
font-family: 'Roboto','sans-serif';
line-height: 30px;
padding-left: 10px;
}
#floating-panel {
background-color: #fff;
border: 1px solid #999;
left: 25%;
padding: 5px;
position: absolute;
top: 10px;
z-index: 5;
}
</style>
</head>
<body>
<div id="world-map-camera" style="width: 600px; height: 400px"></div>
<script>
$(function(){
$('#world-map-camera').vectorMap({
map: 'world_mill',
series: {
regions: [{
values: cameraData,
scale: ['#C8EEFF', '#0071A4'],
normalizeFunction: 'polynomial'
}]
},
onRegionTipShow: function(e, el, code){
el.html(el.html()+' (# Cameras - '+cameraData[code]+')');
}
});
});
</script>
<div id="state-map-camera" style="width: 600px; height: 400px"></div>
<script>
$(function(){
$('#state-map-camera').vectorMap({
map: 'us_aea',
series: {
regions: [{
values: stateData,
scale: ['#E8E8E8', '#696969'],
normalizeFunction: 'linear'
}]
},
onRegionTipShow: function(e, el, code){
el.html(el.html()+' (# Cameras - '+stateData[code]+')');
}
});
});
</script>
<div id="map-cluster">
</div>
</body>
</html>