Cross-domain dynamc script tags that fetch a JSON response work well
and fast.

I use them to colour route segments ( > 50m) on
http://wheresthepath.googlepages.com/wheresthepath.htm. The gradients
come from my own Google App Engine gradient server (UK only).

To draw a route, press the Route button and click a route on either
map. As each segment is drawn (or moved), a dynamic script tag is used
to fetch the gradient of the segment. I use a globally unique ID
(GUID) in each segment's request. When the JSON data arrives, I simply
match the returned GUID to find the correct segment to re-colour. If
the fetch fails, the segment stays magenta, otherwise, up hill is
coded lime,  yellow, orange, red (steepest) and down hill green/blue
through to blue (steepest).




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