doing direct ajax calls using js can be instructional one time, but
not very practical to do many times...
I strongly recommend giving jquery a try. if you know a little
javascript, you can already give jquery a try
there are lots of jquery tutorials, find one of your taste ;)

but one thing i'd recommend is to first try to echo a list of
name,lat,lng with jquery ajax call (get, for example, can be seen as a
simple way to "include" an external php page) and update it. (no
gmaps, just regular php echo'ing)
once it works, then you make it update the markers.

you'll probably make an marker array, then put the markers on the map.
so once you get new data from the jquery ajax call, you'll clean the
current marker array and show the new one.

jquery is intuitive to use, this experience will be good. have fun!

On Oct 13, 6:03 pm, Lynxus <gjsm...@gmail.com> wrote:
> Hi guys,
>
> Ive installed a map onto a page, And loaded some markers onto that map
> from the output of a php script
>
> It outputs:
> {"Locations":[{"name":"Rettenbach","lat":"47.9167","lng":"12.65"},
> {"name":"Cleveland","lat":"41.3928","lng":"-81.7347"}]}
>
> So the map knows the lat long and name.
> Anyway, Thats great.
> However this data changes..
>
> Is there any way under the sun that can read this php file
> ( data.php ) every 10 seconds or so and update the markers.
>
> Ie: remove old and add new markers?
> Currently I do it from a whole page reload however this isnt good. It
> would be nice for it to just update the map as it goes.
>
> Any ideas?
> Im new to jquery / ajax / gmaps so please be gentle..
>
> Thanks
> G

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api...@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to