How to draw path from present location to specified location

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

How to draw path from present location to specified location

Postby subbarao » Wed May 05, 2010 5:43 am

Hi all, In my application I want to draw a path from present location to Destination location. All my required Destination Geopoints are saved in Database. I am retrieving from Database. But I am unable to get my Present location's Geopoint. For getting Present location I Write a Listener OnlocationChange(). But it doesn't call at first time. It calls when second time I enter to the application. it shows only our present location map Hyderabad second time. So, please consider this issue and give me solution....
subbarao
Freshman
Freshman
 
Posts: 6
Joined: Wed Mar 03, 2010 6:09 am
Location: Hyderabad

Top

Postby kekomal » Wed May 05, 2010 7:59 am

A good example for drawing routes:
http://csie-tw.blogspot.com/2009/06/android-driving-direction-route-path.html

For drawing your current location on the map, use MyLocationOverlay class. An example here:
http://blogs.itemis.de/frey/2009/04/04/location-based-services-on-android-part-1/
kekomal
Junior Developer
Junior Developer
 
Posts: 19
Joined: Wed Mar 17, 2010 10:44 am
Location: Bilbao, Spain

thank U very much

Postby subbarao » Wed May 05, 2010 8:42 am

Just now I go through your links. for finding current location geopoint through overlay gives null pointer exception.
subbarao
Freshman
Freshman
 
Posts: 6
Joined: Wed Mar 03, 2010 6:09 am
Location: Hyderabad

Top

Return to Map Problems

Who is online

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