I had the same need, and also I could not find a good ready-made solution, so I coded and commented on a test library, below which can be the basis for any such project.
Instead of relying on a single provider, I implemented the same functionality in Flash on Bing Maps V7, Maps Maps V3, and MapQuest Maps V7 Maps Maps V7. The code creates lines, dynamic markers and shadows, etc., and also causes them to rise apis. The sample application creates two of each type of map on one html page.
To do this, you need Flash and JavaScript to call each other with data and / or closure by registering functions whose names are unique to this element.
First, each map has a unique mapId, and each MXML map component registers a set of external methods with their unique mapId (for example, fname_mapId), and then creates a Flex-iFrame with parameterized HTML src for one of the three types of maps that pass mapId, the application name , starting position, etc.
HTML reads these parameters and receives the SWF object from the parent frame via the application name. It creates a map and registers listeners using a map and adds callbacks to the parent frame using its mapId (e.g. fname_mapId), which allow you to create markers and lines, each of which has a unique identifier and registers functions with the parent frame, which now also include the identifier of the marker or line in their name (for example, fname_mapId_ [lineId | markerId]), which allow you to set icons, shadows, line color and change or delete a position.
HTML also registers functions with mapId to check the position of a position or path in general. They call ajax or a routine to request elevation (s) by calling JavaScript back and then returning to the registered AS3 functions.
-C
Logic of test actions and callbacks - designed to test all implemented functions:
Double click on map: Create pin: - Set to default name - Add to map - Set icon and shadow (note Bing does not take shadows; Google can take a marker mask for clicking - not implemented) - Call to map for elevation Remove previous marker Log current markers (should be only 1) Create black line from start to pin: - Change line color to blue - Call to map for path elevation Remove previous line Log current lines (should be only 1) Drag marker: Start: - only logs it was called Drag: - only logs it was called End: - Move line to new lat lng - Set line color to orange - Sets map to not accept double clicks Double click marker: - Sets map to accept double clicks again (so after you drag you need to double click a marker to have map accept double clicks again) Elevation callback: - Changes pin name to include elevation in name - Sets new icon and shadow for marker Elevation path callback - set to 300m & 500m - is balloon at 500m on path going to hit? - error if elevation of path >=500, warn if >=300 - Sets line color if path max elevation as sampled is: Purple: elevation request error flag set Red: at or above error level Red-Yellow: at or above warning but requested distance not met Yellow: at or above warning level Yellow-Green: below warning level but requested distance not met Green: below warning level
The rest of the message with the code was too long with too many links, so I had to list it all - copy to a direct text editor - the code is very well formatted with spaces: http://pastebin.com/Jzq5E06F