Ver Mensaje Individual
  #15 (permalink)  
Antiguo 23/02/2010, 18:44
Avatar de JuJoGuAl
JuJoGuAl
 
Fecha de Ingreso: julio-2009
Ubicación: Venezuela
Mensajes: 754
Antigüedad: 14 años, 9 meses
Puntos: 19
Respuesta: Mapa de Ubicacion para PHP

He hechon esto:
Código PHP:
Ver original
  1. <html xmlns="http://www.w3.org/1999/xhtml">
  2. <head>
  3. <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=true_or_false&amp;key=ABQIAAAA3JHgufCbAZ0sC1iVrlzz5RR5bwRO9eYs5uOHqSErQ83yIJLwMRQN9TZgs8B8yTgmsIjQLru4PaHURg" type="text/javascript"></script>
  4. <title>Mapa Cementerio Municipal</title>
  5. </head>
  6. <body>
  7. <?php
  8. //ini_set('display_errors',1);
  9. //error_reporting(E_ALL);
  10. //include('../Connections/config.php');
  11. include_once('../Connections/BD_Cementerio.php');
  12. $conectados=AbrirCone();
  13. // Funciones que Utilizo en el Cuerpo
  14. include_once('funciones.php');
  15.  
  16. $TipoBov=$_GET['TipoBov'];
  17. $DifID=$_GET['DifID'];
  18.  
  19. $Consul="SELECT difuntos_totales.Nombre_apellido as Nombre,difuntos_totales.Edad as Edad,difuntos_totales.FEnterramiento as Inhumacion,difuntos_totales.Parroquia as Parroquia,bovedas_total_$TipoBov.x as x,bovedas_total_$TipoBov.y as y FROM difuntos_totales,bovedas_total_$TipoBov where difuntos_totales.Cod_Boveda=bovedas_total_$TipoBov.codigo and difuntos_totales.Tipo_Boveda=bovedas_total_$TipoBov.Tipo and difuntos_totales.Bloque=bovedas_total_$TipoBov.bloque and difuntos_totales.difunto_ID=$DifID";
  20. $Datos=Consuta($Consul,$conectados);
  21. while ($row=mysql_fetch_assoc($Datos))
  22. {
  23. $nombre=$row["Nombre"];
  24. $edad=$row["Edad"];
  25. $inhumacion=$row["Inhumacion"];
  26. $parroquia=$row["Parroquia"];
  27. $x=$row["x"];
  28. $y=$row["y"];
  29. }
  30. ?>
  31.  
  32. <table width="100%" border="0" cellpadding="0" cellspacing="0">
  33. <tr>
  34.   <td><img src="http://www.forosdelweb.com/f18/imagenes/Mapa Fisico.png" width="518" height="30" border="0"><BR><BR></td>
  35. </tr>
  36.  
  37. <tr>
  38.   <td>
  39.   <div style="width: 1000px; height: 684px;
  40.   background-image: url('../imagenes/mapa.png'); z-index: 1;">
  41.   <?php
  42.   if(mysql_num_rows($Datos)>0)
  43.     {
  44.     if($x!="0" and $y!="0")
  45.     {
  46.    
  47.     ?>
  48.     <div style="
  49.              width: 1000px; height: 684px;
  50.              background-image: url('../imagenes/pin.gif');
  51.              background-repeat: no-repeat;
  52.              background-position: <? echo $x; ?>px <? echo $y; ?>px;">
  53.  
  54.             <map name="Cementerio">
  55.            <?
  56.              if($x>0)
  57.              {
  58.               ?>
  59.                <area shape="rect" coords="<? echo $x; ?>,<? echo $y; ?>,<? echo $x + 20; ?>,<? echo $y + 20; ?>" title="<? echo "Nombre: $nombre Edad: $edad"; ?>">
  60.               <?
  61.              }
  62.            ?>
  63.           </map>
  64.           <img src="http://www.forosdelweb.com/f18/imagenes/leer.gif" border="0" width="1000" height="684" usemap="Cementerio">
  65.  
  66.               </div><?php
  67.    
  68.     }
  69.     }
  70.     ?>
  71.               </div>
  72.   </td>
  73. </tr>
  74. </table>
  75. <div id="map" style="width: 500px; height: 500px">
  76. <script>
  77. function load() {
  78.     if (GBrowserIsCompatible()) {
  79.         var map = new GMap2(document.getElementById("map"));    
  80.         map.setCenter(new GLatLng(<?php echo $x; ?>,<?php echo $y; ?>),15);
  81.        
  82.     }
  83. }  
  84. </script>
  85. </div>
  86. </body>
  87. </html>

Y nada aun no veo el mapa :( que estoy haciendo mal?

Agrego diciendo que no entiendo practicamente nada de esto me esta costando mucho aprenderlo...

LO QUE QUIERO A MANERA DE PRUEBA ES COLOCAR EL MAPA DE GOOGLE DEBAJO DEL MAPA QUE TENGO DE PRUEBA...

Última edición por JuJoGuAl; 23/02/2010 a las 19:44