Driving directions in map

Put problem concerning MapActivities, MapViews, Overlays and GPS in this forum.

Driving directions in map

Postby Loganatha » Mon Apr 06, 2009 6:22 am

I am using android SDK 1.0.
To display the route,driving directions i have seen your example only for sdk0.9 such as

1) http://www.anddev.org/route_-_improved_ ... t1892.html
2) http://www.anddev.org/google_driving_di ... -t826.html


Questions:
1) Could you please provide me the tuotoiral link to gets the DrivingDirections via an URL-Call and parses the JSON response for SDK1.0.
2) Or i can decompile the android-sdk_m5-rc15_windows, to work with your samples. Will it works ?

Please do the needfull, it will be helpfull for most of the queries.
Loganatha
Freshman
Freshman
 
Posts: 8
Joined: Thu Mar 12, 2009 8:23 am

Top

Re: Driving directions in map

Postby jagtap.jj1 » Mon Apr 06, 2009 1:19 pm

To get driving direction via an URL

So how can Android applications show driving directions? It’s actually pretty simple, although not yet documented. If you launch a normal URL to the Google Maps website, Android will intercept and ask you if you really want to use the browser, or instead be directed over to the Android Maps app:



1. this.startActivity(new Intent(Intent.ACTION_VIEW,
2. Uri.parse("http://maps.google.com/maps?f=d&saddr=37.4,-121.9
3. &daddr=Bellevue, WA&hl=en")));

where saddr=37.4,-121.9 is start point lat, lon
java-android developer
User avatar
jagtap.jj1
Senior Developer
Senior Developer
 
Posts: 124
Joined: Fri Aug 22, 2008 11:52 am
Location: India(Mumbai)

Postby Loganatha » Tue Apr 07, 2009 6:25 am

Thanks for your valuable info.

Since I am new to android development.

Could you please provide me the tutorial link to display the route working with SDK1.0 which will be more usefull.
Loganatha
Freshman
Freshman
 
Posts: 8
Joined: Thu Mar 12, 2009 8:23 am

Postby jagtap.jj1 » Tue Apr 07, 2009 6:34 am

Its so simple, it does not needs tut.
just fire the above intent from your application, and the driving direction will be shown on maps.
this intent ,launches device map application, which shows the driving direction from start location point to end location point. st point and end point lat- lon are included in Url it self. enter any custom lat -lon in Url for whom u want to show
driving direction.

Regards jagtap
java-android developer
User avatar
jagtap.jj1
Senior Developer
Senior Developer
 
Posts: 124
Joined: Fri Aug 22, 2008 11:52 am
Location: India(Mumbai)

Postby Loganatha » Tue Apr 07, 2009 6:53 am

Oh g8. Thanks its working. The issue is due to my proxy settings, after bypassing the proxy i am able to run the map with route. :)

I have one questions.

The above code is actually redirecting to the existing emulator package Maps. Instead of this, any other apporach. I mean if i want to customise the Maps its not possible. I am not able to find the source code for Maps package.
Loganatha
Freshman
Freshman
 
Posts: 8
Joined: Thu Mar 12, 2009 8:23 am

Postby jagtap.jj1 » Tue Apr 07, 2009 9:31 am

search here code for map appl
http://android.git.kernel.org/
java-android developer
User avatar
jagtap.jj1
Senior Developer
Senior Developer
 
Posts: 124
Joined: Fri Aug 22, 2008 11:52 am
Location: India(Mumbai)

Top

Postby ajit.ps1 » Tue Apr 07, 2009 12:06 pm

jagtap.jj1 wrote:search here code for map appl
http://android.git.kernel.org/


Hi jagtap
I am not able to fing the code for maps app at the link mentiioned above.
Can u share the complete path for the maps app?
ajit.ps1
Junior Developer
Junior Developer
 
Posts: 14
Joined: Thu Jan 29, 2009 11:31 am
Location: Delhi

Postby Loganatha » Wed Apr 08, 2009 5:38 am

Hi jagtap,


1) How to do the Map overlay using your approach ( Uri.parse("http://maps.google.com/maps?........... )
2) I am not able to see the Maps application code in the given link http://android.git.kernel.org/

Please reply me as soon as possible. Waiting for your response.
Loganatha
Freshman
Freshman
 
Posts: 8
Joined: Thu Mar 12, 2009 8:23 am

Postby linkmaster_6 » Thu Apr 09, 2009 7:26 pm

from what i understand you want to make a map activity then have that activity show the route. Unfortunately they have taken this function out of SDK 1.0 and as of right now it is not possible. the only way to get or make a route is though the built in google maps
linkmaster_6
Experienced Developer
Experienced Developer
 
Posts: 51
Joined: Thu Oct 16, 2008 8:52 pm

Postby poliomom » Wed Apr 15, 2009 9:27 am

Hello,

I'm using that method to display directions :
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://maps.google.com/maps?f=d&source=s_d&saddr=47.641336,-2.758942&daddr=47.631156,-2.832756&hl=fr")));

It works fine but the directions are in english. I would like to know how I can get them in french (for instance). I tried using "hl=fr" instead of "hl=en" but I always have "turn left" instead of "tourner à droite".

Thanks in advance.
poliomom
Once Poster
Once Poster
 
Posts: 1
Joined: Wed Apr 15, 2009 9:20 am

Top

Return to Map Problems

Who is online

Users browsing this forum: No registered users and 1 guest