Hi Ed-

Have you tried using multiple Directions objects?

Here's an example where I process a series of results in javascript
and calculate the directions for each, using a different directions
object each time:
http://gmaps-samples.googlecode.com/svn/trunk/googlebar/googlebar_directions.html

Let me know if there are problems with that technique.

- pamela


On Tue, Oct 7, 2008 at 4:45 PM, Ed Syrett <[EMAIL PROTECTED]> wrote:
>
> I need to show multiple routes on a map.  In other words, I need to
> call loadFromWaypoints() a number of times instead of just once, so
> that the requests overlap. The event handlers will be called some time
> after, and in these event handlers I have no reference back to the
> original request.
>
> The waypoints that I pass to the loadFromWaypoints call are generated
> from a section of XML.   In this event handler, I need to have a label
> of some sort that I can use to find out which section of the source
> XML the directions are derived from.  But I can find no way to  add a
> label or some identifier to the Directions class.  I have tried
> deriving from the Directions class and adding properties but none of
> these work.
>
> It seems that the loadFromWaypoints() function is inherently stateful,
> i.e. it relies on state being held elsewhere so that you know the
> context of the request when the DirectionsEvent handler is called.
> But this seems to go against the architecture of the rest of Flex in
> that the Event object passed to the event listener function usually
> tells you what generated the event in the first place in the target
> and currentTarget properties.  DirectionsEvent doesn't seem to support
> anything like this.
>
> I think that either the Directions class should have a metadata
> property of some sort, for example "id", or there should be a
> parameter  in the loadFromWaypoints call to allow me to enter an id
> string, that will be returned in the DirectionsEvent.
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API For Flash" 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-for-flash?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to