问题
I tried the following code.
LatLngBounds b = googleMap.getProjection()
.getVisibleRegion().latLngBounds;
LatLng bNE = b.northeast;
LatLng bSW = b.southwest;
It's not giving correct bounding coordinates if tilt is set to the map
回答1:
As mentioned in the Google Maps API doc VisibleRegion, the visible region for a map's camera can be in the form of a rectangle in case the camera is centered over the map region which will give you correct bounding coordinates. While it can also be in the form of a trapezoid, in case the camera has tilt, which is your case.
That's why you're getting wrong bounding coordinates!
来源:https://stackoverflow.com/questions/44268609/how-to-get-latlngbounds-of-visible-region-in-titled-map-in-andorid