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.
在此先感谢。