googlemaps api

  • Thread starter Thread starter GeX
  • Start date Start date

GeX

GeX

Soldato
Joined
17 Dec 2002
Posts
6,982
Location
Manchester
Hi all.

I am working on an application that involves a tracker for a uni project. The client runs on a mobile phone and its location data is placed into an SQL database. I want to display the route taken by the phone on a googlemap. I have done this already using polylines.

http://tackycheese.net/phpsqlajax_map.php

This is done using a php script that generates a KML file, which is then fed to the api through js.

I am trying to extract more functionality from it though. I want to poll the database for get new location data as it comes in (will handle with php/ajax), but I do not know how to then draw this onto the map without reloading the map, regenerating the KML and redrawing the polyline.

I know this is not the best way to do it, and have seen examples of what I want to do - but not how to do it.

For example, on this demo page; http://code.google.com/apis/maps/documentation/polylineutility.html

As you add a new point for the polyline, it is added to the map. Perfect. But how do I do that?

Thanks in advance, Mark.
 
don't know off the top of my head but there are methods for drawing lines without loading kml, just a series of points. I would suggest viewing the source of that example, if it does what you want just cut & paste it :-p
 
Back
Top Bottom