Re: [android-developers] Google direction API
Hi TreKing, thank you for your response. to answer to your question, I did removed the space and tried with a comma - there is no change in the behavior. I am wondering if you can think of any tips or others can chip in.. i posted this question at multiple sites. I will let you know if I get it to work or someone else responds with a solution. so far no one did... uggh :-( On Saturday, July 6, 2013 6:52:09 PM UTC-7, Sunny wrote: Hi TreKing, It doesn't matter whether you put a comma or a space, the behavior is : it works well with a space or comma when you are invoking it on the browser. It does not work when you do the same from an android code. I wish the error response was something like illegal argument or not found etc but here the response is REQUEST_DENIED. That is what is frustrating. thanks Sunny On Saturday, July 6, 2013 4:51:16 PM UTC-7, TreKing wrote: On Sat, Jul 6, 2013 at 4:19 PM, Sunny meno...@gmail.com wrote: However if you remove the space btw the Lat Lnt, it would not work and the status will be NOT FOUND. Well, you're not just removing the space and thus combining the two values, are you? You're supposed to separate them with a comma: http://maps.googleapis.com/maps/api/directions/xml?origin=37.2345487,-121.5840723destination=37.236064,-121.961595sensor=false - 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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com 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 android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Google direction API
On Sat, Jul 6, 2013 at 8:52 PM, Sunny menon1...@gmail.com wrote: It doesn't matter whether you put a comma or a space, the behavior is : it works well with a space or comma when you are invoking it on the browser. It does not work when you do the same from an android code. Then there is something wrong with your Android code. Perhaps the fact that you are using an HttpPost object. I believe this call is a GET. - 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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com 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 android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Google direction API
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? -DirectionsResponsestatusNOT_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.5840723destination=37.236064 -121.961595sensor=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 meno...@gmail.com 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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com 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 android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Google direction API
On Sat, Jul 6, 2013 at 4:19 PM, Sunny menon1...@gmail.com wrote: However if you remove the space btw the Lat Lnt, it would not work and the status will be NOT FOUND. Well, you're not just removing the space and thus combining the two values, are you? You're supposed to separate them with a comma: http://maps.googleapis.com/maps/api/directions/xml?origin=37.2345487,-121.5840723destination=37.236064,-121.961595sensor=false - 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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com 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 android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Google direction API
Hi TreKing, It doesn't matter whether you put a comma or a space, the behavior is : it works well with a space or comma when you are invoking it on the browser. It does not work when you do the same from an android code. I wish the error response was something like illegal argument or not found etc but here the response is REQUEST_DENIED. That is what is frustrating. thanks Sunny On Saturday, July 6, 2013 4:51:16 PM UTC-7, TreKing wrote: On Sat, Jul 6, 2013 at 4:19 PM, Sunny meno...@gmail.com javascript:wrote: However if you remove the space btw the Lat Lnt, it would not work and the status will be NOT FOUND. Well, you're not just removing the space and thus combining the two values, are you? You're supposed to separate them with a comma: http://maps.googleapis.com/maps/api/directions/xml?origin=37.2345487,-121.5840723destination=37.236064,-121.961595sensor=false - 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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com 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 android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Google direction API
This is your code On Thu, Jul 4, 2013 at 9:19 PM, Sunny menon1...@gmail.com 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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com 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 android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] google direction api
This has nothing to do with Android. One would imagine that, somewhere out on the Internet, there is a support resource for Google Maps API. On Thu, Oct 13, 2011 at 2:06 PM, Goutom goutom.sust@gmail.com wrote: Hi I want to get direction between two geopoints and using web service describes in this link http://code.google.com/apis/maps/documentation/directions/ . Using this url ( http://maps.googleapis.com/maps/api/directions/json?origin=23.884228857253493,90.40052890777588destination=23.738054845909193,90.39518594741821alternatives=falsesensor=false ) I got the json file . There is portion: { distance : { text : 2.5 km, value : 2462 }, duration : { text : 5 mins, value : 316 }, end_location : { lat : 23.757390, lng : 90.399010 }, html_instructions : Turn \u003cb\u003eleft\u003c/b\u003e onto \u003cb\u003eShahed Tazuddin Ahmed Sharani\u003c/b\u003e, polyline : { points : khcpCu{vfPjCWxAE`C]\\E`@EhBYxAUhA[hA_@fA]b@Yt@c@~@k@pBsAx@m@bEsBd@Gz@Et@K~FC`Ed@p@HdGl@fGn@`In@~CZbGh@fGj@hGh@lFf@bFh@ }, start_location : { lat : 23.778780, lng : 90.398191 }, travel_mode : DRIVING }, If I draw all the start point and end point then it dose not give me the smooth direction. can u describe the portion: polyline : { points : khcpCu{vfPjCWxAE`C]\\E`@EhBYxAUhA[hA_@fA]b@Yt@c@~@k@pBsAx@m@bEsBd@Gz@Et@K~FC`Ed@p@HdGl@fGn@`In@~CZbGh@fGj@hGh@lFf@bFh@ }, How can I decode points and what is these points? waiting to hear from you. Thanks in advance. Regards Goutom -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 4.0 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en