views:

296

answers:

2

i have a console application, needs to find the distance and route between two places using the google maps api. that means i do not have a browser and hence no javascript. is it possible to do it using java using a HTTP request or something. i have tried geocoding and can find the latitude and longitude of a given address using HTTP requests. how to find distance and routes using java.

+1  A: 

Google only provides this in javascript. However, there is a request to provide it in java also. So possibly, it will be there in the near future.

The fact that there is no out-of-the-box solution from google, doesn't mean that you can not create one for yourselve of course...

[EDIT] For example, you could read the sourcecode of your directions in html to find the distance and the route.

Fortega
Be aware that obtaining the directions by any means other than the authorised Javascript call and for the purposes of displaying it in conjunction with a Google Map is a violation if the Terms.
Mike Williams
+1  A: 

Rhino provides a javascript engine for Java applications. You can play around with it.

Bozho