From 0077627871a1dc604a458e167a053034cfca6788 Mon Sep 17 00:00:00 2001 From: chenfufeng Date: Wed, 15 Feb 2023 14:44:11 +0800 Subject: [PATCH] =?UTF-8?q?[Opt]=E5=85=A8=E8=A7=88=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E8=BF=9B=E5=85=A53D=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/mogo/eagle/core/function/view/OverMapView.kt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/OverMapView.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/OverMapView.kt index b32b7b3793..bcb0963f92 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/OverMapView.kt +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/view/OverMapView.kt @@ -71,7 +71,7 @@ class OverMapView @JvmOverloads constructor( private val zoomLevel = 15 private var mCameraUpdate: CameraUpdate? = null private var mContext: Context? = null - private val mTilt = 60f + private var mTilt = 0f private var overLayerView: TextView? = null // 全局路径规划中的GeoHash网格 @@ -159,6 +159,10 @@ class OverMapView @JvmOverloads constructor( overLayerView?.visibility = View.GONE } + fun showSiteMarkers() { + + } + private fun initView(context: Context) { mContext = context val smpView = LayoutInflater.from(context).inflate(R.layout.module_overview_map_view, this) @@ -177,6 +181,7 @@ class OverMapView @JvmOverloads constructor( private fun initAMapView(context: Context) { Log.d(TAG, "initAMapView") + mTilt = 30f mCameraUpdate = CameraUpdateFactory.zoomTo(zoomLevel.toFloat()) mAMap = mMapView!!.map mCustomMapStyleOptions = CustomMapStyleOptions() @@ -197,6 +202,8 @@ class OverMapView @JvmOverloads constructor( } // 实时路况图层关闭,必须添加在loaded结束之后,其他位置不生效 mAMap?.isTrafficEnabled = false + mAMap?.showBuildings(true) + mAMap?.animateCamera(CameraUpdateFactory.changeTilt(mTilt)) } setUpMap() customOptions() @@ -486,7 +493,7 @@ class OverMapView @JvmOverloads constructor( } else { //设置希望展示的地图缩放级别 val cameraPosition = CameraPosition.Builder() - .target(mCarMarker!!.position).tilt(0f).zoom(zoomLevel.toFloat()).build() + .target(mCarMarker!!.position).tilt(mTilt).zoom(zoomLevel.toFloat()).build() mAMap!!.moveCamera(CameraUpdateFactory.newCameraPosition(cameraPosition)) } }