I'm looking for the best approach to drawing a road trip map.
Currently, I update the (lat,long) points in a route.txt file on my
server. My Google map implementation reads the route.txt file and
creates a GPolyline, and then mymap.addOverlay() to draw it. This
works fine.

I decided to use my own table of (lat,long) rather than geocode with
place names so that I wouldn't be a burden by doing all of that
geocoding and to avoid running into a quota. But in order to have the
route drawn nicely, at all zoom levels, I digitized the (lat,long) by
hand from the map.  On straight roads, I put in 2 points, but there's
lots of points on winding roads. That's ok, but it does get tedious,
and currently the file has about 900 points in it for a 5000 mile
trip. So it's starting to get silly and I grow weary of updating the
file.

Another reason to do my own (lat,long) is that I can control the route
that is drawn. When Google chooses a route between two towns, it
rarely matches the roads that I drove.

So instead of putting in polyline points, I guess I need to switch to
using fewer waypoints and let Google generate the intermediate
coordinates for the road I guess that means I would call
GDirection.loadFromWaypoints() followed by GetPolyline() to obtain the
actual polyline to draw. I would use GetPolyline() and draw it myself
because I don't want bubble icons at waypoints. I just want the line
with no bubbles.

But the array of waypoints is limited to 25. I don't know how many
points I will have once I discard those that can be generated, but
it's almost certainly going to be more than 25 - perhaps a few
hundred. If I have 200 waypoints, does it make sense to call
loadFromWaypoints()/GetPolyline 8 times, each time with the next 25
points in the list?  I know how to use GEvent.addListener() to handle
the asynchronous nature of the load/GetPolyline retrieval, but how to
you do N of these in series without one cancelling the previous one?

At this point, just looking for the best approach and to work within
Google limits on geocoding.

Thanks.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to