How to convert geodesic + latitude to double?

I am retrieving the map view center and I need to pass longs and lats as duplicates for my server to test against the database.

How do I switch to mapView.getMapCenter () conversion. getLongitudeE6 () in double?

+4
source share
1 answer

A call to mapView.getMapCenter() returns a GeoPoint . GeoPoint.getLongitudeE6() and GeoPoint.getLatitudeE6() return microdegs (mainly degrees * 1E6).

So, in Java, to convert microdehydes to degrees, simply do:

 public static double microDegreesToDegrees(int microDegrees) { return microDegrees / 1E6; } 
+16
source

All Articles