[6.7.0][Feat]高德地图增加圆角
This commit is contained in:
@@ -29,6 +29,7 @@ import com.amap.api.maps.model.Marker
|
||||
import com.amap.api.maps.model.MarkerOptions
|
||||
import com.amap.api.maps.model.Polyline
|
||||
import com.amap.api.maps.model.PolylineOptions
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener
|
||||
@@ -41,13 +42,14 @@ import com.mogo.eagle.core.function.business.travelreality.Point
|
||||
import com.mogo.eagle.core.function.business.travelreality.TravelRealityModel.Companion.travelNetWorkModel
|
||||
import com.mogo.eagle.core.function.business.travelreality.view.EventVideoView
|
||||
import com.mogo.eagle.core.function.business.travelreality.view.VideoMarkerEntity
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.map.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.MapAssetStyleUtils
|
||||
import com.mogo.eagle.core.utilcode.util.LocationUtils
|
||||
import com.mogo.eagle.core.widget.media.video.TextureVideoViewOutlineProvider
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
import mogo.telematics.pad.MessagePad
|
||||
|
||||
@@ -207,6 +209,7 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
|
||||
private var listener: OnDrawListener? = null
|
||||
private var gestureListener: OnGestureListener? = null
|
||||
private var isSmallMap: Boolean = true
|
||||
|
||||
init {
|
||||
try {
|
||||
@@ -278,6 +281,10 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
this.gestureListener = listener
|
||||
}
|
||||
|
||||
fun setMapFlag(isSmallMap: Boolean) {
|
||||
this.isSmallMap = isSmallMap
|
||||
}
|
||||
|
||||
/**
|
||||
* 清除所有Marker和Polyline
|
||||
*/
|
||||
@@ -400,6 +407,19 @@ class TravelRealityView @JvmOverloads constructor(
|
||||
})
|
||||
}
|
||||
|
||||
override fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int) {
|
||||
super.onSizeChanged(w, h, oldw, oldh)
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
if (isSmallMap) {
|
||||
this.outlineProvider = TextureVideoViewOutlineProvider(AutoSizeUtils.dp2px(context, 32f)
|
||||
.toFloat())
|
||||
this.clipToOutline = true
|
||||
} else {
|
||||
this.clipToOutline = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onVisibilityChanged(changedView: View, visibility: Int) {
|
||||
super.onVisibilityChanged(changedView, visibility)
|
||||
if (visibility == VISIBLE) {
|
||||
|
||||
Reference in New Issue
Block a user