[Opt]全览模式默认进入3D模式
This commit is contained in:
@@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user