Search code examples
androidosmdroid

Draw GreatCircle using PathOverlay by OSMdroid


Can anyone, help me draw a circle or rather precisely an Arc with a given center point (GeoPoint) and the start and end points as well. So basically, it should help me draw a sector with given center point along with start and end points. I'm planning to use PathOverlay as my baseclass from OSMdroid, so that it would be easier for me to remove or add.

I understand the greatCircle provided in PathOverlay of OSMdroid, but not quit sure how to make use of it, I was wondering if any sample example be provided. Also How would I set the center of this GreatCircle.


Solution

  • Don't use a PathOverlay to draw filled polygons: as you noticed, this doesn't work properly when portions of the polygon are outside the screen. for filled polygons, use an OSMBonusPack Polygon.

    For setting the points of your arc, there is no ready-to-use API currently.