I made a map to show flight tracks from my private pilot training sessions. I decided to color the track based on altitude or airspeed, but this required me to split each track up into dozens of separate polyline overlays, each with its own color. Here's what I'm talking about:
http://mouser.org/hobbies/flight/maps/20090728-SAF-SAF.html In order to be able to switch between two different coloring schemes (altitude and ground speed, in this case), I think I have to do one of the following: 1) alter the color of each polyline segment separately with javascript. This is unwieldy because there are going to be hundreds to thousands of segments per flight. 2) remove each polyline segment and redraw the new ones. This fails for the same reason. 3) draw two separate maps one on top of the other, and toggle which is visible with javascript. This is what I've implemented in the link above. What I don't like about this is that if you pan/zoom one map, when you switch to the other coloring, it doesn't retain the pan/zoom information. What I wish the API had was a means of defining some sort of container object for a group of overlays which can then be operated on collectively. That way, I could define a group of several hundred polylines which represented the "altitude colored track" and another group for the "ground speed colored track" and just ask the api to make one group or the other visible as requested by the user. Pan/ zoom would be constant because there'd be only one map. Is there a way I can grab pan/zoom information from one map and apply it to both? I've only been using the API for a few days now, so if I'm missing something easy please let me know. Cheers, -mouser --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
