You can mostly do that. Just need to assume a constant speed, then the interpolation between the points can just be done based on distance. Search for epoly which provides a function to calcuate a distance along the line (which is returned by the directions API)
Alterntativly you could use a trail and error approach (eg binary search) of requesting directions until you get close enough travel time. You would probably have to be weary of requesting directions too quickly and getting banned. 2010/1/8 Milu <[email protected]>: > I have a question and I would like to have your comments/suggestion > whether my problem can be solved using Google Map API. I am a newbie > to Google Map API. My question is as > follows: > > - Input: > + a text file with two points p1 and p2, one point is a pair of long/ > lat. > + a map centered at a point p2 > > - What I want to do is: > + find the direction from p1 to p2, assuming that we have an object O > moving from p1 to p2. The outputted direction from Google Map API will > give object O the path P from p1 to p2, and the traveling period T = > [t1,t2] (traveling time from p1 to p2), where t1 < t2 and t1 is the > departing time at p1, t2 is arriving time at p2. > > + my main question is: at time t1', where t1 < t1' < t2, is there any > Google Map API which gives me the exact location in long/lat format of > the object O (the location should be on the path P)? > > Thank you very much for your help. > > Best regards, > > -- > 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. > > > > -- 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.
