Foro de elhacker.net

Programación => Programación General => Mensaje iniciado por: kaskull en 27 Agosto 2014, 00:42 am



Título: Problema incorporación google maps en página web
Publicado por: kaskull en 27 Agosto 2014, 00:42 am
Hola muy buenas,

He añadido un mapa de google maps en mi web pero quiero saber si puedo quitar ciertas cosas, como por ejemplo:(http://s27.postimg.org/hvpkq7lmb/maps.png)

Mi codigo es el siguiente:

Código:
urlMap : "https://www.google.com/maps/embed/v1/directions?key=xxxxxxxxxxx&origin="+curRest.get('Latitude')+","+curRest.get('Longitude')+"&destination="+curRest.get('Latitude')+","+curRest.get('Longitude')+"&zoom=18"

Código:
<iframe id='pdfFrame' src="<%=urlMap%>"  style="width:100%; height:100%" frameborder="0"></iframe>


Título: Re: Problema incorporación google maps en página web
Publicado por: Graphixx en 27 Agosto 2014, 22:12 pm
(http://blog.guiasenior.com/images/GoogleMaps_Senior.jpg)
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:
<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>