> Would there be a way to display an arrow on the polyline to make this > direction clear? For example, after a polyline is set with the 2 > markers, the polyline will display without the markers and the > original A->B implication of the markers won't be there.
There are third party developed tools to put arrowheads on polylines. > > > 4) Create another polyline in the opposite direction beside the > > > previous going in the other direction > > > Yes, but that may be more difficult than you think. > > Can you expand a tad on this? What I'm trying to do is draw 2 > polylines, one for each direction on the road. One difficult part is to ensure one line doesn't lie on top of the other. And how about if your route includes one-way streets or no- left-turn junctions? It's not necessarily reversible. You should be thinking of these kinds of things yourself. You might ask GDirections service to give you a route from B to A, which might take care of the one-way issues. It may even draw lines on the other side of (two-way) streets, or it may not. That may or may not be good enough for your purpose depending on the kind of zoom factors you're expecting your viewers to be using. You might have to offset the second polyline by some amount, which varies by zoom level, to keep the two lines distinct. That would raise an issue about which way to offset it ... the visually 'best' way depends on the shape of the line ... > > > 5) Save the polylines to a database > > > Yes, but you may not be allowed depending on your purpose. Read the > > Terms of use before putting too much effort in > > I just went through the whole Terms of Service and could not find much > on this. " ... must not: .... 10.3 pre-fetch, cache, or store any Content, ..." Directions are Content. Read the whole item for the exceptions, most notably "except ... temporarily". > What type of database storage would you recommend? XML? XML is a file format, not a database. Commonly its used with the maps API to get data from the database of your choice to the clients browser. I'd have thought just about any database would do this job, more likely your choices are going to be limited to what is actually available to you. If you only plan on having a trivial amount of routes, then a flat file will do - that could be an XML file that you edit by hand. > What's the > easiest way that the GM API can send out values to save to a database? The GM API doesn't send anything anywhere, but javascript that you write can do that. The usual way to get client-side scripts to send data to some server function is as data inserted into a URL parameter string for trivial amounts, or as a simulated HTML form entry. That's standard javascript stuff, not map-specific. Have look at this, to get a feel for what can be done "easily" - http://econym.org.uk/gmap/ Have a look at examples for inspiration - http://code.google.com/apis/maps/documentation/examples/index.html and just don't be too ambitious with a first project - this forum is full of people floundering because they don't go one step at a time. cheers, Ross K --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
