倾斜地图视图

时间:2012-12-29 19:01:36

标签: android google-maps rotation

我正试图找到一种倾斜地图视图的方法。我正在使用setRotationX,但是如果我还围绕z轴旋转(在旋转之前包含视图的部分),则屏幕的一部分变为黑色。设置背景没有任何作用,调整相机距离也没有帮助。请问有人给我一些建议吗?这是我到目前为止所做的:

rotationView.setBackgroundResource(android.R.color.holo_blue_bright);
enhancedMapView.setBackgroundResource(android.R.color.holo_blue_bright);
//Log.i("MapView","Rotating");
rotationView.setPivotX(rotationView.getWidth()/2);
rotationView.setPivotY(rotationView.getHeight()/2);
enhancedMapView.setRotationX(45);
rotationView.setRotationDegrees(45);
enhancedMapView.setCameraDistance(3000);

(通过调用函数setRotationDegrees,地图视图包含在处理z轴旋转的视图中。)

0 个答案:

没有答案