Google Map V2 API:如何显示特定的地图区域

问题描述:

我正在使用google map api v2.我想根据地图边界(东北和西南坐标)显示特定的地图区域.但是,google map api v2仅支持setCenter()方法.是否有任何公式可以根据地图区域计算中心位置?

I am using google map api v2. I'd like to show a specific map area based on map bound (northeast and southwest coordinates). However, google map api v2 only supports setCenter() method. Is there any formula to calculate center position based on map area?

使用地图的GetBounds()方法,从中可以获取中心以及其他信息.

Use the map's GetBounds() method from which you can get the center along with other information.