Ver Mensaje Individual
  #5 (permalink)  
Antiguo 24/06/2015, 19:10
Avatar de alealvaro
alealvaro
 
Fecha de Ingreso: junio-2004
Ubicación: BA - Argentina
Mensajes: 210
Antigüedad: 19 años, 11 meses
Puntos: 12
Respuesta: Geolocalizacion

Hola!

Aquí está tu código funcionando:

Código Javascript:
Ver original
  1. <!DOCTYPE>
  2. <html>
  3. <head>
  4. <title>Bienvenidos a</title>
  5. </head>
  6.  
  7. <body>
  8.  
  9. <!-- <input type="Submit" onclick="init()" value="Cargar Mapa"> -->
  10. <div id="map" style="width: 100%; height: 1024px;">
  11. <script src="http://maps.google.com/maps/api/js?sensor=false&callback=init"></script>
  12.  
  13. <script type="text/javascript">
  14.    
  15. var map;
  16. var marker;
  17.     function init() {
  18.         var mapOptions = {
  19.             center: new google.maps.LatLng(8.8001153,-75.8506026),
  20.             zoom: 15,
  21.             mapTypeId: google.maps.MapTypeId.ROADMAP
  22.         }
  23.         map = new google.maps.Map(document.getElementById("map"),mapOptions);
  24.         var place = new google.maps.LatLng(8.8001309,-75.8505986,21);
  25.         marker = new google.maps.Marker({
  26.             position: place,
  27.             title: "Estacion 1",
  28.             map: map
  29.         });
  30.     }
  31.  
  32. </script>
  33. </div>
  34. </body>
  35. </html>

Básicamente tenías 2 problemas:

* el estilo del div id="map" es height
* en la línea
Código Javascript:
Ver original
  1. var place = new google.maps.LatLng(8.8001309,-75.8505986,21);
no va un punto entre new y google

Saludos!!
__________________
Always learning a little more...
Videos y frases para dedicar
Quotes and Phrases for You