From 88d4a4c63d355c6e8eb9a9821ff1460eed8bd890 Mon Sep 17 00:00:00 2001 From: fredyrivera Date: Mon, 25 Sep 2017 15:23:09 -0500 Subject: [PATCH] correciones para mapa.php --- milfs/mapa.php | 36 ++++++++++-------------------------- 1 file changed, 10 insertions(+), 26 deletions(-) diff --git a/milfs/mapa.php b/milfs/mapa.php index b1824ae..b814bb2 100755 --- a/milfs/mapa.php +++ b/milfs/mapa.php @@ -2,7 +2,7 @@ -Display latitude longitude on marker movement +Mapa tupale.co @@ -43,7 +43,7 @@ var mapa = window.parent.document.getElementById(''); var z = map.getZoom(); mapa.value= m.lng+' '+m.lat+' '+z; } -//map.on('locationfound', onLocationFound); + } map.on('locationfound', onLocationFound); function onLocationError(e) { @@ -68,35 +68,19 @@ map.on('locationerror', onLocationError); var marker = L.marker([,],{draggable: true}).addTo(map); var mapa = window.parent.document.getElementById(''); + map.setView([, ], ); - // map.locate({setView: true, maxZoom: 16}); + marker.on('dragend', ondragend); + ondragend(); + function ondragend() { + var m = marker.getLatLng(); + var z = map.getZoom(); + mapa.value= m.lng+' '+m.lat+' '+z; + } -//var lat = window.parent.document.getElementById('lat'); -//var lng = window.parent.document.getElementById('lon'); -//var mapa = window.parent.document.getElementById(''); - -//var marker = L.marker([,],{draggable: true}).addTo(map); - - - -// every time the marker is dragged, update the coordinates container -//marker.on('dragend', ondragend); - -// Set the initial marker coordinate on load. -//ondragend(); - -/* -function ondragend() { - var m = marker.getLatLng(); - var z = map.getZoom(); - - // lat.value= m.lat; - // lng.value= m.lng; - mapa.value= m.lng+' '+m.lat+' '+z; -}*/