Merge remote-tracking branch 'origin/dev_1.1.9' into dev_1.1.9

This commit is contained in:
wujifei
2020-12-31 18:08:13 +08:00

View File

@@ -37,6 +37,7 @@ public class SmallMapDirectionView extends RelativeLayout {
private AMapNaviView mAMapNaviView;
private DirectionRotateAnimation mRotateAnimation;
private int lastAngle = 0;
private int zoomLevel = 17;
public SmallMapDirectionView(Context context) {
this(context, null);
@@ -133,19 +134,19 @@ public class SmallMapDirectionView extends RelativeLayout {
options.setNaviArrowVisible(false);
// 通过路线是否自动置灰,仅支持驾车导航
options.setAfterRouteAutoGray(false);
options.setZoom(((int) 9));
//options.setZoom(((int) 9));
//options.setPointToCenter(0.7D, 0.5D);
// 2D模式
options.setTilt(0);
// 黑夜模式
// options.setNaviNight(true);
//options.setNaviNight(true);
// 自定义地图样式
options.setCustomMapStylePath(styleFilePath);
mAMapNaviView.setViewOptions(options);
}
//设置希望展示的地图缩放级别
CameraUpdate cameraUpdate = CameraUpdateFactory.zoomTo(12);
CameraUpdate cameraUpdate = CameraUpdateFactory.zoomTo(zoomLevel);
aMap.moveCamera(cameraUpdate);
aMap.setOnCameraChangeListener(new AMap.OnCameraChangeListener() {
@@ -175,7 +176,7 @@ public class SmallMapDirectionView extends RelativeLayout {
}
//设置希望展示的地图缩放级别
CameraUpdate cameraUpdate = CameraUpdateFactory.zoomTo(12);
CameraUpdate cameraUpdate = CameraUpdateFactory.zoomTo(zoomLevel);
aMap.moveCamera(cameraUpdate);
}
});
@@ -218,7 +219,7 @@ public class SmallMapDirectionView extends RelativeLayout {
}
//设置希望展示的地图缩放级别
CameraUpdate cameraUpdate = CameraUpdateFactory.zoomTo(12);
CameraUpdate cameraUpdate = CameraUpdateFactory.zoomTo(zoomLevel);
aMap.moveCamera(cameraUpdate);
}
}