2

i want to just find a shortest path between the location on map. we have to pass the location's geopoint then click the button to get direction. it will show the shortest path like a blue line. how to do this? i search about this. many of them import a package com.google.googlenav.*;. where i have to get this? Any Idea????

Edit:got downloaded the Cloudemade API. how to draw the lines between the points.

Praveen
  • 90,477
  • 74
  • 177
  • 219

3 Answers3

3

Here there is a library that implements that: http://home.ameliemedia.com/android-app-aroundme/#tips I personally haven't tested it but by reading the comments there it should work.

Jan S.
  • 10,328
  • 3
  • 31
  • 36
  • 1
    its the working example. http://stackoverflow.com/questions/2023669/j2me-android-blackberry-driving-directions-route-between-two-locations/2023685#2023685 fulfills all my needs. – Praveen Apr 03 '10 at 08:33
1

Google removed this functionality from their Android Google Maps SDK so you will have to use some other api to get directions between two points. Once you have the waypoints you will need to create an Overlay class and in the draw() method, use the Path class to draw a path between the points.

Robby Pond
  • 73,164
  • 16
  • 126
  • 119
  • sample code plz.. i cant understand the words "create an Overlay class and in the draw() method, use the Path class to draw a path between the points". – Praveen Apr 01 '10 at 12:38
1

its the working example. fulfills all my needs.

Community
  • 1
  • 1
Praveen
  • 90,477
  • 74
  • 177
  • 219