From 606a8663c2a406edb3bea68c8b0958f26d4695f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=AE=87?= Date: Thu, 31 Dec 2020 17:48:46 +0800 Subject: [PATCH] =?UTF-8?q?=E9=99=8D=E4=BD=8E=E4=BA=86=E5=B0=8F=E5=9C=B0?= =?UTF-8?q?=E5=9B=BE=E8=A7=86=E8=A7=92=E9=AB=98=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mogo/module/small/map/SmallMapDirectionView.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/mogo-module-smp/src/main/java/com/mogo/module/small/map/SmallMapDirectionView.java b/modules/mogo-module-smp/src/main/java/com/mogo/module/small/map/SmallMapDirectionView.java index dec53d8d38..2d945b972f 100644 --- a/modules/mogo-module-smp/src/main/java/com/mogo/module/small/map/SmallMapDirectionView.java +++ b/modules/mogo-module-smp/src/main/java/com/mogo/module/small/map/SmallMapDirectionView.java @@ -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); } }