Today I'm looking forward of how to use PathOverlay in OSMDroid.
I can't find any explanation of how it works.
I need to create a suggested route (not like navigation system), just a stroke begining at a point, do a "circuit" and then return to the starting point.
Just like this (drawn in google maps):
I'm here to ask what's the correct way to do this, specifying a custom path, doing the turns I want.
Thanks!
Here is the tutorial how to draw the road with Polyline in OSMBonusPack: https://github.com/MKergall/osmbonuspack/wiki/Tutorial_1
It is pretty easy and I have successfully used this in my app.
My code based on that tutorial is looking like this:
It will draw a series of straight lines for you on top of the map, so you need to know the latitude and longitude of all your road junctions (and everywhere they bend away from a straight line). Add all these points to the overlay. As an example, this code will draw a rectangular box in central London.
.