[Google Maps API v2] Re: Moving objects
On Dec 2, 2:48 am, brian <silverwaters...@hotmail.com> wrote:
> can someone point to a simple working example of moving icons on a
> google map while reading the data from a file.
>
> at the risk of repeating.....I presently take the data from a MYSQL
> database and use PHP to extract the data and pass it to the script/web
> page.
>
> to update the data i refesh the page. I can write the current data to a
> file so that is not an issue.
You don't need to write a physical file on the server. You can already
use PHP to extract the data and pass it to the webpage: if you have a
PHP script which serves XML [look at the "header" command in PHP] then
you can use a Javascript setInterval() which calls GDownloadUrl to
download that data. In processing the data, remove any previous marker
and add a new one at the new location. Or simply use setLatLng to move
an existing marker. Although I would suggest XML as there are plenty
of examples of dealing with that, JSON is also possible.
But I don't know of anything already written which puts all that into
practice.
--
You received this message because you are subscribed to the Google Groups "Google Maps API V2" group.
To post to this group, send email to google-maps-api@googlegroups.com.
To unsubscribe from this group, send email to google-maps-api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home