views:

919

answers:

2

Hi

Sorry at first for my poor grammar.

I am writing a program in Java using geogoogle (Google Geocoder Java API) http://geo-google.sourceforge.net/

I need from two specific points to get the walking directions between these points and also these info to be exported in a KML file. Do you know how can I do it from Java? Is there an API that I can use? Perhaps making a call from the java program to google and handle the result - but how can it be done?

Thanks in advance.

PS. Google gives this functionality as i saw here http://www.gringod.com/2008/02/26/save-google-maps-driving-directions/ but I need all these to be called from Java.

+1  A: 

I suspect that the geogoogle utility is already making requests to google that specify the KML output format, since it's easier to parse in java than JSON (the default). The trouble is that geogoogle isn't exposing the raw KML response to you.

If I were you, I'd stop using the geogoogle utility altogether, and make the requests to the geocoder yourself. It's really not difficult, you just send simple HTTP GET requests (see the documentation here), and you should be easily able to capture the raw KML responses and stick them wherever you like.

skaffman
Ok i will use simple HTTP GET requests, but the link you are giving is only about geocoding. I have not found something similar for getting driving or walking directions and get the KML response. My main problem remains.
maiky
A: 

Hey madhup did you do it? how?? I tried to do it lot of different ways and without success. Plz tell me how.

rapozao