Focus map on current location in location.php

This commit is contained in:
Klaus-Uwe Mitterer 2016-08-15 08:40:09 +02:00
parent 8106a6e40e
commit 1e4f32ade6

View file

@ -36,7 +36,7 @@ if ($result->num_rows > 0) {
<div id="map" style="height:500px;"></div>
<script>
var mymap = L.map("map").setView([0.0, 0.0], 0);
var mymap = L.map("map").setView([' . $row["lat"] . ", " . $row["lon"] . '], 12);
L.tileLayer("https://b.tile.openstreetmap.org/{z}/{x}/{y}.png").addTo(mymap);
var marker = L.marker([' . $row["lat"] . ", " . $row["lon"] . ']).addTo(mymap);
</script>