iobts / gwt-google-apis

Automatically exported from code.google.com/p/gwt-google-apis
0 stars 0 forks source link

DirectionsResults not behaving as expected #434

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Found in Release:1.1

Platform informatoin (Windows XP, Appengine). 

We are calling the directions API with a waypoint array made up of 8 way 
points. We are expecting a DirectionsResults . On this we call getRoutes and 
with the route retrieved we are calling getSteps to get the actual LatLong in 
the Route. We want to do further processing on the steps before we display 
them. We are expecting 1 route with 7 steps in it. Instead we are getting 7 
routes with 1 step each in them.

Workaround if you have one:

Links to the relevant Google Group posts:

Original issue reported on code.google.com by prabuddh...@gmail.com on 6 Dec 2010 at 10:13

GoogleCodeExporter commented 9 years ago
If you can reproduce this issue in JavaScript, please ask for help on the Maps 
API group.  In this case, the GWT wrappers are just passing your arguments 
through to the Maps JavaScript API and making the results accessible to GWT.

Original comment by zundel@google.com on 6 Dec 2010 at 12:06

GoogleCodeExporter commented 9 years ago
I am not really familiar with the javascript api. I come from a Java background 
and started using the GALGWT api as I wanted to use the Gmaps without learnig 
Javascript. I have gone through the docs for the javascript api . It mentions 
routes which are made up of legs (between waypoints) and steps. Now the GALGWT 
wrappers have no mention of the Legs which is what makes me think the bug is in 
the wrappers. Can you check please?

Original comment by prabuddh...@gmail.com on 7 Dec 2010 at 8:50

GoogleCodeExporter commented 9 years ago
Looking at the code in DirectionImpl.java, all the GWT wrappers do is return 
the list of routes returned in the DirectionResult JavaScript object.  A Route 
object is not a Java datastructure imposed on the result, but a straight wrap 
of what came back from the JavaScript API.

Looking at the Javascript API docs, I think the API is behaving as intended.

http://code.google.com/apis/maps/documentation/javascript/v2/reference.html#GDir
ections

which links to:

http://code.google.com/apis/maps/documentation/javascript/v2/reference.html#GDir
ections.load

Original comment by zundel@google.com on 7 Dec 2010 at 12:57

GoogleCodeExporter commented 9 years ago

Original comment by zundel@google.com on 28 Oct 2011 at 4:16