Generating Route

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

Generating Route

Postby fabiel prestes » Mon Nov 03, 2008 1:16 pm

hi all,

I am a doubt on how to create routes using the MapView.
Can you give me a tip on how to use this feature ?
fabiel prestes
Freshman
Freshman
 
Posts: 4
Joined: Mon Nov 03, 2008 1:11 pm

Top

Re: Generating Route

Postby Bruce.lntu » Tue Nov 04, 2008 5:29 am

fabiel prestes wrote:hi all,

I am a doubt on how to create routes using the MapView.
Can you give me a tip on how to use this feature ?


Hi, on creating routes, path is needed, on creating path, points and the relations between points are needed.so, you should get the geopoints from the open database first. unfortunately, there is little service of this kind in use for free.

Bruce
User avatar
Bruce.lntu
Developer
Developer
 
Posts: 37
Joined: Thu Jan 03, 2008 11:36 am

Postby haden » Tue Nov 04, 2008 7:45 am

I guess you can have the GPS coordinates along the route and then draw lines from one coordinate to the other
haden
Experienced Developer
Experienced Developer
 
Posts: 74
Joined: Thu Sep 11, 2008 11:51 am

Post subject: Re: Generating Route

Postby fabiel prestes » Tue Nov 04, 2008 11:15 am

Hi all,

All points marked on the map, Anybody know the class that trace the routes?
fabiel prestes
Freshman
Freshman
 
Posts: 4
Joined: Mon Nov 03, 2008 1:11 pm

Re: Post subject: Re: Generating Route

Postby juya » Tue Nov 04, 2008 3:53 pm

"com.google.googlenav"-Package

It was possible to use above class but not anymore.. Unfortunately....

But There is alternative to solve the problem (actually, Not a perfect way!!)

You can use Intent Class and Call Mapview with some attributes
this is a sample

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

saddr=[need start point|Name]
daddr=[need destination point|Name]
I love u Marta
juya
Freshman
Freshman
 
Posts: 2
Joined: Tue Nov 04, 2008 7:54 am
Location: S.Korea

Postby haden » Tue Nov 04, 2008 4:09 pm

That gives you googles route right? its not your own route..
haden
Experienced Developer
Experienced Developer
 
Posts: 74
Joined: Thu Sep 11, 2008 11:51 am

Top

Postby Bruce.lntu » Wed Nov 05, 2008 2:35 am

haden wrote:That gives you googles route right? its not your own route..
:)
User avatar
Bruce.lntu
Developer
Developer
 
Posts: 37
Joined: Thu Jan 03, 2008 11:36 am

Re: Post subject: Re: Generating Route

Postby linkmaster_6 » Thu Nov 06, 2008 1:29 pm

juya wrote:"com.google.googlenav"-Package

It was possible to use above class but not anymore.. Unfortunately....

But There is alternative to solve the problem (actually, Not a perfect way!!)

You can use Intent Class and Call Mapview with some attributes
this is a sample

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

saddr=[need start point|Name]
daddr=[need destination point|Name]




could someone please provide a batter example or working code? thank you very much
linkmaster_6
Experienced Developer
Experienced Developer
 
Posts: 51
Joined: Thu Oct 16, 2008 8:52 pm

Postby ducateg » Wed Nov 12, 2008 7:19 pm

There is not much to it, I am not sure it is batter (sorry) but here is another example:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. this.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://maps.google.com/maps?f=d&saddr=startLat%20startLng&daddr=endLat%20endLng&hl=en")));
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


Where startLat, startLng, endLat, endLng are a long with 6 decimals like: 50.123456
Stick this code somewhere as the action for a button for example and there you go.
User avatar
ducateg
Junior Developer
Junior Developer
 
Posts: 19
Joined: Mon Jul 07, 2008 10:32 am
Location: Ipswich UK

Top

Return to Map Problems

Who is online

Users browsing this forum: Exabot [Bot] and 7 guests