[Tutorial] Como crear un google maps con marcadores

Iniciado por Graphixx, 27 Agosto 2014, 22:13 PM

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

Graphixx


Para obtener la posicion de longitud y latitud del sitio:
http://www.map-me.eu/

Crear el google maps:
http://www.funcion13.com/2012/04/25/google-maps-la-base/
http://www.funcion13.com/2012/05/07/google-maps-marcadores/

Ejemplo:

<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>
Nada tiene fin solo hay pequeñas pausas, pausas que determinan el comienzo de otros. Graphixx
Mi blog