0
我在找經緯度值右上角的地圖查看使用android googel maps V2。我在同一個問題上發佈了類似的問題,但沒有用。如何在使用android谷歌地圖V2獲取地圖經度和緯度
我爲此編寫了代碼,但獲得了零值。
請檢查我的代碼:
MapView mapView = ((SupportMapFragment) getSupportFragmentManager()
.findFragmentById(R.id.map)).getMap();
LatLngBounds bounds = mapView.getProjection().getVisibleRegion().latLngBounds;
LatLng topright = bounds.northeast;
double toprgt_latitude = topright.latitude;
Log.d("top lat", "" + toprgt_latitude);//getting zero values.
在此先感謝。