I'm catching the GDirection events using the following:
GEvent.addListener( this.map, "load", this );
GEvent.addListener( this.map, "addoverlay", this );
GEvent.addListener( this.map, "error", this );
But I'm not sure how to get the "source" and "param" parameters of the
"onHandle( JSObject source, JSObject[] param )" method back into Java
objects like GMap2 or String.
Can you please tell me if this is the correct way to catch these
events? If so, what are the Java classes for "source" and "param" so I
can cast them back.
Thanks,
Eric
-krispy
Each event has one param in the JSObject array. I have no idea
what that is. I was hoping it was a string with the even type, like
"load" or "error". Anyone know how to figure this out?
Thanks,
Eric
http://econym.googlepages.com/example_map4c.htm
http://econym.googlepages.com/example_steps.htm
Do a View->Page Source and search the javascript for
"GEvent.addListener" - he checks for a "load" and "error" event, but
just asks the directions object for the status code afterwards. You'd
have to search around the maps api forums or do some javascript coding
to figure out what objects are being passed back - sorry, I think
that's about the best I can do for you.
-krispy
Thanks for your help,
Eric
On Sep 13, 10:03 am, krispy <cplum...@integrity-apps.com> wrote:
> It might just be the GDirections object coming back - looking at some
> sample pages it seems that it's not really used:
>
> http://econym.googlepages.com/example_map4c.htmhttp://econym.googlepages.com/example_steps.htm
Looking at the source, it might handle things a little better for you
- I haven't had a chance to try it myself, but it looks cleaner than
the alternative.
-krispy
On Sep 13, 1:06 pm, Eric B <ebesse...@gmail.com> wrote:
> That's true, since the GDirections and GMap2 objects are members of my
> handler class, I guess I don't need the onHandle method's parameters
> at all. :)
>
> Thanks for your help,
> Eric
>
> On Sep 13, 10:03 am, krispy <cplum...@integrity-apps.com> wrote:
>
> > It might just be the GDirections object coming back - looking at some
> > sample pages it seems that it's not really used:
>
> >http://econym.googlepages.com/example_map4c.htmhttp://econym.googlepa...