Suggest you read this: http://groups.google.com/group/Google-Maps-API/web/suggested-posting-guidelines?hl=en
You could maybe investigate loading the data from dynamically generated xml files - that way your map can just periodically fetch new data. On Sat, Sep 20, 2008 at 7:29 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hello, > > I use google maps api, I am positing targets, but If I use ajax > refreshing its displaying clear place :/. > > <script src="http://maps.google.com/maps? > file=api&v=1&key=ABQIAAAAydhkk- > aUU7TNoUUVUllsmhQyvFlNFG1_WO4tjjSQnSfGzfkGuRQxn_13Qul6DplS58SvUxX3neApgw" > type="text/javascript"></script> > <link href="../css/css.css" rel="stylesheet" type="text/css" /> > </head> > <body class="content"> > <div id="map" style="width: 750px; height: 500px"> </div> > <script type="text/javascript"> > > //<![CDATA[ > > > //Center map on Alice Springs > var map = new GMap(document.getElementById("map")); > //$GMap->setMapType('G_HYBRID_TYPE'); > map.addControl(new GLargeMapControl()); > map.addControl(new GMapTypeControl()); > // Alice Springs > // LAT LON > // S2348'08.57 E13353'12.16 > map.centerAndZoom(new GPoint(14.233363, 50.104095), 12,5); > map.setMapType(G_HYBRID_MAP); > > // Palo Alto > // LAT LON > // N3727'40.03 W12206'54.16 > //map.centerAndZoom(new GPoint(-122.1419, 37.4419), 4); > > // Creates a marker whose info window displays the given number > function createMarker(point, number) > { > var marker = new GMarker(point); > // Show this markers index in the info window when it is clicked > var html = number; > GEvent.addListener(marker, "click", function() > {marker.openInfoWindowHtml(html);}); > return marker; > }; > <?php > $link = mysql_connect("$hostreal_name", "$userreal_name", "$pw") or > die("Could not connect: " . mysql_error()); > mysql_selectdb("$dbreal_name",$link) or die ("Can\'t use > dbmapserver : " . mysql_error()); > $result = mysql_query("SELECT * FROM positions WHERE last_update > > DATE_SUB( NOW() , INTERVAL 5 MINUTE )", $link); > if (!$result) > { > echo "no results "; > } > while($row = mysql_fetch_array($result)) > { > // This is the data displayed in the google map text box when you > click on a pilot name > $info = "Pilot: ".$row['pilot_num'] . "<br>" . "From: " . > $row['depAptICAO'] ." To: " . $row['destAptICAO'] . "<br>" . "GS: " . > $row['gs'] . "<br>" . "ALT: " . $row['alt'] . "<br>" . "ETA: " . > $row['timeDestApt']; > echo "var point = new GPoint(" . $row['lon'] . "," . $row['lat'] . "); > \n"; > echo "var marker = createMarker(point, '" . $info . "');\n"; > echo "map.addOverlay(marker);\n"; > echo "\n"; > } > > mysql_close($link); > > ?> > //]]> > </script> > > every 1 minute - data on server were updating, how to reload (refresh > - update) dates in map ? > > > > -- Barry - www.nearby.org.uk - www.geograph.org.uk - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Maps-API?hl=en -~----------~----~----~----~------~----~------~--~---
