Foros del Web » Programando para Internet » PHP »

php google mapas

Estas en el tema de php google mapas en el foro de PHP en Foros del Web. bueno tarde google mapas php y mysql no funciona codio Código PHP: < script src = "http://maps.google.com/maps/api/js?sensor=false"              type = "text/javascript" > </script>     <script type="text/javascript">     //<![CDATA[     var customIcons = { ...
  #1 (permalink)  
Antiguo 12/11/2013, 05:31
Avatar de camilo_1987  
Fecha de Ingreso: junio-2008
Ubicación: ALZIRA, Spain, Spain
Mensajes: 77
Antigüedad: 15 años, 10 meses
Puntos: 0
php google mapas

bueno tarde
google mapas php y mysql no funciona codio
Código PHP:
<script src="http://maps.google.com/maps/api/js?sensor=false"
            
type="text/javascript"></script>
    <script type="text/javascript">
    //<![CDATA[

    var customIcons = {
      restaurant: {
        icon: 'http://labs.google.com/ridefinder/images/mm_20_blue.png',
        shadow: 'http://labs.google.com/ridefinder/images/mm_20_shadow.png'
      },
      bar: {
        icon: 'http://labs.google.com/ridefinder/images/mm_20_red.png',
        shadow: 'http://labs.google.com/ridefinder/images/mm_20_shadow.png'
      }
    };

    function load() {
      var map = new google.maps.Map(document.getElementById("map"), {
        center: new google.maps.LatLng(40.195659, -3.098145),
        zoom: 6,
        mapTypeId: 'roadmap'
      });
      var infoWindow = new google.maps.InfoWindow;

      // Change this depending on the name of your PHP file
      downloadUrl("phpsqlajax_genxml.php", function(data) {
        var xml = data.responseXML;
        var mapa = xml.documentElement.getElementsByTagName("mapa");
        for (var i = 0; i < mapa.length; i++) {
          var titulo = mapa[i].getAttribute("titulo");
          var subtitulo = mapa[i].getAttribute("subtitulo");
          var point = new google.maps.LatLng(
              parseFloat(mapa[i].getAttribute("latitud")),
              parseFloat(mapa[i].getAttribute("longitud")));
          var html = "<b>" + titulo + "</b> <br/>" + titulo;
          var icon = customIcons[type] || {};
          var mapa = new google.maps.mapa({
            map: map,
            position: point,
            icon: icon.icon,
            shadow: icon.shadow
          });
          bindInfoWindow(mapa, map, infoWindow, html);
        }
      });
    }

    function bindInfoWindow(mapa, map, infoWindow, html) {
      google.maps.event.addListener(mapa, 'click', function() {
        infoWindow.setContent(html);
        infoWindow.open(map, mapa);
      });
    }

    function downloadUrl(url, callback) {
      var request = window.ActiveXObject ?
          new ActiveXObject('Microsoft.XMLHTTP') :
          new XMLHttpRequest;

      request.onreadystatechange = function() {
        if (request.readyState == 4) {
          request.onreadystatechange = doNothing;
          callback(request, request.status);
        }
      };

      request.open('GET', url, true);
      request.send(null);
    }

    function doNothing() {}

    //]]>
  </script> 

Etiquetas: google, html, mapas, mysql, sql
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 16:52.