问题
I am currently tasked with converting a Google Android maps v1 application over to Google Android Maps V2 application. The process is not a pleasant one (thanks google).
My problem is that in the previous application they used a nice little method of Google Android Maps v1 called metersToEquatorPixels that you could get from the Map's projection object.i.e.
int px =(int) (mapProjection.metersToEquatorPixels(radiusInMeters) * (1 / Math.cos(Math.toRadians(latitudeActual))));
However, in Google Android maps V2 there is not such a method I could find. Can anyone tell me where it is, or what a suitable replacement might be?
回答1:
You dont need to do that, just draw a circle and pass away center and radius in meters
mMap.addCircle(new CircleOptions()
.center(latLng)
.radius(radiusInMeters)
.fillColor(Color.BLUE));
来源:https://stackoverflow.com/questions/24071133/google-android-maps-v2-meterstoequatorpixel