[Opt]全览模式暴露清除轨迹并隐藏起终点的接口
This commit is contained in:
@@ -196,6 +196,20 @@ class OverMapView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 清空线路并隐藏起、终点
|
||||
*/
|
||||
fun clearCustomPolyline() {
|
||||
if (mBottomPolyline != null) {
|
||||
mBottomPolyline!!.remove()
|
||||
}
|
||||
if (mCoveredPolyline != null) {
|
||||
mCoveredPolyline!!.remove()
|
||||
}
|
||||
mStartMarker?.isVisible = false
|
||||
mEndMarker?.isVisible = false
|
||||
}
|
||||
|
||||
private fun initView(context: Context) {
|
||||
mContext = context
|
||||
val smpView = LayoutInflater.from(context).inflate(R.layout.module_overview_map_view, this)
|
||||
@@ -413,15 +427,6 @@ class OverMapView @JvmOverloads constructor(
|
||||
return false
|
||||
}
|
||||
|
||||
fun clearCustomPolyline() {
|
||||
if (mBottomPolyline != null) {
|
||||
mBottomPolyline!!.remove()
|
||||
}
|
||||
if (mCoveredPolyline != null) {
|
||||
mCoveredPolyline!!.remove()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 绘制新基建Markers(比如:摄像头)
|
||||
*
|
||||
@@ -615,6 +620,7 @@ class OverMapView @JvmOverloads constructor(
|
||||
mCoveredPolyline = mAMap!!.addPolyline(polylineOptions)
|
||||
if (mBottomPolyline != null) {
|
||||
mBottomPolyline!!.remove()
|
||||
mBottomPolyline = null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user