Schachtkarte/index.html

80 lines
2.4 KiB
HTML
Raw Permalink Normal View History

2024-10-27 17:15:02 +01:00
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
2024-10-27 18:03:00 +01:00
<title>Karte der Schächte</title>
2024-10-27 17:15:02 +01:00
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=" crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js" integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo=" crossorigin=""></script>
2024-10-27 18:01:29 +01:00
<script src="geolet.js"></script>
2024-11-05 19:58:45 +01:00
<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>
2024-10-27 18:01:29 +01:00
<style>
html, body {
height: 100%;
margin: 0;
}
#map {
height: 100%;
}
.dump {
background-color: rgba(255, 255, 255, 0.65);
box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.75);
}
</style>
2024-10-27 17:15:02 +01:00
</head>
<body>
2024-10-27 18:01:29 +01:00
<div id="map"></div>
2024-10-27 17:15:02 +01:00
<script type="text/javascript">
var map = L.map('map').setView([50.733574532762226, 7.094633909697851], 13);
2024-11-05 20:59:50 +01:00
var geo = L.geolet({position: 'bottomleft'}).addTo(map);
2024-10-27 18:01:29 +01:00
2024-11-05 20:59:50 +01:00
/*L.Routing.control({
2024-11-05 19:58:45 +01:00
waypoints: [
L.latLng(50.774764415306535, 7.20034003349655),
L.latLng(50.79352197874706, 7.202796261625698)
],
router: L.Routing.osrmv1({
profile: 'walking'
})
2024-11-05 20:59:50 +01:00
}).addTo(map);*/
2024-11-05 19:58:45 +01:00
2024-10-27 18:01:29 +01:00
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 19,
attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
}).addTo(map);
var dump = L.icon({
iconUrl: 'toilet.svg',
iconSize: [32, 32],
iconAnchor: [16, 16],
className: 'dump'
});
2024-11-05 20:59:50 +01:00
L.marker([50.79352197874706, 7.202796261625698],{icon: dump}).addTo(map).bindPopup("<b>Siegburg</b><br>NTA-Raum<br>Schlüssel: 7625").on("click", alert("jo"));
L.marker([50.78502467461052, 7.194023235645734],{icon: dump}).addTo(map).bindPopup("<b>Sankt Augustin Mülldorf</b><br>Stellwerk<br>Schlüssel: 7625");
2024-11-05 19:58:45 +01:00
2024-11-05 20:59:50 +01:00
function a() {
alert("jo");
}
setInterval(loop, 1000);
var i=0;
map.on('geolet_success', function (data) { if(data.first) { i=60; } });
function loop() {
var cur_pos = geo.getLatLng()
if(cur_pos !== null) {
if(i>29) {
i=0;
//alert(cur_pos);
}
}
i++;
}
2024-11-05 19:58:45 +01:00
2024-10-27 17:15:02 +01:00
</script>
</body>
</html>