dm78
dm78

Reputation: 1600

Get extents of map view?

Does anyone know of an easy way to get the extents of the view in a MapFragment or SupportMapFragment?

That is, I need to get GPS coordinates for the top-left and bottom-right corners of the viewable area for a Google Play Services MapFragment as displayed below:MapFragment view

I need to be able to get these coordinates when the user resizes or relocates the view.

Upvotes: 0

Views: 221

Answers (1)

MaciejGórski
MaciejGórski

Reputation: 22232

Use

map.getProjection().getVisibleRegion().farLeft

Read more about VisibleRegion.

Upvotes: 1

Related Questions