Welcome.

That looks like a very different service.  The 'google' format has been broken for a long time and was on my list to remove for the last few releases.

We have infrastructure in place for reading XML, but not JSON, so that would be an easier place to start.  The XML seems to have a lot of stuff that we just don't have a place to put, but a straight-forward rip that just captures leg/step/start_location/{lat_lon} pairs probably has value.  It looks like it likes to think of "legs" (a line with two points) where we fundamentally think of an array of points, so there's a little bit of busy work required to suppress the dupes if you do the "obvious" thinkg of adding both start and end of each leg as a point to us.  It's probably not a very hard problem and even if you don't solve it at all, it's probably still useful; it'll just have more points than it should and wouldn't handle multi-segment routes as well as it could.   Neither are particularly shameful or common.

You can look at any of sourc efiles including "xmlgeneric.h" for examples, and we'll answer anything we can to help you get it developed and integrated. 


On Sun, Dec 16, 2012 at 3:11 PM, Guilhem Bonnefille <guilhem.bonnefille@gmail.com> wrote:
Hi,

Since few month, the web service Google Direction change its API and, most of all, its output format.[1]
Does someone work on this topic?
I'm quite able to give an help, if no-one else work on this and if an experienced expert want to mentor me.

I found that gpsbabel has a "google.c" module but I'm not sure what output it proceses.
To support the current API, what is the best? Updating google.c or creating a google_direction.c?

As an example, you can access data with:
curl "http://maps.googleapis.com/maps/api/directions/json?origin='Albi,%20france'&destination='toulouse,%20france'&sensor=false" > /tmp/direction.json
curl "http://maps.googleapis.com/maps/api/directions/xml?origin='Albi,%20france'&destination='toulouse,%20france'&sensor=false" > /tmp/direction.xml

[1] https://developers.google.com/maps/documentation/directions/#DirectionsResponses
--
Guilhem BONNEFILLE
-=- JID: guyou@im.apinc.org MSN: guilhem_bonnefille@hotmail.com
-=- mailto:guilhem.bonnefille@gmail.com
-=- http://nathguil.free.fr/


------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Gpsbabel-code mailing list  http://www.gpsbabel.org
Gpsbabel-code@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gpsbabel-code