Foros del Web » Programando para Internet » Jquery »

problema con con gmap plugin jquery

Estas en el tema de problema con con gmap plugin jquery en el foro de Jquery en Foros del Web. sigo todas las indicaciones del autor pero no funciona, alguién me puede ayudar? el codigo que introduzco es éste: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 ...
  #1 (permalink)  
Antiguo 11/01/2011, 04:29
 
Fecha de Ingreso: enero-2011
Mensajes: 7
Antigüedad: 13 años, 3 meses
Puntos: 0
problema con con gmap plugin jquery

sigo todas las indicaciones del autor pero no funciona, alguién me puede ayudar?
el codigo que introduzco es éste:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
<script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAA2xj5RCkZJYTAQrOZeeAq YBS7cTKwqaRsklo4arHZTi3HtznflxQY32Z4NpslIQveklyaNs tJijKIGQ" type="text/javascript"></script>
<script src="jQuery.bMap.1.3.min.js" type="text/javascript"></script>
<style type="text/css">
<!--
#map{ width:500px;height:500px;float:left }
#sideBar{ width:200px;height:500px;text-align:center;background:#fff;float:right }
#sideBar div{ padding:2px 0; cursor:pointer }
#sideBar div:hover{ text-decoration:underline }
#buttons{ clear:both;text-align:center }
.bSideSelect{ background:#dadae3; } /* clicked items get this class */
-->
</style>
<script type="text/javascript">

$(document).ready(function(){
$("#map").bMap({
mapZoom: 11,
mapCenter:[51.501690392607,-0.1263427734375],
mapSidebar:"sideBar", //id of the div to use as the sidebar
markers:{"data":[
{
"lat":51.49757618329838,"lng":-0.1746654510498047,"title":"Science Museum","body":"Exhibition Road, London SW7"
},{
"lat":51.47769451182406,"lng":-0.0009441375732421875,"title":"Royal Observatory Greenwich","body":"Blackheath Ave, Greenwich, London SE10"
},{
"lat":51.49624032118747,"lng":-0.10857582092285156,"title":"Imperial War Museum","body":"Lambeth, London, SE1"
},{
"lat":51.51792987720294,"lng":-0.1272869110107422,"title":"British Museum"
},{
"lat":51.495625811469374,"lng":-0.17642498016357422,"title":"Natural History Museum","body":"Cromwell Road, London, SW7"
},{
"lat":51.50177053585362,"lng":-0.12908935546875,"title":"Churchill Museum"
}
]}
});
});

</script>


<title>Documento sin título</title>
</head>

<body>
<div style="width:700px;height:500px;margin:0 auto">
<div id="map"></div>
<div id="sideBar"></div>
</div>

</body>
</html>
  #2 (permalink)  
Antiguo 09/08/2011, 07:10
 
Fecha de Ingreso: julio-2011
Mensajes: 2
Antigüedad: 12 años, 9 meses
Puntos: 0
Respuesta: problema con con gmap plugin jquery

Hola me gustaría poder ayudarte, llegue hasta aqui por tengo el siguiente problema, no me refresca la variable de php

<!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: javascript, plugin
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 01:40.