-
Notifications
You must be signed in to change notification settings - Fork 1
/
geo.html
145 lines (123 loc) · 4.67 KB
/
geo.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
<!DOCTYPE html>
<html ng-app="myApp">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular.min.js" > </script>
<script src="script.js"></script>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css" />
<script src="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.js"></script>
<style>
html, body, #mapid {
margin: 0;
padding: 0;
height: 100%;
width: 100%;
float: left;
text-align: left;
position: static;
}
.sidePanel {
margin-left: 75em;
width: 30em;
padding: 0em;
text-align: left;
position: absolute;
font-family: Arial;
font-size : 18px;
color: #3F51B5;
background-color: #9FA8DA;
height: 100%;
}
.studentlist {
font-family: Arial;
font-size: 18px;
color: #3F51B5;
}
</style>
</head>
<body>
<div id="mapid"></div>
<!-- <div id="textid"></div> -->
<div class="sidePanel" ng-controller="myCtrl">
<center>
<h1> Panel </h1>
<h2> Tracked Students </h2>
<ol>
<li ng-mouseover="true" ng-repeat="x in student">
{{x.name }} <!-- + x.classification + ' ' + x.phone}} -->
</li>
</ol>
</center>
</br>
</br>
<div ng-show="true">
{{x.classification}}
</div>
</div>
<script>
var mymap = L.map('mapid').setView([38.9221947,-77.0207865], 16);
L.tileLayer("https://api.tiles.mapbox.com/v4/mapbox.streets/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpbG10dnA3NzY3OTZ0dmtwejN2ZnUycjYifQ.1W5oTOnWXQ9R1w8u3Oo1yA", {
attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="http://mapbox.com">Mapbox</a>',
maxZoom: 18,
id: 'sushantsusan39',
accessToken: 'pk.eyJ1Ijoic3VzaGFudHN1c2FuMzkiLCJhIjoiY2lsZTZ6OGl5MGVqb3Voa3BpY3JsZXBtcCJ9.IXO82Vle6cGxtTJYPBQQIw'
}).addTo(mymap);
// L.polyline([[38.922, -77.0194],[38.9207463,-77.0225979]],
// {
// color: 'red',
// weight : 3,
// opacity: 0.5
// }).addTo(map)
var pointA = new L.LatLng(38.922, -77.0194);
var pointB = new L.LatLng(38.9207463,-77.0225979);
var pointList = [pointA, pointB];
var firstpolyline = new L.polyline(pointList, {
color: 'red',
weight: 10,
opacity: 0.5,
smoothFactor: 1
});
// Police Icon for the policeman
var policeIcon = new L.Icon({
iconUrl: 'https://dl.dropboxusercontent.com/s/g0g9zcw7wfsnpwk/City-Police-Badge-icon.png',
//shadowUrl: 'https://dl.dropboxusercontent.com/s/g8803amp99e37sr/marker-icon-red.png',
iconSize: [25, 41],
iconAnchor: [12, 41],
popupAnchor: [1, -34],
shadowSize: [41, 41]
});
//Icon for Police Head and Icon
var policeTauko = new L.Icon({
iconUrl: 'https://dl.dropboxusercontent.com/s/nv8o1ciyks0k732/cartman_cop_icon.png',
iconSize: [90,120],
iconAnchor: [12, 41],
popupAnchor: [1, -34],
shadowSize: [41, 41]
});
var campusPoliceOffice = L.marker([38.9197003,-77.0174145],{icon: policeIcon}).addTo(mymap);
var campusStatPolice1 = L.marker([38.9254894,-77.0228435],{icon: policeTauko}).addTo(mymap);
var campusStatPolice2 = L.marker([38.9282207,-77.0199194],{icon: policeTauko}).addTo(mymap);
var campusStatPolice3 = L.marker([38.9254226,-77.0239378],{icon: policeTauko}).addTo(mymap);
var campusStatPolice4 = L.marker([38.9274800,-77.0228435],{icon: policeTauko}).addTo(mymap);
var campusStatPolice5 = L.marker([38.9235459,-77.0215332],{icon: policeTauko}).addTo(mymap);
var campusStatPolice6 = L.marker([38.9167761,-77.025568],{icon: policeTauko}).addTo(mymap);
var campusStatPolice7 = L.marker([38.9203169,-77.0240974],{icon: policeTauko}).addTo(mymap);
campusStatPolice1.bindPopup("Stationary Police");
campusStatPolice2.bindPopup("Stationary Police");
campusStatPolice3.bindPopup("Stationary Police");
campusStatPolice4.bindPopup("Stationary Police");
campusStatPolice5.bindPopup("Stationary Police");
campusStatPolice6.bindPopup("Stationary Police");
campusStatPolice7.bindPopup("Stationary Police");
//for green map pointer icon
var policeIcon = new L.Icon({
iconUrl: 'https://dl.dropboxusercontent.com/s/g8803amp99e37sr/marker-icon-red.png',
//shadowUrl: 'https://dl.dropboxusercontent.com/s/g8803amp99e37sr/marker-icon-red.png',
iconSize: [35,51],
iconAnchor: [12, 41],
popupAnchor: [1, -34],
shadowSize: [41, 41]
});
//firstpolyline.addTo(mymap);
</script>
</body>
</html>