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
app/src/main/res/layout/activity_tpoi_search.xml
View file @
c6545628
...
...
@@ -58,8 +58,8 @@
android:layout_height=
"match_parent"
>
<com.
sd.
ap
i
.ui.Map
Multi
View
android:id=
"@+id/
m
ap
Multi
View"
<com.
cusc.m
ap.ui.MapView
android:id=
"@+id/
M
apView"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
...
...
app/src/main/res/layout/activity_tpolygon.xml
View file @
c6545628
...
...
@@ -17,8 +17,8 @@
</LinearLayout>
<com.
sd.
ap
i
.ui.Map
Multi
View
android:id=
"@+id/
m
ap
Multi
View"
<com.
cusc.m
ap.ui.MapView
android:id=
"@+id/
M
apView"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
...
...
app/src/main/res/layout/activity_wmts.xml
View file @
c6545628
...
...
@@ -22,8 +22,8 @@
</LinearLayout>
<com.
sd.
ap
i
.ui.Map
Multi
View
android:id=
"@+id/
m
ap
Multi
View"
<com.
cusc.m
ap.ui.MapView
android:id=
"@+id/
M
apView"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
<!-- 小地图-->
...
...
mapapi/src/main/java/com/cusc/map/M
SDKInitializer
.kt
→
mapapi/src/main/java/com/cusc/map/M
apSdkInit
.kt
View file @
c6545628
...
...
@@ -47,7 +47,7 @@ interface OnSdkInitCb {
}
/**SDK初始化类*/
object
M
SDKInitializer
{
object
M
apSdkInit
{
/**SDK初始化成功(失败)回调*/
private
var
onSdkInitCb
:
OnSdkInitCb
?
=
null
...
...
mapapi/src/main/java/com/cusc/map/core/MShowMainCarModel.kt
View file @
c6545628
...
...
@@ -7,7 +7,7 @@ import com.minedata.minenavi.map.ModelOptions
import
com.minedata.minenavi.map.Overlay
import
com.minedata.minenavi.mapdal.LatLng
import
com.cusc.map.MAP_TYPE
import
com.cusc.map.M
SDKInitializer
import
com.cusc.map.M
apSdkInit
import
com.cusc.map.maps.cdata.MSLatLng
import
com.cusc.map.ui.MapReadyView
import
com.cusc.map.utils.SmoothMoveUtils
...
...
@@ -64,7 +64,7 @@ import java.io.IOException
)
{
// mMineMap?.removeOverlay(mainCarMo)
// deleteMyLocMarker()
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
CoroutineScope
(
Dispatchers
.
IO
).
launch
{
loadMainCar
(
context
)
...
...
@@ -104,7 +104,7 @@ import java.io.IOException
lng
:
Double
,
heading
:
Float
)
{
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
if
(
mainCarMo
==
null
)
return
...
...
@@ -131,7 +131,7 @@ import java.io.IOException
to
:
MSLatLng
,
durationMillis
:
Long
=
1000L
)
{
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
SmoothMoveUtils
.
startSmoothMove
(
LatLng
(
from
.
lat
,
from
.
lng
),
...
...
mapapi/src/main/java/com/cusc/map/fragments/AMapFragment.kt
View file @
c6545628
...
...
@@ -9,7 +9,7 @@ import com.amap.api.maps.AMap
import
com.cusc.map.UserCtx
import
com.cusc.map.databinding.FragmentAMapBinding
import
com.cusc.map.ui.MapReadyView
import
com.cusc.map.ui.Map
Multi
View.OnMapReadyLis
import
com.cusc.map.ui.MapView.OnMapReadyLis
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
...
...
mapapi/src/main/java/com/cusc/map/fragments/ForeMapFragment.kt
View file @
c6545628
...
...
@@ -19,7 +19,7 @@ import com.minedata.minenavi.util.Tools
import
com.cusc.map.UserCtx
import
com.cusc.map.databinding.FragmentForeMapBinding
import
com.cusc.map.location.MSLocCb
import
com.cusc.map.ui.Map
Multi
View.OnMapReadyLis
import
com.cusc.map.ui.MapView.OnMapReadyLis
import
com.cusc.map.ui.MapReadyView
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
...
...
mapapi/src/main/java/com/cusc/map/fragments/PartRoadFragment.kt
View file @
c6545628
...
...
@@ -10,7 +10,7 @@ import com.example.car_and_road_3d.CarAndRoadWebViewClient
import
com.cusc.map.databinding.FragmentPartRoadBinding
import
com.cusc.map.parkroad.MsParkRoad
import
com.cusc.map.ui.MapReadyView
import
com.cusc.map.ui.Map
Multi
View.OnMapReadyLis
import
com.cusc.map.ui.MapView.OnMapReadyLis
import
com.cusc.map.vms.CarRoadVM
import
kotlin.getValue
...
...
mapapi/src/main/java/com/cusc/map/fragments/UnityFragment.kt
View file @
c6545628
...
...
@@ -8,7 +8,7 @@ import android.view.ViewGroup
import
android.widget.FrameLayout
import
androidx.fragment.app.Fragment
import
com.cusc.map.UserCtx
import
com.cusc.map.ui.Map
Multi
View.OnMapReadyLis
import
com.cusc.map.ui.MapView.OnMapReadyLis
import
com.cusc.map.ui.MapReadyView
import
com.unity3d.player.IUnityPlayerLifecycleEvents
import
com.unity3d.player.UnityPlayer
...
...
mapapi/src/main/java/com/cusc/map/highmap/HighMap.kt
View file @
c6545628
...
...
@@ -2,7 +2,7 @@ package com.cusc.map.highmap
import
com.google.gson.Gson
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.unity3d.player.UnityPlayer
...
...
@@ -21,7 +21,7 @@ object HighMap :MsOperationParent() {
* @param tileType 1=亦庄示范区
*/
fun
setTileInit
(
tileType
:
Int
)
{
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
if
(!
isLoadUnityPlayer
())
return
...
...
@@ -46,7 +46,7 @@ object HighMap :MsOperationParent() {
lon
:
Double
,
evel
:
Double
,
)
{
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
if
(!
isLoadUnityPlayer
())
return
...
...
@@ -68,7 +68,7 @@ object HighMap :MsOperationParent() {
* @param highPos 车辆位置对象
*/
fun
setCarPosition
(
highPos
:
HighPos
)
{
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
if
(!
isLoadUnityPlayer
())
return
...
...
@@ -86,7 +86,7 @@ object HighMap :MsOperationParent() {
* @param isOn true:显示 false:隐藏
*/
fun
setCarBottomCircle
(
isOn
:
Boolean
)
{
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
var
bottomCircle
=
BottomCircle
(
isOn
)
UnityPlayer
.
UnitySendMessage
(
...
...
@@ -106,7 +106,7 @@ object HighMap :MsOperationParent() {
* 0=关闭 1=左前 2=正前 3=右前 4=右后 5=正后 6=左后
*/
fun
setCarRadarDirection
(
dirent
:
Int
)
{
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
var
radarDirection
=
RadarDirection
(
dirent
)
UnityPlayer
.
UnitySendMessage
(
...
...
@@ -136,7 +136,7 @@ object HighMap :MsOperationParent() {
drawpassed
:
Boolean
=
true
,
showdistance
:
Int
=
45
)
{
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
var
carNavPath
=
CarNavPath
().
apply
{
this
.
lines
=
lines
...
...
@@ -158,7 +158,7 @@ object HighMap :MsOperationParent() {
* @param carNavPath 导航路径选项
*/
fun
setCarNavPath
(
carNavPath
:
CarNavPath
)
{
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
if
(!
isLoadUnityPlayer
())
return
...
...
@@ -176,7 +176,7 @@ object HighMap :MsOperationParent() {
* @param alertType 告警类型 2=红色;3=绿色(绿波);4=(感知车前的红色);5= (拥堵红色、施工红色、人行道红色)alertType=-1 时清空所有警戒线。
*/
fun
setAlertPath
(
alertLine
:
List
<
AlertLine
>,
alertType
:
Int
)
{
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
var
alertPath
=
AlertPath
(
alertLine
,
alertType
)
UnityPlayer
.
UnitySendMessage
(
MODELNAME
,
"SetAlertPath"
,
gson
.
toJson
(
alertPath
))
...
...
@@ -192,7 +192,7 @@ object HighMap :MsOperationParent() {
* @param ptcList 感知物列表
*/
fun
setPtcData
(
ptcList
:
List
<
UnityPtc
>)
{
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
if
(!
isLoadUnityPlayer
())
return
...
...
@@ -212,7 +212,7 @@ object HighMap :MsOperationParent() {
* @param warnPtc 感知物状态列表
*/
fun
setWarnPtc
(
warnPtc
:
List
<
WarnPtc
>)
{
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
if
(!
isLoadUnityPlayer
())
return
...
...
@@ -232,7 +232,7 @@ object HighMap :MsOperationParent() {
* 清空场景中的所有感知物
*/
fun
clearPtcData
()
{
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
UnityPlayer
.
UnitySendMessage
(
MODELNAME
,
"ClearAllPtcData"
,
"{}"
)
}
...
...
@@ -246,7 +246,7 @@ object HighMap :MsOperationParent() {
* 调整主摄像机的俯视角度
*/
fun
setCameraAngle
(
angle
:
Float
=
30f
)
{
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
UnityPlayer
.
UnitySendMessage
(
MODELNAME
,
"SetCameraAngle"
,
"$angle"
)
}
...
...
@@ -262,7 +262,7 @@ object HighMap :MsOperationParent() {
* @param spaceCode 车位编号 当为空时则取消高亮
*/
fun
parkRoundLight
(
spaceCode
:
String
)
{
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
var
parkRoundLight
=
ParkRoundLight
().
apply
{
this
.
spaceCode
=
spaceCode
...
...
@@ -283,7 +283,7 @@ object HighMap :MsOperationParent() {
* 设置车辆停车状态,倒车特效
*/
fun
setParkRever
(
reverCar
:
ReverCar
)
{
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
UnityPlayer
.
UnitySendMessage
(
MODELNAME
,
"SetParking"
,
gson
.
toJson
(
reverCar
))
}
...
...
@@ -297,7 +297,7 @@ object HighMap :MsOperationParent() {
* @param complete true:完成 false:未完成
*/
fun
setParkComplete
(
complete
:
Boolean
)
{
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
var
parkComplete
=
ParkComplete
().
apply
{
this
.
complete
=
complete
...
...
@@ -317,7 +317,7 @@ object HighMap :MsOperationParent() {
/**设置车位停车状态*/
fun
setParkStatu
(
parkStatu
:
ParkStatu
)
{
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
UnityPlayer
.
UnitySendMessage
(
MODELNAME
,
"SetSpaceParkStatu"
,
gson
.
toJson
(
parkStatu
))
}
...
...
@@ -330,7 +330,7 @@ object HighMap :MsOperationParent() {
/**设置地锁动画*/
fun
setLockStatus
(
lockStatu
:
LockStatu
)
{
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
UnityPlayer
.
UnitySendMessage
(
MODELNAME
,
"SetLockStatus"
,
gson
.
toJson
(
lockStatu
))
}
...
...
mapapi/src/main/java/com/cusc/map/location/MSLocation.kt
View file @
c6545628
package
com.cusc.map.location
import
com.cusc.map.MAP_TYPE
import
com.cusc.map.M
SDKInitializer
import
com.cusc.map.M
apSdkInit
import
com.cusc.map.maps.amap.AmapGpsLocation
/**
...
...
@@ -10,7 +10,7 @@ import com.cusc.map.maps.amap.AmapGpsLocation
object
MSLocation
{
fun
initLoc
(){
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
MineGpsLocation
.
initLoc
()
}
...
...
@@ -27,7 +27,7 @@ object MSLocation {
* @param onMsGpsLoc GPS定位回调监听器实例
*/
fun
startLoc
(
onMsGpsLoc
:
OnMsGpsLoc
?){
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
MineGpsLocation
.
starLoc
(
onMsGpsLoc
)
}
...
...
@@ -40,7 +40,7 @@ object MSLocation {
/**停止定位*/
fun
stopLoc
(){
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
MineGpsLocation
.
stopLoc
()
}
...
...
@@ -53,7 +53,7 @@ object MSLocation {
/**清理定位资源**/
fun
cleansLoc
(){
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
MineGpsLocation
.
cleansLoc
()
}
...
...
mapapi/src/main/java/com/cusc/map/maps/DelDrawInMap.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.cdata.MSOverlay
import
com.cusc.map.maps.cdata.MSMarker
...
...
@@ -224,7 +224,7 @@ object DelDrawInMap : MsOperationParent() {
return
var
mapReadView
=
getMapReadView
()
// 根据不同的地图类型执行相应的删除操作
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
// 从自定义地图中移除指定的标记点
mapReadView
?.
mMineMap
?.
removeMarker
(
mSMarker
.
maker
)
...
...
@@ -249,7 +249,7 @@ object DelDrawInMap : MsOperationParent() {
return
var
mapReadView
=
getMapReadView
()
// 根据不同的地图类型删除对应的折线
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
mapReadView
?.
mMineMap
?.
removeOverlay
(
mSOverlay
.
polyline
)
}
...
...
@@ -271,7 +271,7 @@ object DelDrawInMap : MsOperationParent() {
}
var
mapReadView
=
getMapReadView
()
// 根据不同的地图类型执行对应的圆形删除操作
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
mapReadView
?.
mMineMap
?.
removeOverlay
(
mSOverlay
.
circle
)
}
...
...
@@ -292,7 +292,7 @@ object DelDrawInMap : MsOperationParent() {
}
var
mapReadView
=
getMapReadView
()
// 根据不同的地图类型执行对应的删除操作
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
mapReadView
?.
mMineMap
?.
removeOverlay
(
mSOverlay
.
polygon
)
}
...
...
mapapi/src/main/java/com/cusc/map/maps/DrawInMap.kt
View file @
c6545628
...
...
@@ -2,7 +2,7 @@ package com.cusc.map.maps
import
androidx.core.graphics.toColorInt
import
com.cusc.map.MAP_TYPE
import
com.cusc.map.M
SDKInitializer
import
com.cusc.map.M
apSdkInit
import
com.cusc.map.maps.amap.AmapDrawInMap
import
com.cusc.map.maps.cdata.MSLatLng
import
com.cusc.map.maps.cdata.MSMarker
...
...
@@ -72,7 +72,7 @@ object DrawInMap : MsOperationParent() {
lng
:
Double
):
MSMarker
{
val
mapReadView
=
getMapReadView
()
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
return
MineDrawInMap
.
drawMarket
(
mapReadView
,
lat
,
lng
)
}
...
...
@@ -93,7 +93,7 @@ object DrawInMap : MsOperationParent() {
msLatLng
:
List
<
MSLatLng
>,
msPolylineOptions
:
MsPolylineOptions
):
MSOverlay
{
val
mapReadView
=
getMapReadView
()
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
return
MineDrawInMap
.
drawPolyline
(
mapReadView
,
...
...
@@ -119,7 +119,7 @@ object DrawInMap : MsOperationParent() {
msCircleOptions
:
MsCircleOptions
?
):
MSOverlay
{
val
mapReadView
=
getMapReadView
()
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
return
MineDrawInMap
.
drawCircle
(
mapReadView
,
center
,
...
...
@@ -147,7 +147,7 @@ object DrawInMap : MsOperationParent() {
msPolygonOptions
:
MsPolygonOptions
):
MSOverlay
{
val
mapReadView
=
getMapReadView
()
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
return
MineDrawInMap
.
drawPolygon
(
mapReadView
,
...
...
mapapi/src/main/java/com/cusc/map/maps/Gestures.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.AmapGestures
import
com.cusc.map.maps.mine.MineGestures
...
...
@@ -17,7 +17,7 @@ object Gestures : MsOperationParent() {
*/
fun
setRotateGesturesEnabled
(
enable
:
Boolean
){
var
mapReadView
=
getMapReadView
()
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
MineGestures
.
setRotateGesturesEnabled
(
mapReadView
,
enable
)
}
...
...
@@ -36,7 +36,7 @@ object Gestures : MsOperationParent() {
* */
fun
setTiltGesturesEnabled
(
enable
:
Boolean
){
var
mapReadView
=
getMapReadView
()
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
MineGestures
.
setTiltGesturesEnabled
(
mapReadView
,
enable
)
}
...
...
mapapi/src/main/java/com/cusc/map/maps/LocStyle.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.ui.MapReadyView
import
com.cusc.map.maps.amap.AmapLocationStyle
import
com.cusc.map.maps.mine.MineLocationStyle
...
...
@@ -22,7 +22,7 @@ object LocStyle {
mapReadView
:
MapReadyView
?,
type
:
Int
=
MSLocStyle
.
LOCATION_TYPE_LOCATION_ROTATE
){
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
MineLocationStyle
.
setLocationStyle
(
mapReadView
,
type
)
}
...
...
mapapi/src/main/java/com/cusc/map/maps/MSCalcuMapUtil.kt
View file @
c6545628
...
...
@@ -4,7 +4,7 @@ import android.location.Location
import
com.amap.api.maps.AMapUtils
import
com.amap.api.maps.model.LatLng
import
com.cusc.map.MAP_TYPE
import
com.cusc.map.M
SDKInitializer
import
com.cusc.map.M
apSdkInit
import
com.cusc.map.maps.cdata.MSLatLng
import
kotlin.math.atan2
import
kotlin.math.cos
...
...
@@ -26,7 +26,7 @@ object MSCalcuMapUtil {
latLng2
:
MSLatLng
):
Float
{
// 根据不同的地图类型选择相应的距离计算方法
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
// 使用Android原生Location类计算两点间距离
var
results
=
FloatArray
(
1
)
...
...
@@ -62,7 +62,7 @@ object MSCalcuMapUtil {
latLng2
:
MSLatLng
):
Float
{
// 根据不同地图类型进行面积计算
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
return
0f
}
...
...
mapapi/src/main/java/com/cusc/map/maps/MSLayer.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.AmapLayers
import
com.cusc.map.maps.mine.MineLayers
...
...
@@ -17,7 +17,7 @@ object MSLayer : MsOperationParent() {
*/
fun
toggleLayers
(
type
:
Int
)
{
var
mapReadView
=
getMapReadView
()
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
MineLayers
.
toggleLayers
(
mapReadView
,
type
)
}
...
...
mapapi/src/main/java/com/cusc/map/maps/MSNavi.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.DriverRouteBean
import
com.cusc.map.bean.WayPoi
import
com.cusc.map.intfaces.OnNaviPresenterListener
...
...
@@ -18,7 +18,7 @@ object MSNavi {
var
isStartNai
=
false
fun
init
()
{
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
MineNai
.
init
()
}
...
...
@@ -49,7 +49,7 @@ object MSNavi {
onNaviPresenterListener
:
OnNaviPresenterListener
?
)
{
isStartNai
=
true
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
if
(
nType
==
1
)
{
MineNai
.
startNavi
(
mapReadView
,
onNaviPresenterListener
)
...
...
@@ -71,7 +71,7 @@ object MSNavi {
/**结束导航(模拟导航)**/
fun
endNavi
()
{
isStartNai
=
false
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
MineNai
.
stopNavi
()
}
...
...
@@ -90,7 +90,7 @@ object MSNavi {
onNaviPresenterListener
:
OnNaviPresenterListener
?
)
{
isStartNai
=
true
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
MineNai
.
startSimNavi
(
mapReadView
,
...
...
@@ -107,7 +107,7 @@ object MSNavi {
}
fun
addNaviListener
(
listener
:
OnNaviPresenterListener
)
{
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
MineNai
.
addNaviListener
(
listener
)
}
...
...
mapapi/src/main/java/com/cusc/map/maps/MSPoi.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.AmapPoiSearch
import
com.cusc.map.maps.inters.OnMSPoiSearchLis
import
com.cusc.map.maps.mine.MinePoiSearch
...
...
@@ -25,7 +25,7 @@ object MSPoi {
adCode
:
String
,
onMSPoiSearchLis
:
OnMSPoiSearchLis
){
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
MinePoiSearch
.
startPoiSearch
(
keyWord
,
lat
,
lng
,
adCode
,
onMSPoiSearchLis
)
}
...
...
@@ -51,7 +51,7 @@ object MSPoi {
radios
:
Int
,
onMSPoiSearchLis
:
OnMSPoiSearchLis
){
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
MinePoiSearch
.
startPoiSearchBound
(
keyWord
,
lat
,
lng
,
radios
,
onMSPoiSearchLis
)
}
...
...
mapapi/src/main/java/com/cusc/map/maps/MSRegeoCode.kt
View file @
c6545628
...
...
@@ -7,7 +7,7 @@ import com.minedata.minenavi.poiquery.LatLonPoint
import
com.minedata.minenavi.poiquery.RegeocodeQuery
import
com.minedata.minenavi.poiquery.RegeocodeResult
import
com.cusc.map.MAP_TYPE
import
com.cusc.map.M
SDKInitializer
import
com.cusc.map.M
apSdkInit
import
com.cusc.map.UserCtx
import
com.cusc.map.maps.cdata.RegeocodeRes
import
com.amap.api.services.geocoder.GeocodeSearch
as
AGeocodeSearch
...
...
@@ -37,7 +37,7 @@ object MSRegeoCode : GeocodeSearch.OnGeocodeSearchListener, AGeocodeSearch.OnGeo
return
this
.
mSOnRegeo
=
msOnRegeo
var
context
=
UserCtx
.
Companion
.
instance
.
mContext
when
(
M
SDKInitializer
.
getMapType
())
{
when
(
M
apSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
val
geocoderSearch
=
GeocodeSearch
(
context
)
geocoderSearch
.
addOnGeocodeSearchListener
(
this
)
...
...
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