Una vez conocidas la longitud y la latitud, la tentación de observar esta posición sobre un mapa mediante la aplicación web Google Maps es grande.
<!DOCTYPE html> <html lang="es"> <head> <title>Html5</title> <meta charset="UTF-8"> <script src="http://maps.google.com/maps?file=api&v=2&sensor=false &key=ABQIAAAA8JXb0YDVa4otOLnM95w50BSeC_rwpfX9fQb- nbMGMDH8BB4BVRTjxWS14T5WLZf7TpXaaAtk_SIb-Q" type="text/javascript"> </script> <script type="text/javascript"> var map; var geocoder; function init() { map = new GMap2(document.getElementById("mapa")); map.setCenter(new GLatLng(34, 0), 1); geocoder = new GClientGeocoder(); } function en_plano(response) { map.clearOverlays(); if (!response || response.Status.code != 200) { alert("Lo sentimos, no es posible geolocalizar su posición actual."); } else { place = response.Placemark[0]; point = new GLatLng(place.Point.coordinates[1], place.Point.coordinates[0]); marker = new GMarker(point); map.setCenter(point, 13); map.addOverlay(marker); } } function geolocalizacion() { var direccion = document.form.latitude.value + "," + document.form.longitude.value geocoder.getLocations(direccion, en_plano); } if (navigator.geolocation) ...
Suscripción
acceso ilimitado a todos los libros de ENI sin compromiso de permanencia
libro impreso o digital online