Android Google Maps get Boundary Co-ordinates

2019-01-13 21:53发布

I am using Google Maps v2 in my application. When the user pans or zooms on the screen I would like to get the area of the map based on which I want to fetch the POI only in the screen view part.
I went through the documentation but could not find any help.

1条回答
一夜七次
2楼-- · 2019-01-13 21:56

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;
查看更多
登录 后发表回答