Android Google Map : Heading is drawn wrongly, when I draw a line with specific length and heading on Google Map
问题 I have a GoogleMap in my project. It's set in zoom level 21. I want to draw a line that is 5 meter in length with a specific heading. I used this code: private LatLng drawHeadingOnMap(LatLng centre, double radius, double heading) { double EARTH_RADIUS = 6378100.0; // Convert to radians. double lat = Math.toRadians(centre.latitude ); double lon = Math.toRadians(centre.longitude); // y double latPoint = lat + (radius / EARTH_RADIUS) * Math.sin(Math.toRadians(heading)); // x double lonPoint =