Android Google Maps get Boundary Co-ordinates
You need to use Projection
and VisibleRegion
classes in order to get visible LatLng region.
So your code would look something like:
LatLngBounds curScreen = googleMap.getProjection()
.getVisibleRegion().latLngBounds;
In Android(Kotlin) you can find LatLng this way, in every time zoom or. gesture detect
private var mMap: GoogleMap? = null
..........
mMap?.setOnCameraMoveStartedListener { reasonCode ->
if (reasonCode == GoogleMap.OnCameraMoveStartedListener.REASON_GESTURE) {
val curScreen: LatLngBounds = mMap!!.getProjection().getVisibleRegion().latLngBounds
var northeast=curScreen.northeast
var southwest=curScreen.southwest
var center=curScreen.center
Log.v("northeast LatLng","-:"+northeast)
Log.v("southwest LatLng","-:"+southwest)
Log.v("center LatLng","-:"+center)
}
}