Thank you for your response TreKing !

I did exactly that the first time ( actually multiple times) but the status 
returned was "NOT FOUND". I also ran it on the browser and this is the 
response I got:-
<?xml version="1.0" encoding="UTF-8"?>
-<DirectionsResponse><status>NOT_FOUND</status></DirectionsResponse>

However when I insert the space ( like I have it in the code)  and run it 
on the browser, it does return results.

if you cut and paste the below in URL, it would give the correct result:-

http://maps.googleapis.com/maps/api/directions/xml?origin=37.2345487 
-121.5840723&destination=37.236064 
-121.961595&sensor=false

However if you remove the space btw the Lat & Lnt, it would not work and 
the status will be NOT FOUND.

I maybe missing something  very petty here.. sometimes I pair of eye ain't 
enough I suppose..
thanks
Sunil.




On Friday, July 5, 2013 7:57:57 PM UTC-7, TreKing wrote:
>
> This is your code
>
> On Thu, Jul 4, 2013 at 9:19 PM, Sunny <[email protected] <javascript:>>wrote:
>
>>  String hosturl="https://maps.googleapis.com/maps/api/directions/xml?";;
>>  String url = "origin=" +*lat1 + " " + lon1*  + "&destination=" + *lat2 
>> + " " + lon2* + "&sensor=true";
>>
>
> And this is the docs for that API.
>
> https://developers.google.com/maps/documentation/directions/#RequestParameters
>
> *Required parameters* 
>
>    - origin — The address or textual latitude/longitude value from which 
>    you wish to calculate directions. If you pass an address as a string, the 
>    Directions service will geocode the string and convert it to a 
>    latitude/longitude coordinate to calculate directions. *If you pass 
>    coordinates, ensure that no space exists between the latitude and 
> longitude 
>    values.*
>    
>
> -------------------------------------------------------------------------------------------------
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago 
> transit tracking app for Android-powered devices
>  

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to