How to display the actual route (static)

Asked by Drakuwa

Could you please help me with displaying the actual route on the map. I would like to include a static route from point A to point B in my school project application, and I am using OSMdroid's API for displaying the map, and YOURS for getting the kml file. I would like to show only the route, nothing more, like you do in Planning mode -> Directions, and when you set two points, you draw a route betweeen them, only that.

So I suppose I need RouteOverlay.java Route.java YOURSRouter.java what else? And how/where do I actually call the function for drawing on the map? I have a class that shows a map with some markers on it, I have geopoints for my current location, and the markers, so when I click on some marker, I would like to show a dialog, and a button ("Take me there") which I have already done, and I would like to draw the route between my location, and the marker when I click the button.

Thank you in advance, and please consider that I am an Android/Java newbie.

Question information

Language:
English Edit question
Status:
Answered
For:
OpenSatNav Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Kieran Fleming (kieran-fleming) said :
#1

In SatNavActivity the route overlay is added with this code:
this.mOsmv.getOverlays().add(routeOverlay);

and then on the onDraw method it calls the onDraw method of the route itself.

Please let me know how you go!

Can you help with this problem?

Provide an answer of your own, or ask Drakuwa for more information if necessary.

To post a message you must log in.