[2.15.0-merge-master]
This commit is contained in:
@@ -40,6 +40,11 @@ android {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -61,5 +61,9 @@ class IdentifyBeautifyDataDrawer : Identify {
|
||||
TrackManager.getInstance().clearAll()
|
||||
}
|
||||
|
||||
override fun getIdentifyObj(uuid: String): TrackedObject? {
|
||||
return TrackManager.getInstance().getIdentifyObj(uuid)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -166,4 +166,13 @@ public class TrackManager {
|
||||
mMarkersCaches.clear();
|
||||
}
|
||||
|
||||
public MessagePad.TrackedObject getIdentifyObj(String uuid) {
|
||||
TrackObj trackObj = mMarkersCaches.get(uuid);
|
||||
if (trackObj != null && trackObj.getCache() != null) {
|
||||
return trackObj.getCache();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ object TrafficMarkerDrawer {
|
||||
fun updateITrafficThreatLevelInfo(trafficData: TrafficData) {
|
||||
CallerLogger.d(TAG,
|
||||
"trafficData.type = " + trafficData.type + "---trafficData.threatLevel = " + trafficData.threatLevel + "----FunctionBuildConfig.debugTrackerProvider = " + FunctionBuildConfig.debugTrackerProvider)
|
||||
if (FunctionBuildConfig.debugTrackerProvider != 1) {
|
||||
if (FunctionBuildConfig.debugTrackerProvider != 1) {
|
||||
return
|
||||
}
|
||||
if (trafficData != null && !TextUtils.isEmpty(trafficData.uuid)) {
|
||||
@@ -128,6 +128,10 @@ object TrafficMarkerDrawer {
|
||||
fun removeCvxRvInfoIndInfo(key: String) {
|
||||
if (mTrafficMap.containsKey(key)) {
|
||||
mTrafficMap.remove(key)
|
||||
mMarkersCaches.get(key)?.let {
|
||||
it.remove()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ object MarkerDrawerManager {
|
||||
|
||||
fun startLoopCalCarLocation() {
|
||||
routeWipeDisposable = CompositeDisposable()
|
||||
getLoopCalCarObservable().delay(1000L, TimeUnit.MILLISECONDS, true)
|
||||
getLoopCalCarObservable().delay(500L, TimeUnit.MILLISECONDS, true)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.repeat()
|
||||
.retry()
|
||||
|
||||
@@ -176,7 +176,9 @@ class SmallMapView @JvmOverloads constructor(
|
||||
// 关闭显示实时路况图层,aMap是地图控制器对象。
|
||||
mAMap?.isTrafficEnabled = false
|
||||
// 设置 锚点 图标
|
||||
mCarMarker = if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) {
|
||||
mCarMarker = if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)
|
||||
|| AppIdentityModeUtils.isShuttle(FunctionBuildConfig.appIdentityMode)
|
||||
|| AppIdentityModeUtils.isCharter(FunctionBuildConfig.appIdentityMode)) {
|
||||
mAMap?.addMarker(
|
||||
MarkerOptions()
|
||||
.icon(BitmapDescriptorFactory.fromResource(R.drawable.map_bus_icon))
|
||||
|
||||
@@ -153,6 +153,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) {
|
||||
@@ -223,6 +224,25 @@ class OverMapView @JvmOverloads constructor(
|
||||
siteMarkerList = mAMap!!.addMarkers(markerOptionsList, false)
|
||||
}
|
||||
|
||||
@MainThread
|
||||
fun drawSiteMarkers(
|
||||
siteMarkers: List<SiteMarkerBean>?,
|
||||
) {
|
||||
if (siteMarkers.isNullOrEmpty()) return
|
||||
clearSiteMarkers()
|
||||
val markerOptionsList = ArrayList<MarkerOptions>()
|
||||
for (siteMarkerBean in siteMarkers) {
|
||||
val markerOption = MarkerOptions()
|
||||
markerOption.position(siteMarkerBean.latLng)
|
||||
markerOption.anchor(siteMarkerBean.anchorX, siteMarkerBean.anchorY)
|
||||
markerOption.icon(
|
||||
BitmapDescriptorFactory.fromBitmap(siteMarkerBean.bitmap)
|
||||
)
|
||||
markerOptionsList.add(markerOption)
|
||||
}
|
||||
siteMarkerList = mAMap!!.addMarkers(markerOptionsList, false)
|
||||
}
|
||||
|
||||
@MainThread
|
||||
fun clearSiteMarkers() {
|
||||
if (siteMarkerList != null) {
|
||||
@@ -285,7 +305,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()
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.mogo.eagle.core.function.view
|
||||
|
||||
import android.graphics.Bitmap
|
||||
import com.amap.api.maps.model.LatLng
|
||||
|
||||
data class SiteMarkerBean(var latLng: LatLng, var bitmap: Bitmap, var anchorX: Float, var anchorY: Float)
|
||||
@@ -25,8 +25,8 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/overLayer"
|
||||
android:layout_width="@dimen/dp_116"
|
||||
android:layout_height="@dimen/dp_116"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="centerInside"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user