I'm trying to draw a radius in the map that matches the actual zoomlevel. I've seen several posts with ideas (and solutions) to calculate the distance between two points on a sphere and I realize I can use that to do what I want. But I've also noticed google already provides a static method Location.distanceBetween( lat1, long1, lat2, long2, results).
So my idea was, every time I need to adapt the radius to the zoomlevel, I get two pixel positions on the screen, convert them to geopoints and than get the distance between the two. Now I can relate that value to my radius size.
But I'm having a problem in getting the results from distanceBetween method. I've tried to use the direct values from getLatitudeE6(), etc. methods from the GeoPoints but it gives me gigantic distances. I've seen some people converting the latitude and longitude from a location to a geopoint (microdegrees), by multiplying it by 1E6, so I assumed that dividing the values returned by the getLatitudeE6(), etc methods by 1E6 would work in distanceBetween but the program simply stops running after the method executes with the divided values.
Am I doing something wrong? How can I convert the data from a GeoPoint so it is compatible with Location.distanceBetween(...)?
I'm really not getting something here :/ Thank you in advance.