correccion en georeferencia de imagen

This commit is contained in:
fredyrivera 2017-04-13 19:35:22 -05:00
parent 5e97cd6c60
commit 0308c25e1e
2 changed files with 8 additions and 6 deletions

View File

@ -112,7 +112,7 @@ if ( !empty($exif['GPSLongitude']) && !empty($exif['GPSLatitude']) ) {
if ( $exif['GPSLatitudeRef'] == 'S') if ( $exif['GPSLatitudeRef'] == 'S')
$gps_latitude = -$gps_latitude; $gps_latitude = -$gps_latitude;
if($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 ="";} }else{$resultado ="";}
//$resultado = "$gps_longitude $gps_latitude"; //$resultado = "$gps_longitude $gps_latitude";

View File

@ -45,6 +45,11 @@ var mapa = window.parent.document.getElementById('<?php echo $_REQUEST[id]?>');
} }
map.on('locationfound', onLocationFound);
<?php } ?>
function onLocationError(e) { function onLocationError(e) {
//alert(e.message); //alert(e.message);
var marker = L.marker([<?php echo $lon ?>,<?php echo $lat ?>],{draggable: true}).addTo(map); var marker = L.marker([<?php echo $lon ?>,<?php echo $lat ?>],{draggable: true}).addTo(map);
@ -57,10 +62,7 @@ function onLocationError(e) {
mapa.value= m.lng+' '+m.lat+' '+z; mapa.value= m.lng+' '+m.lat+' '+z;
} }
} }
map.on('locationfound', onLocationFound);
map.on('locationerror', onLocationError); map.on('locationerror', onLocationError);
<?php } ?>
map.locate({setView: true, maxZoom: 16}); map.locate({setView: true, maxZoom: 16});
//var lat = window.parent.document.getElementById('lat'); //var lat = window.parent.document.getElementById('lat');
//var lng = window.parent.document.getElementById('lon'); //var lng = window.parent.document.getElementById('lon');