-
Notifications
You must be signed in to change notification settings - Fork 0
/
MapMensen.html
182 lines (147 loc) · 6.82 KB
/
MapMensen.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
170
171
172
173
174
175
176
177
178
179
180
181
182
<!DOCTYPE html>
<html>
<head>
<title>MensaMap</title>
<link rel="stylesheet" href="./CSS/MapMensen.css">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css"
integrity="sha512-Rksm5RenBEKSKFjgI3a41vrjkw4EVPlJ3+OiI65vTjIdo9brlAacEuKOiQ5OFh7cOI1bkDwLqdLw3Zg0cRJAAQ=="
crossorigin="" />
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"
integrity="sha512-/Nsx9X4HebavoBvEBuyp3I7od5tA0UzAxs+j83KgC8PU0kgB4XiK4Lfe4y4cgBtaRJQEIFCW+oC506aPT2L1zw=="
crossorigin=""></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet.draw/0.4.2/leaflet.draw.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet.draw/0.4.2/leaflet.draw.js"></script>
<!-- Add icon library -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="./JS/Ajax.js"></script>
<link rel="stylesheet" href="https://unpkg.com/leaflet-routing-machine@latest/dist/leaflet-routing-machine.css" />
<script src="https://unpkg.com/leaflet-routing-machine@latest/dist/leaflet-routing-machine.js"></script>
<link rel"stylesheet" href="./JS/nominatim.js">
</head>
<body style = "background-color:white;">
<img id ="img1" />
<div class="header">
<a href="https://www.uni-muenster.de/de/">
<img src="https://upload.wikimedia.org/wikipedia/commons/7/7f/Logo_WWU_M%C3%BCnster.svg" width="150" height="62" align="left">
</a>
<a href="https://www.uni-muenster.de/Geoinformatics/">
<img src="https://www.uni-muenster.de/imperia/md/images/geoinformatics/_v/logo-ifgi-text-de.png" width="150" height="62" align="right">
</a>
</div>
<div class="header">
<h1>WWU-Finder</h1>
</div>
<div class="topnav" id="myTopnav">
<a href="neuerSpeicherort.html">Home</a>
<a href="Map.html">Zeichenkarte</a>
<a href="MapMensen.html">Mensakarte</a>
<a href="MapInstitute.html">Institutkarte</a>
<a href="Impressum.html">Impressum</a>
</div>
<div class="row">
<div class="column">
<h2>Happi Happi</h2>
</div>
</div>
<div class="row">
<div class="column">
<div><button class="button3" type="button" onclick="getPosition()">Wo bin ich?<br><i class="fa fa-map-marker" style="font-size:20px" color="white"></i> </button></div> <br />
<div class="border" id="mapid" style="height:500px; width:auto"></div>
</div>
<div class="column">
<div><button class="button3" type="button" id="btn">Mensa am Aasee<br></button></div>
<div id="mensa-info"></div>
</div>
<div class="column">
<div><button class="button3" type="button" id="btn1">Mensa am Ring<br></button></div>
<div id="mensa-info"></div>
</div>
<div class= "column">
<div><button class="button3" type="button" id="btn2">Mensa Da Vinci<br></button></div>
<div id="mensa-info"></div>
</div>
<div class="column">
<div><button class="button3" type="button" id="btn3">Mensa Bispinghof<br></button></div>
<div id="mensa-info"></div>
</div>
</div>
<!-- function for the map itself-->
<script>
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
osm = L.tileLayer(osmUrl, { maxZoom: 18, attribution: osmAttrib }),
map = new L.Map('mapid', { center: new L.LatLng(51.961, 7.618), zoom: 13 }),
drawnItems = L.featureGroup().addTo(map);
L.control.layers({
'osm': osm.addTo(map),
"google": L.tileLayer('http://www.google.cn/maps/vt?lyrs=s@189&gl=cn&x={x}&y={y}&z={z}', {
attribution: 'google'
})
}, { 'drawlayer': drawnItems }, { position: 'topleft', collapsed: false }).addTo(map);
map.addControl(new L.Control.Draw({
edit: {
featureGroup: drawnItems,
poly: {
allowIntersection: false
}
},
draw: {
polygon: {
allowIntersection: false,
showArea: true
}
}
}));
//get position of the user
function getPosition() {
map.locate({ setView: true, maxZoom: 16 });
}
function onLocationFound(e) {
var radius = e.accuracy / 2;
L.marker(e.latlng).addTo(map)
.bindPopup("You are within " + radius + " meters from this point").openPopup();
L.circle(e.latlng, radius).addTo(map);
}
//Function for the dropdown-menue (W3C)
function myFunction() {
var x = document.getElementById("myTopnav");
if (x.className === "topnav") {
x.className += " responsive";
} else {
x.className = "topnav";
}
}
//sets the marker for the institut for geoinformatiks and configures the popup
var markerA = L.marker([51.96538830000001, 7.600809400000003]).addTo(map);
markerA.bindPopup("Mensa am Ring <br> Domagstraße 61 <br> 48149 Münster <br> <image src='https://www.stw-muenster.de/content/uploads/2016/11/DSC_6054.jpg' width='150 px'></image>");
map.on('locationfound', onLocationFound);
var markerA = L.marker([51.9555792, 7.617196700000022]).addTo(map);
markerA.bindPopup("Mensa am Aasee <br> Bismarkallee 11 <br> 48151 Münster <br> <image src='https://www.stw-muenster.de/content/uploads/2016/10/b_DSC0088-1024x680.jpg' width='150 px'></image>");
map.on('locationfound', onLocationFound);
var markerA = L.marker([51.9750306, 7.602077399999985]).addTo(map);
markerA.bindPopup("Da Vinci <br> Leonardo-Campus 8 <br> 48149 Münster <br> <image src='https://www.stw-muenster.de/content/uploads/2016/10/DSC_5979.jpg' width='150 px'></image>");
map.on('locationfound', onLocationFound);
var markerA = L.marker([51.960425, 7.619727000000012]).addTo(map);
markerA.bindPopup("Mensa Bispinghof <br> Bispinghof 9 <br> 48143 Münster <br> <image src='https://www.online-tischreservierung.de/images/restaurants/Nordrhein-Westfalen/Mnster/o218o2qung/1.jpg' width='150 px'></image>");
map.on('locationfound', onLocationFound);
</script>
<!--json openmensa-->
<script src="mensa.js"></script>
<!-- <script src="./JS/Ajax.js"></script> -->
<!--Link to splitter.js Scriptfile
<script src="splitter.js"></script>-->
<div class="footer">
<div class="p-footer">© 2018 Copyright: WWU Münster, Ilka Pleiser</div>
</div>
</body>
</html>