-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmap.html
169 lines (147 loc) · 6.65 KB
/
map.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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<html>
<head>
<link rel="stylesheet" href="leaflet/leaflet.css" />
<script src="leaflet/leaflet.js"></script>
<style type='text/css'>
body {
margin: 0;
padding: 0;
font-family: Helvetica, sans-serif;
}
#map {
position: absolute;
top: 0;
bottom: 0;
width: 100%;
}
</style>
<script src="IN_VEHICLE.js"></script>
<script src="ON_FOOT.js"></script>
<script src="STILL.js"></script>
<script src="TILTING.js"></script>
<script src="UNKNOWN.js"></script>
<script src="photo.js"></script>
</head>
</body>
hi
<div id="map"></div>
<script type="text/javascript">
var map = L.map('map').setView([51.505, -0.09], 3);
//add tile layer basemap to the map
basemapUrl = 'http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png';
basemapAttribution = '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, © <a href="http://cartodb.com/attributions">CartoDB</a>';
basemapProperties = {minZoom: 3, maxZoom: 16, continuousWorld: false, noWrap: true, attribution: basemapAttribution};
var basemap = L.tileLayer(basemapUrl, basemapProperties);
map.addLayer(basemap);
// specify what the circle markers should look like
var markerStyles = {
radius: 6,
fillColor: '#1A5276', fillOpacity: 0.5,
color: '#333333', opacity: 0.7, weight: 1
};
// specify how to load the individual features
var overlayOptions = {
onEachFeature: function (feature, layer) {
layer.bindPopup(feature.properties.desc + '<br />' + feature.properties.year);
layer.on('click', function (e) {this.openPopup();});
},
pointToLayer: function (feature, latlng) {
return L.circleMarker(latlng, markerStyles);
}
};
// create the point data layer and add to map
var pointsLayer = L.geoJson(mydata0, overlayOptions);
map.addLayer(pointsLayer);
var markerStyles1 = {
radius: 6,
fillColor: '#21618C', fillOpacity: 0.5,
color: '#333333', opacity: 0.7, weight: 1
};
// specify how to load the individual features
var overlayOptions1 = {
onEachFeature: function (feature, layer) {
layer.bindPopup(feature.properties.desc + '<br />' + feature.properties.year);
layer.on('click', function (e) {this.openPopup();});
},
pointToLayer: function (feature, latlng) {
return L.circleMarker(latlng, markerStyles1);
}
};
// create the point data layer and add to map
var pointsLayer1 = L.geoJson(mydata1, overlayOptions1);
map.addLayer(pointsLayer1);
var markerStyles2 = {
radius: 6,
fillColor: '#117864', fillOpacity: 0.5,
color: '#333333', opacity: 0.7, weight: 1
};
// specify how to load the individual features
var overlayOptions2 = {
onEachFeature: function (feature, layer) {
layer.bindPopup(feature.properties.desc + '<br />' + feature.properties.year);
layer.on('click', function (e) {this.openPopup();});
},
pointToLayer: function (feature, latlng) {
return L.circleMarker(latlng, markerStyles2);
}
};
// create the point data layer and add to map
var pointsLayer2 = L.geoJson(mydata2, overlayOptions2);
map.addLayer(pointsLayer2);
var markerStyles3 = {
radius: 6,
fillColor: '#0E6655', fillOpacity: 0.5,
color: '#333333', opacity: 0.7, weight: 1
};
// specify how to load the individual features
var overlayOptions3 = {
onEachFeature: function (feature, layer) {
layer.bindPopup(feature.properties.desc + '<br />' + feature.properties.year);
layer.on('click', function (e) {this.openPopup();});
},
pointToLayer: function (feature, latlng) {
return L.circleMarker(latlng, markerStyles3);
}
};
// create the point data layer and add to map
var pointsLayer3 = L.geoJson(mydata3, overlayOptions3);
map.addLayer(pointsLayer3);
var markerStyles4 = {
radius: 6,
fillColor: '#BB8FCE', fillOpacity: 0.5,
color: '#333333', opacity: 0.7, weight: 1
};
// specify how to load the individual features
var overlayOptions4 = {
onEachFeature: function (feature, layer) {
layer.bindPopup(feature.properties.desc + '<br />' + feature.properties.year);
layer.on('click', function (e) {this.openPopup();});
},
pointToLayer: function (feature, latlng) {
return L.circleMarker(latlng, markerStyles4);
}
};
// create the point data layer and add to map
var pointsLayer4 = L.geoJson(mydata4, overlayOptions4);
map.addLayer(pointsLayer4);
var markerStyles6 = {
radius: 6,
fillColor: '#CB4335', fillOpacity: 0.5,
color: '#333333', opacity: 0.7, weight: 1
};
// specify how to load the individual features
var overlayOptions6 = {
onEachFeature: function (feature, layer) {
layer.bindPopup(feature.properties.desc + '<br />' + feature.properties.year);
layer.on('click', function (e) {this.openPopup();});
},
pointToLayer: function (feature, latlng) {
return L.circleMarker(latlng, markerStyles4);
}
};
// create the point data layer and add to map
var pointsLayer6 = L.geoJson(photodata, overlayOptions6);
map.addLayer(pointsLayer6);
</script>
</body>
</html>