[6.2.4] fix bug of sound play helper , devices extends lenovo , npl of map init

This commit is contained in:
zhongchao
2023-12-18 12:01:23 +08:00
parent e60d0bfe38
commit 2d7d9ea25a
7 changed files with 44 additions and 12 deletions

View File

@@ -28,7 +28,7 @@ internal class MoGoOverlayManagerImpl: IMoGoOverlayManager {
point.setOptions(options)
return key
} else {
val p = mapInstance.getMogoMap(mapTag).addPoint(options)
val p = mapInstance.getMogoMap(mapTag)?.addPoint(options)
if (p != null) {
p.onRemove { removed ->
val keys = points.filterKeys { it.id == removed }
@@ -232,7 +232,7 @@ internal class MoGoOverlayManagerImpl: IMoGoOverlayManager {
line.setOptions(options)
return key
} else {
val newLine = mapInstance.getMogoMap(mapTag).addLine(options)
val newLine = mapInstance.getMogoMap(mapTag)?.addLine(options)
if (newLine != null) {
newLine.onRemove { removed ->
val keys = lines.filterKeys { it.id == removed }
@@ -259,7 +259,7 @@ internal class MoGoOverlayManagerImpl: IMoGoOverlayManager {
private fun moveToCenter(mapTag:String, id: String, eventLon: Double, eventLat: Double, carLon: Double, carLat: Double) {
try {
mapInstance.getMogoMap(mapTag).uiController?.showBounds(
mapInstance.getMogoMap(mapTag)?.uiController?.showBounds(
id,
MogoLatLng(carLat, carLon),
listOf(MogoLatLng(eventLat, eventLon)),