[3.0.0][opt]支持高德地图倾斜角可配置

This commit is contained in:
chenfufeng
2023-04-11 10:29:25 +08:00
parent f9b0d630d3
commit 2e00171e7a
2 changed files with 3 additions and 1 deletions

View File

@@ -145,6 +145,7 @@ class OverMapView @JvmOverloads constructor(
topPadding = typedArray.getInt(R.styleable.OverMapView_topPadding, 100)
rightPadding = typedArray.getInt(R.styleable.OverMapView_rightPadding, 100)
bottomPadding = typedArray.getInt(R.styleable.OverMapView_bottomPadding, 100)
mTilt = typedArray.getFloat(R.styleable.OverMapView_mapTilt, 30f)
typedArray.recycle()
initView(context)
} catch (e: Exception) {
@@ -296,7 +297,6 @@ 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()

View File

@@ -29,5 +29,7 @@
<attr name="topPadding" format="integer" />
<attr name="rightPadding" format="integer" />
<attr name="bottomPadding" format="integer" />
<!-- 倾斜角 -->
<attr name="mapTilt" format="float" />
</declare-styleable>
</resources>