From 0308c25e1e80ffa5cc721491d39d8184e30d5818 Mon Sep 17 00:00:00 2001 From: fredyrivera Date: Thu, 13 Apr 2017 19:35:22 -0500 Subject: [PATCH] correccion en georeferencia de imagen --- milfs/includes/upload.php | 2 +- milfs/mapa.php | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/milfs/includes/upload.php b/milfs/includes/upload.php index f01c172..7e2f6c6 100755 --- a/milfs/includes/upload.php +++ b/milfs/includes/upload.php @@ -112,7 +112,7 @@ if ( !empty($exif['GPSLongitude']) && !empty($exif['GPSLatitude']) ) { if ( $exif['GPSLatitudeRef'] == 'S') $gps_latitude = -$gps_latitude; if($gps_latitude !='') { - $resultado = "../mapa.php?lon=$gps_latitude&lat=$gps_longitude&zoom=18&exif"; + $resultado = "../mapa.php?lon=$gps_latitude&lat=$gps_longitude&zoom=18&exif=$name"; }else{$resultado ="";} //$resultado = "$gps_longitude $gps_latitude"; diff --git a/milfs/mapa.php b/milfs/mapa.php index 87dbbc6..d805829 100755 --- a/milfs/mapa.php +++ b/milfs/mapa.php @@ -45,6 +45,11 @@ var mapa = window.parent.document.getElementById(''); } + + + map.on('locationfound', onLocationFound); + + function onLocationError(e) { //alert(e.message); var marker = L.marker([,],{draggable: true}).addTo(map); @@ -56,11 +61,8 @@ function onLocationError(e) { var z = map.getZoom(); mapa.value= m.lng+' '+m.lat+' '+z; } - } - - map.on('locationfound', onLocationFound); - map.on('locationerror', onLocationError); - + } + map.on('locationerror', onLocationError); map.locate({setView: true, maxZoom: 16}); //var lat = window.parent.document.getElementById('lat'); //var lng = window.parent.document.getElementById('lon');