[Tutorial] Como crear un google maps con marcadores

Iniciado por graphixx, Agosto 27, 2014, 05:14:18 PM

Tema anterior - Siguiente tema

0 Miembros y 1 Visitante están viendo este tema.

Agosto 27, 2014, 05:14:18 PM Ultima modificación: Agosto 27, 2014, 05:17:26 PM por Jimeno

Para obtener la posicion de longitud y latitud del sitio:
You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login

Crear el google maps:
You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login
You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login

Ejemplo:
Código: javascript
<html>
<head>
<script type="text/javascript"
    src="http://maps.google.com/maps/api/js?sensor=false">
</script>
<script type="text/javascript">
  function initialize() {
    var position = new google.maps.LatLng(6.206162,-75.570661);
    var myOptions = {
      zoom: 16,
      center: position,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    var map = new google.maps.Map(
        document.getElementById("map_canvas"),
        myOptions);

    var marker = new google.maps.Marker({
        position: position,
        map: map,
        title:"This is the place."
    });

    var contentString = '<strong>Endocrino</strong> Centro de especialistas.';
    var infowindow = new google.maps.InfoWindow({
        content: contentString
    });

    google.maps.event.addListener(marker, 'click', function() {
      infowindow.open(map,marker);
    });

  }

</script>
</head>
<body onload="initialize()">
  <div id="map_canvas" style="width:425px; height:350px"></div>
</body>
</html>
<span>CALLE 7 N  39-197 PISO 11 CONSULTORIO 11-12</span>
Mi Blog Personal
You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login

No me gusta mucho google maps! Conoces Open street map? Buen tip el que pasaste +1 :)

Muchas gracias graphixx, es bastante útil, además, mucha gente no sabe como poner los datos y de hecho es muy sencillo!

Un saludo.



You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login
No me gusta mucho google maps! Conoces Open street map? Buen tip el que pasaste +1 :)

YO ando desarrollando una app con OSM lastimosamente en mi pais la persona que anda mas en el movimiento anda muy cerrada :| y no quiere colaborar pero por ahora ando viendo leaf como libreria para trabajar. Lo mejor de OSM mapa offline :3

Regards,
Snifer
You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login


Llaman traidor a la persona que evito que caiga el foro, gente bruta!




Muy útil e interesante.

Gracias por el aporte.


Enviado desde iOS utilizando Tapatalk.
El talento se parece al tirador que da en un blanco que los demás no pueden alcanzar; el genio se parece al tirador que da en un blanco que los demás no pueden ver.