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');