Crear un google maps con marcadores

10:41 0 Comments A+ a-


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:
Código: Javascript
  1. <html>
  2. <head>
  3. <script type="text/javascript"
  4.     src="http://maps.google.com/maps/api/js?sensor=false">
  5. </script>
  6. <script type="text/javascript">
  7.   function initialize() {
  8.     var position = new google.maps.LatLng(6.206162,-75.570661);
  9.     var myOptions = {
  10.       zoom: 16,
  11.       center: position,
  12.       mapTypeId: google.maps.MapTypeId.ROADMAP
  13.     };
  14.     var map = new google.maps.Map(
  15.         document.getElementById("map_canvas"),
  16.         myOptions);
  17.     var marker = new google.maps.Marker({
  18.         position: position,
  19.         map: map,
  20.         title:"This is the place."
  21.     });
  22.     var contentString = '<strong>Endocrino</strong> Centro de especialistas.';
  23.     var infowindow = new google.maps.InfoWindow({
  24.         content: contentString
  25.     });
  26.     google.maps.event.addListener(marker, 'click', function() {
  27.       infowindow.open(map,marker);
  28.     });
  29.   }
  30. </script>
  31. </head>
  32. <body onload="initialize()">
  33.   <div id="map_canvas" style="width:425px; height:350px"></div>
  34. </body>
  35. </html>
  36. <span>CALLE 7 N  39-197 PISO 11 CONSULTORIO 11-12</span>

Autor: graphixx