Foros del Web » Programando para Internet » Jquery »

maps.google v3 api php javascript jquery

Estas en el tema de maps.google v3 api php javascript jquery en el foro de Jquery en Foros del Web. Hola, me gustaría que la variable de php se actualizara e imprimiera un valor diferente en el mapa <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" ...
  #1 (permalink)  
Antiguo 09/08/2011, 07:13
 
Fecha de Ingreso: julio-2011
Mensajes: 2
Antigüedad: 12 años, 9 meses
Puntos: 0
maps.google v3 api php javascript jquery

Hola, me gustaría que la variable de php se actualizara e imprimiera un valor diferente en el mapa

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Google Maps V3 API Sample</title>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script src="jquery-1.2.6.min.js" type="text/javascript"></script>

<script type="text/javascript">


$(document).ready(function(){
var xml = $.load("valor.php");
})

document.write(xml);

</script>


<?php
$num = 1;
$y = 6.24426102806;
$x = -75.6068390013;
?>



<script type="text/javascript">


var map;
function initialize() {
var mapDiv = document.getElementById('map-canvas');
map = new google.maps.Map(mapDiv, {
center: new google.maps.LatLng(6.24426102806,-75.6068390013),
zoom: 13,
mapTypeId: google.maps.MapTypeId.ROADMAP
});

google.maps.event.addListenerOnce(map, 'tilesloaded', addMarkers);

}

function addMarkers() {

<?php



echo "var marker". $num ." = new google.maps.Marker({";
echo 'map: map,';
echo 'draggable: true,';
echo 'position: new google.maps.LatLng('. $y .','. $x .'),';
echo "icon: "."'http://chart.googleapis.com/chart?chst=d_text_outline&chld=0404B4|12|h|2EFEF7| b|$num '";
echo "});";

$num = $num + 1;
$y = $y + 1;
$x = $x + 1;

?>
setTimeout("addMarkers()",1000)



}

google.maps.event.addDomListener(window, 'load', initialize);
</script>
</head>
<body style="font-family: Arial; border: 0 none;">
<div id="map-canvas" style="width: 100%; height: 740px"></div>
</body>
</html>

Etiquetas: ajax, javascript, maps, php
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 22:50.