[6.5.0] extend marker options and wait to union map_jni
This commit is contained in:
@@ -4,12 +4,18 @@ import android.annotation.SuppressLint
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.enums.TrafficTypeEnum
|
||||
import com.mogo.eagle.core.function.call.biz.CallerFuncBizListenerManager
|
||||
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.isPassenger
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils.isTaxi
|
||||
import com.mogo.map.overlay.core.Level
|
||||
import com.mogo.map.overlay.point.Point
|
||||
import mogo.telematics.pad.MessagePad.*
|
||||
|
||||
object TrackerSourceFilterHelper {
|
||||
|
||||
private const val TAG = "TrackerSourceColor"
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
fun filterData(data: TrackedObject): Boolean {
|
||||
if (!FunctionBuildConfig.isDrawUnknownIdentifyData && (data.type == TrafficTypeEnum.TYPE_TRAFFIC_ID_WEI_ZHI.type
|
||||
@@ -92,10 +98,21 @@ object TrackerSourceFilterHelper {
|
||||
|
||||
//僵尸车
|
||||
if (data.addAttribute == AdditionalAttribute.ATTR_ZOMBIE) {
|
||||
color = "#7A8499FF"
|
||||
if (FunctionBuildConfig.skinMode == 1) {
|
||||
color = "#9BA8BCFF"
|
||||
}
|
||||
// color = "#7A8499FF"
|
||||
// if (FunctionBuildConfig.skinMode == 1) {
|
||||
// color = "#9BA8BCFF"
|
||||
// }
|
||||
val opt = Point.Options.Builder(TAG,Level.MAP_MARKER)
|
||||
.setId(data.uuid.toString())
|
||||
.latitude(data.latitude)
|
||||
.longitude(data.longitude)
|
||||
.isUseGps(true)
|
||||
.rotate(data.heading.toFloat())
|
||||
.setAnimResource(R.raw.yujingguangquan)
|
||||
.setDisplayAnim(true)
|
||||
.setAnimScale(getAnimScale(data.type))
|
||||
.build()
|
||||
CallerMapUIServiceManager.getOverlayManager()?.showOrUpdatePoint(opt)
|
||||
//消息埋点
|
||||
CallerFuncBizListenerManager.invokeAttrZombieAnalyticsEvent()
|
||||
}
|
||||
@@ -103,6 +120,20 @@ object TrackerSourceFilterHelper {
|
||||
return color
|
||||
}
|
||||
|
||||
private fun getAnimScale(type:Int):Float{
|
||||
return when (type) {
|
||||
TrafficTypeEnum.TYPE_TRAFFIC_ID_TA_CHE.type -> {
|
||||
2.6f
|
||||
}
|
||||
TrafficTypeEnum.TYPE_TRAFFIC_ID_BUS.type, TrafficTypeEnum.TYPE_TRAFFIC_ID_TRUCK.type -> {
|
||||
4.0f
|
||||
}
|
||||
else -> {
|
||||
0f
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 过滤所有 工控感知数据 all match
|
||||
*/
|
||||
|
||||
Binary file not shown.
@@ -151,6 +151,21 @@ data class Point(val id: String, val owner: String, val level: Level, val option
|
||||
*/
|
||||
val moveToCenter: Boolean = builder.moveToCenter
|
||||
|
||||
/**
|
||||
* 设置动画资源
|
||||
*/
|
||||
val displayAnim:Boolean = builder.displayAnim
|
||||
|
||||
/**
|
||||
* 动画资源
|
||||
*/
|
||||
val animRes:Int = builder.animRes
|
||||
|
||||
/**
|
||||
* 动画缩放
|
||||
*/
|
||||
val animScale:Float = builder.animScale
|
||||
|
||||
/**
|
||||
* marker点击事件处理
|
||||
*/
|
||||
@@ -291,6 +306,33 @@ data class Point(val id: String, val owner: String, val level: Level, val option
|
||||
*/
|
||||
internal var onMarkerClickListener:WeakReference<((id: String) -> Unit)>? = null
|
||||
|
||||
/**
|
||||
* 是否显示动画
|
||||
*/
|
||||
internal var displayAnim:Boolean = false
|
||||
|
||||
/**
|
||||
* 设置动画资源
|
||||
*/
|
||||
internal var animRes:Int = 0
|
||||
|
||||
/**
|
||||
* 动画缩放
|
||||
*/
|
||||
internal var animScale:Float = 0f
|
||||
|
||||
fun setDisplayAnim(displayAnim:Boolean) = apply {
|
||||
this.displayAnim = displayAnim
|
||||
}
|
||||
|
||||
fun setAnimResource(animRes: Int) = apply {
|
||||
this.animRes = animRes
|
||||
}
|
||||
|
||||
fun setAnimScale(animScale: Float) = apply {
|
||||
this.animScale = animScale
|
||||
}
|
||||
|
||||
fun setId(id: String) = apply {
|
||||
this.id = id
|
||||
}
|
||||
|
||||
@@ -65,6 +65,9 @@ public class ObjectUtils {
|
||||
.controlAngle(opt.isControlAngle())
|
||||
.rotateAngle(opt.getRotate())
|
||||
.setFlat(opt.isFlat())
|
||||
// .setAnimResource()
|
||||
// .setDisplayAnimEnable()
|
||||
// .setAnimScale()
|
||||
.visible(opt.isVisible())
|
||||
.infoWindowEnable(opt.isInfoWindowEnable())
|
||||
.scale(opt.getScale())
|
||||
@@ -119,16 +122,13 @@ public class ObjectUtils {
|
||||
markerOptions.setTime(Double.valueOf(trafficData.getSatelliteTime() * 1000).longValue());
|
||||
if(!trafficData.getColor().isEmpty()){
|
||||
if(trafficData.getColor().contains("-drawColor")){
|
||||
// markerOptions.setColorType(3);
|
||||
markerOptions.setColor(trafficData.getColor().split("-")[0]);
|
||||
} else if(trafficData.getColor().contains("-resetColor")){
|
||||
// markerOptions.setColorType(4);
|
||||
markerOptions.setColor(trafficData.getColor().split("-")[0]);
|
||||
} else{
|
||||
markerOptions.setColor(trafficData.getColor());
|
||||
}
|
||||
}else{
|
||||
// markerOptions.setColorType(0);
|
||||
markerOptions.setColor("#00000000");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user