Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
p x
MapMultiEngine
Commits
c6545628
Commit
c6545628
authored
Dec 30, 2025
by
p x
Browse files
修改底图命名
parent
e2946046
Changes
70
Show whitespace changes
Inline
Side-by-side
mapapi/src/main/java/com/cusc/map/maps/MSRoutePlans.kt
View file @
c6545628
package
com.cusc.map.maps
import
com.cusc.map.MAP_TYPE
import
com.cusc.map.M
SDKInitializer
import
com.cusc.map.M
apSdkInit
import
com.cusc.map.bean.WayPoi
import
com.cusc.map.maps.amap.AmapRoutePlans
import
com.cusc.map.maps.cdata.MSLatLng
...
...
@@ -30,7 +30,7 @@ object MSRoutePlans : MsOperationParent() {
onDriveRoute
:
OnDriveRoute
?
)
{
var
mapReadView
=
getMapReadView
()
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
MineRoutePlans
.
drivingPathPlanning
(
starPoint
,
...
...
mapapi/src/main/java/com/cusc/map/maps/MethodAdv.kt
View file @
c6545628
package
com.cusc.map.maps
import
com.cusc.map.MAP_TYPE
import
com.cusc.map.M
SDKInitializer
import
com.cusc.map.M
apSdkInit
import
com.cusc.map.maps.amap.AmapMethodAdv
import
com.cusc.map.maps.mine.MineMethodAdv
...
...
@@ -26,7 +26,7 @@ object MethodAdv : MsOperationParent() {
return
}
var
mapReadView
=
getMapReadView
()
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
MineMethodAdv
.
setMapCenter
(
mapReadView
,
lat
,
lng
)
}
...
...
@@ -45,7 +45,7 @@ object MethodAdv : MsOperationParent() {
* */
fun
setMapZoom
(
zoom
:
Float
=
11f
)
{
var
mapReadView
=
getMapReadView
()
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
MineMethodAdv
.
setMapZoom
(
mapReadView
,
zoom
)
}
...
...
mapapi/src/main/java/com/cusc/map/maps/WmsLayer.kt
View file @
c6545628
...
...
@@ -3,7 +3,7 @@ package com.cusc.map.maps
import
com.amap.api.maps.model.TileOverlay
import
com.amap.api.maps.model.TileOverlayOptions
import
com.cusc.map.MAP_TYPE
import
com.cusc.map.M
SDKInitializer
import
com.cusc.map.M
apSdkInit
import
com.cusc.map.maps.amap.HeritageScopeTileProvider
/**
...
...
@@ -19,7 +19,7 @@ object WmsLayer : MsOperationParent() {
*/
fun
loadWmsLayer
(
url
:
String
)
{
var
mapReadView
=
getMapReadView
()
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
}
...
...
@@ -35,7 +35,7 @@ object WmsLayer : MsOperationParent() {
/**删除wms图层***/
fun
removeWmsLayer
()
{
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
}
...
...
mapapi/src/main/java/com/cusc/map/parkroad/MsParkRoad.kt
View file @
c6545628
...
...
@@ -6,7 +6,7 @@ import com.example.car_and_road_3d.models.EarlyMarker
import
com.example.car_and_road_3d.models.Participant
import
com.example.car_and_road_3d.models.Position
import
com.cusc.map.MAP_TYPE
import
com.cusc.map.M
SDKInitializer
import
com.cusc.map.M
apSdkInit
import
com.cusc.map.maps.MsOperationParent
import
com.cusc.map.ui.MapReadyView
import
com.cusc.map.vms.CarRoadVM
...
...
@@ -25,7 +25,7 @@ object MsParkRoad : MsOperationParent() {
fun
setCarRoadVM
(
mapReadyView
:
MapReadyView
?)
{
if
(
mapReadyView
==
null
)
return
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
carRoadVM
=
mapReadyView
.
carRoadVM
}
...
...
@@ -55,7 +55,7 @@ object MsParkRoad : MsOperationParent() {
* @param onPrAddCar 回调
*/
fun
updateMainCar
(
roadPos
:
RoadPos
,
onPrAddCar
:
OnPrAddCar
?)
{
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
carRoadVM
?.
updateMainCar
(
roadPos
,
onPrAddCar
)
}
...
...
@@ -70,7 +70,7 @@ object MsParkRoad : MsOperationParent() {
*@param circle true:显示底部光圈 false:不显示底部光圈
*/
fun
showWarningCircle
(
circle
:
Boolean
)
{
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
carRoadVM
?.
webViewClient
?.
showWarningCircle
(
circle
)
{}
}
...
...
@@ -84,7 +84,7 @@ object MsParkRoad : MsOperationParent() {
* @param distance
*/
fun
setDistanceVisible
(
distance
:
Double
)
{
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
carRoadVM
?.
webViewClient
?.
setDistanceVisible
(
distance
)
{}
}
...
...
@@ -98,7 +98,7 @@ object MsParkRoad : MsOperationParent() {
* @param camera 0、25、45、75、90度
*/
fun
setCameraPosition
(
camera
:
Double
)
{
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
carRoadVM
?.
webViewClient
?.
setCameraPosition
(
camera
)
{}
}
...
...
@@ -110,7 +110,7 @@ object MsParkRoad : MsOperationParent() {
/**显示人行道*/
fun
showWalkLine
(
showWalk
:
Boolean
)
{
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
carRoadVM
?.
webViewClient
?.
showWalkLine
(
showWalk
)
{
}
}
...
...
@@ -124,7 +124,7 @@ object MsParkRoad : MsOperationParent() {
* @param marker 1:结冰 2:施工 3:交叉路口慢行
* */
fun
showMarker
(
marker
:
Int
)
{
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
if
(
marker
==
-
1
)
{
carRoadVM
?.
webViewClient
?.
showEarlyMarker
(
EarlyMarker
.
NONE
)
{}
...
...
@@ -147,7 +147,7 @@ object MsParkRoad : MsOperationParent() {
/**开启雷达*/
fun
toggleRadar
(
radar
:
Boolean
)
{
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
carRoadVM
?.
webViewClient
?.
showRadar
(
radar
)
{}
}
...
...
@@ -164,7 +164,7 @@ object MsParkRoad : MsOperationParent() {
* @param time 动画持续时间
*/
fun
warnAlerm
(
ptcId
:
String
,
isRed
:
Boolean
,
time
:
Int
)
{
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
var
alarm
=
Alarm
(
ptcId
,
isRed
,
time
)
carRoadVM
?.
webViewClient
?.
setAlarms
(
listOf
(
alarm
),
null
)
...
...
@@ -178,7 +178,7 @@ object MsParkRoad : MsOperationParent() {
* 预警特效批量
*/
fun
warnAlerms
(
alarms
:
List
<
Alarm
>)
{
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
carRoadVM
?.
webViewClient
?.
setAlarms
(
alarms
,
null
)
}
...
...
@@ -190,7 +190,7 @@ object MsParkRoad : MsOperationParent() {
/**更新参与者***/
fun
upDatePreTarget
(
prelist
:
List
<
PtcBean
>)
{
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
if
(
prelist
.
count
()
==
0
)
{
carRoadVM
?.
webViewClient
?.
clearAllTargets
(
null
)
...
...
@@ -220,7 +220,7 @@ object MsParkRoad : MsOperationParent() {
/**清除所有参与者***/
fun
clearAllTargets
()
{
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
carRoadVM
?.
webViewClient
?.
clearAllTargets
(
null
)
}
...
...
@@ -234,7 +234,7 @@ object MsParkRoad : MsOperationParent() {
* @param fileName 模型文件路径 glb格式
*/
fun
preloadMainCar
(
assets
:
AssetManager
,
fileName
:
String
)
{
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
carRoadVM
?.
webViewClient
?.
preloadMainCar
(
assets
.
open
(
fileName
))
{
v
:
Boolean
->
// println("-------preloadMainCar = ${v}")
...
...
@@ -251,7 +251,7 @@ object MsParkRoad : MsOperationParent() {
* @param fileName 模型文件路径 glb格式
*/
fun
preloadParticipant
(
assets
:
AssetManager
,
fileName
:
String
,
ptcType
:
PartType
)
{
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
if
(
ptcType
==
PartType
.
CAR
)
{
carRoadVM
?.
webViewClient
?.
preloadParticipant
(
...
...
mapapi/src/main/java/com/cusc/map/scenario/CucsVehicle.kt
View file @
c6545628
package
com.cusc.map.scenario
import
com.cusc.map.MAP_TYPE
import
com.cusc.map.M
SDKInitializer
import
com.cusc.map.M
apSdkInit
import
com.cusc.map.highmap.CarNavPath
import
com.cusc.map.highmap.HighMap
import
com.cusc.map.scenario.bean.VehiclePos
...
...
@@ -23,7 +23,7 @@ object CucsVehicle {
fun
moveCar
(
vPos
:
VehiclePos
,
moveType
:
Int
)
{
if
(
stopCar
)
return
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
MineVehMove
.
mineCarMove
(
vPos
,
moveType
)
}
...
...
@@ -37,7 +37,7 @@ object CucsVehicle {
/**停止车辆移动*/
fun
stopCar
()
{
stopCar
=
true
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
}
...
...
@@ -50,7 +50,7 @@ object CucsVehicle {
/**恢复车辆移动*/
fun
resumeCarMove
()
{
stopCar
=
false
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
MineVehicleModel
.
loadAddCar
=
false
}
...
...
@@ -63,7 +63,7 @@ object CucsVehicle {
/**删除在线地图车辆***/
fun
deleteCarModel
()
{
stopCar
=
true
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
VehicleModel
.
deleteMyLocModel
()
// stopCar = false
...
...
mapapi/src/main/java/com/cusc/map/scenario/PerceptionManager.kt
View file @
c6545628
package
com.cusc.map.scenario
import
com.cusc.map.MAP_TYPE
import
com.cusc.map.M
SDKInitializer
import
com.cusc.map.M
apSdkInit
import
com.cusc.map.highmap.HighMap
import
com.cusc.map.highmap.UnityPtc
import
com.cusc.map.parkroad.MsParkRoad
...
...
@@ -16,7 +16,7 @@ object PerceptionManager {
* @param upSoap(更新范围) 1:更新局部图感知物 2:更新高精图感知物 3:包含两者
*/
fun
upPerception
(
percepts
:
List
<
Percept
>,
upSoap
:
Int
)
{
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
if
(
upSoap
==
1
)
{
refreshParkPerception
(
percepts
)
...
...
@@ -64,7 +64,7 @@ object PerceptionManager {
/***清除所有感知物**/
fun
clearAllPerception
()
{
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
MsParkRoad
.
clearAllTargets
()
HighMap
.
setPtcData
(
emptyList
())
...
...
mapapi/src/main/java/com/cusc/map/scenario/VehicleModel.kt
View file @
c6545628
package
com.cusc.map.scenario
import
com.cusc.map.MAP_TYPE
import
com.cusc.map.M
SDKInitializer
import
com.cusc.map.M
apSdkInit
import
com.cusc.map.scenario.mine.MineVehicleModel
/**网联车模型(在线地图)**/
...
...
@@ -13,7 +13,7 @@ internal object VehicleModel {
lng
:
Double
,
heading
:
Float
)
{
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
MineVehicleModel
.
upMyLocCarModel
(
lat
,
lng
,
heading
)
}
...
...
@@ -25,7 +25,7 @@ internal object VehicleModel {
//删除互联网地图上的车模型
fun
deleteMyLocModel
()
{
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
MineVehicleModel
.
deleteMyLocModel
()
}
...
...
mapapi/src/main/java/com/cusc/map/ui/Map
Multi
View.kt
→
mapapi/src/main/java/com/cusc/map/ui/MapView.kt
View file @
c6545628
...
...
@@ -7,7 +7,7 @@ import android.widget.LinearLayout
import
androidx.core.content.withStyledAttributes
import
androidx.fragment.app.FragmentActivity
import
com.cusc.map.MAP_TYPE
import
com.cusc.map.M
SDKInitializer
import
com.cusc.map.M
apSdkInit
import
com.cusc.map.R
import
com.cusc.map.databinding.MultiViewBinding
import
com.cusc.map.fragments.AMapFragment
...
...
@@ -15,8 +15,8 @@ import com.cusc.map.fragments.ForeMapFragment
import
com.cusc.map.fragments.PartRoadFragment
import
com.cusc.map.fragments.UnityFragment
/**
多
底图容器**/
class
Map
Multi
View
:
LinearLayout
{
/**底图容器**/
class
MapView
:
LinearLayout
{
constructor
(
context
:
Context
?)
:
super
(
context
)
{
init
(
null
,
0
)
...
...
@@ -66,7 +66,7 @@ class MapMultiView : LinearLayout {
childType
=
getInt
(
R
.
styleable
.
MapMultiView_map_child_type
,
-
1
)
}
}
mapType
=
M
SDKInitializer
.
getMapType
().
ordinal
mapType
=
M
apSdkInit
.
getMapType
().
ordinal
// println("------------MapMultiView = ${MSDKInitializer.getMapType().ordinal}")
// println("------------enmuValue = $enmuValue")
binding
=
MultiViewBinding
.
inflate
(
LayoutInflater
.
from
(
context
))
...
...
mapapi/src/main/java/com/cusc/map/ui/MineNaiDirActivity.kt
View file @
c6545628
...
...
@@ -21,7 +21,6 @@ import com.minedata.minenavi.util.MineNaviUtil
import
com.minedata.minenavi.util.Tools
import
com.cusc.map.R
import
com.cusc.map.bean.DriverRouteBean
import
com.cusc.map.databinding.MyNaviViewBinding
import
com.cusc.map.maps.inters.OnDriveRoute
import
com.cusc.map.maps.mine.MineNai
import
com.cusc.map.maps.mine.MineNaiParams
...
...
@@ -33,7 +32,7 @@ import com.cusc.map.location.MSLocation
import
com.cusc.map.location.OnMsGpsLoc
import
com.cusc.map.maps.MSNavi
import
com.cusc.map.maps.MSRoutePlans
import
com.cusc.map.ui.Map
Multi
View.OnMapReadyLis
import
com.cusc.map.ui.MapView.OnMapReadyLis
import
com.cusc.map.ui.dialog.ExitNaiDialog
import
com.cusc.map.utils.Utils
...
...
mapapi/src/main/res/layout/activity_mine_nai_dir.xml
View file @
c6545628
...
...
@@ -8,7 +8,7 @@
tools:context=
".ui.MineNaiDirActivity"
>
<com.cusc.map.ui.Map
Multi
View
<com.cusc.map.ui.MapView
android:id=
"@+id/mapMultiView"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
...
...
Prev
1
2
3
4
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment