routing weiter
This commit is contained in:
parent
e085ae349e
commit
bac7c6bd69
29
index.html
29
index.html
@ -27,9 +27,9 @@
|
||||
<div id="map"></div>
|
||||
<script type="text/javascript">
|
||||
var map = L.map('map').setView([50.733574532762226, 7.094633909697851], 13);
|
||||
L.geolet({position: 'bottomleft'}).addTo(map);
|
||||
var geo = L.geolet({position: 'bottomleft'}).addTo(map);
|
||||
|
||||
L.Routing.control({
|
||||
/*L.Routing.control({
|
||||
waypoints: [
|
||||
L.latLng(50.774764415306535, 7.20034003349655),
|
||||
L.latLng(50.79352197874706, 7.202796261625698)
|
||||
@ -37,7 +37,7 @@
|
||||
router: L.Routing.osrmv1({
|
||||
profile: 'walking'
|
||||
})
|
||||
}).addTo(map);
|
||||
}).addTo(map);*/
|
||||
|
||||
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
maxZoom: 19,
|
||||
@ -51,8 +51,29 @@
|
||||
className: 'dump'
|
||||
});
|
||||
|
||||
L.marker([50.79352197874706, 7.202796261625698],{icon: dump}).addTo(map).bindPopup("<b>Siegburg</b><br>NTA-Raum<br>Schlüssel: 7625");
|
||||
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");
|
||||
|
||||
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++;
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
Loading…
Reference in New Issue
Block a user