osmdroid / osmdroid

OpenStreetMap-Tools for Android
Apache License 2.0
2.87k stars 985 forks source link

trying to understand bearing #1108

Open copypasteearth opened 6 years ago

copypasteearth commented 6 years ago

hello I have this code

GeoPoint gp =  new GeoPoint(20.427821028047866,-16.607263802178522);
            GeoPoint ap =  new GeoPoint(42.0,-80.0);
            double bearing;
            bearing = ap.bearingTo(gp);
            GeoPoint actuall = ap.destinationPoint(inter/0.00053996,bearing);

the problem is that I am trying to put the actuall point on top of the line from ap to gp but I think that the bearing is wrong because the distance is right but it is not on top of the line from ap to gp. any help is greatly appreciated thank you here is a picture of what im talking about mapsapp

spyhunter99 commented 6 years ago

i bet if you set the stroke width of the lines to be 1, then marker would be dead on. I thin it's just how android draws lines with a wider stroke width