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
c0a4d214
Commit
c0a4d214
authored
Dec 30, 2025
by
p x
Browse files
修改类名让人好懂
parent
c6545628
Changes
42
Show whitespace changes
Inline
Side-by-side
mapapi/src/main/java/com/cusc/map/maps/
MS
Layer.kt
→
mapapi/src/main/java/com/cusc/map/maps/Layer
Opt
.kt
View file @
c0a4d214
...
@@ -8,7 +8,7 @@ import com.cusc.map.maps.mine.MineLayers
...
@@ -8,7 +8,7 @@ import com.cusc.map.maps.mine.MineLayers
/**
/**
* 图层操作
* 图层操作
*/
*/
object
MS
Layer
:
MsOperationParent
()
{
object
Layer
Opt
:
MsOperationParent
()
{
/**
/**
* 切换地图图层
* 切换地图图层
...
...
mapapi/src/main/java/com/cusc/map/maps/LocStyle.kt
View file @
c0a4d214
...
@@ -20,7 +20,7 @@ object LocStyle {
...
@@ -20,7 +20,7 @@ object LocStyle {
*/
*/
fun
setLocationStyle
(
fun
setLocationStyle
(
mapReadView
:
MapReadyView
?,
mapReadView
:
MapReadyView
?,
type
:
Int
=
MS
LocStyle
.
LOCATION_TYPE_LOCATION_ROTATE
type
:
Int
=
LocStyle
Constant
.
LOCATION_TYPE_LOCATION_ROTATE
){
){
when
(
MapSdkInit
.
getMapType
())
{
when
(
MapSdkInit
.
getMapType
())
{
MAP_TYPE
.
MINE
->
{
MAP_TYPE
.
MINE
->
{
...
...
mapapi/src/main/java/com/cusc/map/maps/
MS
LocStyle.kt
→
mapapi/src/main/java/com/cusc/map/maps/LocStyle
Constant
.kt
View file @
c0a4d214
...
@@ -3,7 +3,7 @@ package com.cusc.map.maps
...
@@ -3,7 +3,7 @@ package com.cusc.map.maps
/**
/**
* 定位蓝点常量
* 定位蓝点常量
*/
*/
object
MS
LocStyle
{
object
LocStyle
Constant
{
/**定位一次,且将视角移动到地图中心点**/
/**定位一次,且将视角移动到地图中心点**/
const
val
LOCATION_TYPE_LOCATE
:
Int
=
2
const
val
LOCATION_TYPE_LOCATE
:
Int
=
2
...
...
mapapi/src/main/java/com/cusc/map/maps/
MS
Navi.kt
→
mapapi/src/main/java/com/cusc/map/maps/Navi
gate
.kt
View file @
c0a4d214
...
@@ -6,14 +6,14 @@ import com.cusc.map.bean.DriverRouteBean
...
@@ -6,14 +6,14 @@ import com.cusc.map.bean.DriverRouteBean
import
com.cusc.map.bean.WayPoi
import
com.cusc.map.bean.WayPoi
import
com.cusc.map.intfaces.OnNaviPresenterListener
import
com.cusc.map.intfaces.OnNaviPresenterListener
import
com.cusc.map.maps.amap.AmapNai
import
com.cusc.map.maps.amap.AmapNai
import
com.cusc.map.maps.cdata.
MS
LatLng
import
com.cusc.map.maps.cdata.LatLng
M
import
com.cusc.map.maps.mine.MineNai
import
com.cusc.map.maps.mine.MineNai
import
com.cusc.map.ui.MapReadyView
import
com.cusc.map.ui.MapReadyView
/**
/**
* 导航相关
* 导航相关
*/
*/
object
MS
Navi
{
object
Navi
gate
{
/**是否开启导航**/
/**是否开启导航**/
var
isStartNai
=
false
var
isStartNai
=
false
...
@@ -41,9 +41,9 @@ object MSNavi {
...
@@ -41,9 +41,9 @@ object MSNavi {
fun
startNavi
(
fun
startNavi
(
mapReadView
:
MapReadyView
?,
mapReadView
:
MapReadyView
?,
nType
:
Int
,
nType
:
Int
,
starPoint
:
MS
LatLng
,
starPoint
:
LatLng
M
,
startName
:
String
,
startName
:
String
,
endPoint
:
MS
LatLng
,
endPoint
:
LatLng
M
,
endName
:
String
,
endName
:
String
,
ways
:
List
<
WayPoi
>,
ways
:
List
<
WayPoi
>,
onNaviPresenterListener
:
OnNaviPresenterListener
?
onNaviPresenterListener
:
OnNaviPresenterListener
?
...
@@ -85,7 +85,7 @@ object MSNavi {
...
@@ -85,7 +85,7 @@ object MSNavi {
fun
startSimNavi
(
fun
startSimNavi
(
mapReadView
:
MapReadyView
?,
mapReadView
:
MapReadyView
?,
starPoint
:
MS
LatLng
,
starPoint
:
LatLng
M
,
driverRouteBean
:
DriverRouteBean
?,
driverRouteBean
:
DriverRouteBean
?,
onNaviPresenterListener
:
OnNaviPresenterListener
?
onNaviPresenterListener
:
OnNaviPresenterListener
?
)
{
)
{
...
...
mapapi/src/main/java/com/cusc/map/maps/
MSRoutePlans
.kt
→
mapapi/src/main/java/com/cusc/map/maps/
PathPlanning
.kt
View file @
c0a4d214
...
@@ -4,13 +4,13 @@ import com.cusc.map.MAP_TYPE
...
@@ -4,13 +4,13 @@ import com.cusc.map.MAP_TYPE
import
com.cusc.map.MapSdkInit
import
com.cusc.map.MapSdkInit
import
com.cusc.map.bean.WayPoi
import
com.cusc.map.bean.WayPoi
import
com.cusc.map.maps.amap.AmapRoutePlans
import
com.cusc.map.maps.amap.AmapRoutePlans
import
com.cusc.map.maps.cdata.
MS
LatLng
import
com.cusc.map.maps.cdata.LatLng
M
import
com.cusc.map.maps.inters.OnDriveRoute
import
com.cusc.map.maps.inters.OnDriveRoute
import
com.cusc.map.maps.mine.MineRoutePlans
import
com.cusc.map.maps.mine.MineRoutePlans
/**路劲规划 **/
/**路劲规划 **/
object
MSRoutePlans
:
MsOperationParent
()
{
object
PathPlanning
:
MsOperationParent
()
{
/**驾车路径规划
/**驾车路径规划
* @param starPoint 起点坐标
* @param starPoint 起点坐标
...
@@ -22,9 +22,9 @@ object MSRoutePlans : MsOperationParent() {
...
@@ -22,9 +22,9 @@ object MSRoutePlans : MsOperationParent() {
* @param onDriveRoute 路径规划结果回调
* @param onDriveRoute 路径规划结果回调
*/
*/
fun
drivingPathPlanning
(
fun
drivingPathPlanning
(
starPoint
:
MS
LatLng
,
starPoint
:
LatLng
M
,
startName
:
String
=
"当前位置"
,
startName
:
String
=
"当前位置"
,
endPoint
:
MS
LatLng
,
endPoint
:
LatLng
M
,
endName
:
String
=
""
,
endName
:
String
=
""
,
ways
:
List
<
WayPoi
>,
ways
:
List
<
WayPoi
>,
onDriveRoute
:
OnDriveRoute
?
onDriveRoute
:
OnDriveRoute
?
...
...
mapapi/src/main/java/com/cusc/map/maps/
MS
Poi.kt
→
mapapi/src/main/java/com/cusc/map/maps/Poi
Search
.kt
View file @
c0a4d214
...
@@ -9,7 +9,7 @@ import com.cusc.map.maps.mine.MinePoiSearch
...
@@ -9,7 +9,7 @@ import com.cusc.map.maps.mine.MinePoiSearch
/**
/**
* poi 搜索
* poi 搜索
*/
*/
object
MS
Poi
{
object
Poi
Search
{
/**关键字搜索
/**关键字搜索
* @param keyWord 关键字
* @param keyWord 关键字
...
...
mapapi/src/main/java/com/cusc/map/maps/
MS
Re
g
eo
Code
.kt
→
mapapi/src/main/java/com/cusc/map/maps/Re
G
eo
graphy
.kt
View file @
c0a4d214
...
@@ -14,7 +14,7 @@ import com.amap.api.services.geocoder.GeocodeSearch as AGeocodeSearch
...
@@ -14,7 +14,7 @@ import com.amap.api.services.geocoder.GeocodeSearch as AGeocodeSearch
import
com.amap.api.services.geocoder.GeocodeResult
as
AGeocodeResult
import
com.amap.api.services.geocoder.GeocodeResult
as
AGeocodeResult
/**逆地理编码*/
/**逆地理编码*/
object
MS
Re
g
eo
Code
:
GeocodeSearch
.
OnGeocodeSearchListener
,
AGeocodeSearch
.
OnGeocodeSearchListener
{
object
Re
G
eo
graphy
:
GeocodeSearch
.
OnGeocodeSearchListener
,
AGeocodeSearch
.
OnGeocodeSearchListener
{
private
var
mSOnRegeo
:
OnMsRegeo
?
=
null
private
var
mSOnRegeo
:
OnMsRegeo
?
=
null
...
...
mapapi/src/main/java/com/cusc/map/maps/amap/AmapDrawInMap.kt
View file @
c0a4d214
...
@@ -13,10 +13,10 @@ import com.cusc.map.UserCtx
...
@@ -13,10 +13,10 @@ import com.cusc.map.UserCtx
import
com.cusc.map.maps.MsCircleOptions
import
com.cusc.map.maps.MsCircleOptions
import
com.cusc.map.maps.MsPolygonOptions
import
com.cusc.map.maps.MsPolygonOptions
import
com.cusc.map.maps.MsPolylineOptions
import
com.cusc.map.maps.MsPolylineOptions
import
com.cusc.map.maps.cdata.
MS
LatLng
import
com.cusc.map.maps.cdata.LatLng
M
import
com.cusc.map.ui.MapReadyView
import
com.cusc.map.ui.MapReadyView
import
com.cusc.map.maps.cdata.M
S
Overlay
import
com.cusc.map.maps.cdata.M
ap
Overlay
import
com.cusc.map.maps.cdata.
MS
Marker
import
com.cusc.map.maps.cdata.Marker
M
/**
/**
* 在地图上绘制
* 在地图上绘制
...
@@ -35,7 +35,7 @@ object AmapDrawInMap {
...
@@ -35,7 +35,7 @@ object AmapDrawInMap {
mapReadView
:
MapReadyView
?,
mapReadView
:
MapReadyView
?,
lat
:
Double
,
lat
:
Double
,
lng
:
Double
lng
:
Double
):
MS
Marker
{
):
Marker
M
{
var
context
=
UserCtx
.
Companion
.
instance
.
mContext
var
context
=
UserCtx
.
Companion
.
instance
.
mContext
// 处理高德地图类型的标记点绘制
// 处理高德地图类型的标记点绘制
...
@@ -50,8 +50,8 @@ object AmapDrawInMap {
...
@@ -50,8 +50,8 @@ object AmapDrawInMap {
)
)
}
}
var
aMaker
=
mapReadView
?.
aMap
?.
addMarker
(
aMarkerOption
)
var
aMaker
=
mapReadView
?.
aMap
?.
addMarker
(
aMarkerOption
)
MS
Marker
.
amaker
=
aMaker
Marker
M
.
amaker
=
aMaker
return
MS
Marker
return
Marker
M
}
}
...
@@ -64,9 +64,9 @@ object AmapDrawInMap {
...
@@ -64,9 +64,9 @@ object AmapDrawInMap {
*/
*/
fun
drawPolyline
(
fun
drawPolyline
(
mapReadView
:
MapReadyView
?,
mapReadView
:
MapReadyView
?,
msLatLng
:
List
<
MS
LatLng
>,
msLatLng
:
List
<
LatLng
M
>,
msPolylineOptions
:
MsPolylineOptions
msPolylineOptions
:
MsPolylineOptions
):
M
S
Overlay
{
):
M
ap
Overlay
{
// 绘制高德地图的线
// 绘制高德地图的线
var
latLngs
=
msLatLng
.
map
{
var
latLngs
=
msLatLng
.
map
{
LatLng
(
it
.
lat
,
it
.
lng
)
LatLng
(
it
.
lat
,
it
.
lng
)
...
@@ -76,8 +76,8 @@ object AmapDrawInMap {
...
@@ -76,8 +76,8 @@ object AmapDrawInMap {
.
color
(
msPolylineOptions
.
fcolor
)
.
color
(
msPolylineOptions
.
fcolor
)
.
setDottedLine
(
msPolylineOptions
.
isDotted
)
.
setDottedLine
(
msPolylineOptions
.
isDotted
)
var
polyline
=
mapReadView
?.
aMap
?.
addPolyline
(
aOption
)
var
polyline
=
mapReadView
?.
aMap
?.
addPolyline
(
aOption
)
M
S
Overlay
.
aPolyline
=
polyline
M
ap
Overlay
.
aPolyline
=
polyline
return
M
S
Overlay
return
M
ap
Overlay
}
}
...
@@ -89,9 +89,9 @@ object AmapDrawInMap {
...
@@ -89,9 +89,9 @@ object AmapDrawInMap {
*/
*/
fun
drawCircle
(
fun
drawCircle
(
mapReadView
:
MapReadyView
?,
mapReadView
:
MapReadyView
?,
center
:
MS
LatLng
,
center
:
LatLng
M
,
msCircleOptions
:
MsCircleOptions
?
msCircleOptions
:
MsCircleOptions
?
):
M
S
Overlay
{
):
M
ap
Overlay
{
var
latLng
=
LatLng
(
center
.
lat
,
center
.
lng
)
var
latLng
=
LatLng
(
center
.
lat
,
center
.
lng
)
val
options
=
CircleOptions
()
val
options
=
CircleOptions
()
.
center
(
latLng
)
.
center
(
latLng
)
...
@@ -100,8 +100,8 @@ object AmapDrawInMap {
...
@@ -100,8 +100,8 @@ object AmapDrawInMap {
.
strokeColor
(
msCircleOptions
?.
strokeColor
?:
"#500000FF"
.
toColorInt
())
.
strokeColor
(
msCircleOptions
?.
strokeColor
?:
"#500000FF"
.
toColorInt
())
.
strokeWidth
(
msCircleOptions
?.
strokeWidth
?:
15f
)
.
strokeWidth
(
msCircleOptions
?.
strokeWidth
?:
15f
)
var
circle
=
mapReadView
?.
aMap
?.
addCircle
(
options
)
var
circle
=
mapReadView
?.
aMap
?.
addCircle
(
options
)
M
S
Overlay
.
aCircle
=
circle
M
ap
Overlay
.
aCircle
=
circle
return
M
S
Overlay
return
M
ap
Overlay
}
}
...
@@ -112,9 +112,9 @@ object AmapDrawInMap {
...
@@ -112,9 +112,9 @@ object AmapDrawInMap {
*/
*/
fun
drawPolygon
(
fun
drawPolygon
(
mapReadView
:
MapReadyView
?,
mapReadView
:
MapReadyView
?,
msLatLng
:
List
<
MS
LatLng
>,
msLatLng
:
List
<
LatLng
M
>,
msPolygonOptions
:
MsPolygonOptions
msPolygonOptions
:
MsPolygonOptions
):
M
S
Overlay
{
):
M
ap
Overlay
{
var
latLngs
=
msLatLng
.
map
{
var
latLngs
=
msLatLng
.
map
{
LatLng
(
it
.
lat
,
it
.
lng
)
LatLng
(
it
.
lat
,
it
.
lng
)
}
}
...
@@ -125,8 +125,8 @@ object AmapDrawInMap {
...
@@ -125,8 +125,8 @@ object AmapDrawInMap {
strokeColor
(
msPolygonOptions
.
strokeColor
)
strokeColor
(
msPolygonOptions
.
strokeColor
)
}
}
var
polygon
=
mapReadView
?.
aMap
?.
addPolygon
(
aPolygonOptions
)
var
polygon
=
mapReadView
?.
aMap
?.
addPolygon
(
aPolygonOptions
)
M
S
Overlay
.
aPolygon
=
polygon
M
ap
Overlay
.
aPolygon
=
polygon
return
M
S
Overlay
return
M
ap
Overlay
}
}
}
}
\ No newline at end of file
mapapi/src/main/java/com/cusc/map/maps/amap/AmapLocationStyle.kt
View file @
c0a4d214
package
com.cusc.map.maps.amap
package
com.cusc.map.maps.amap
import
com.amap.api.maps.model.MyLocationStyle
import
com.amap.api.maps.model.MyLocationStyle
import
com.cusc.map.maps.
MS
LocStyle
import
com.cusc.map.maps.LocStyle
Constant
import
com.cusc.map.ui.MapReadyView
import
com.cusc.map.ui.MapReadyView
/**
/**
...
@@ -12,13 +12,13 @@ internal object AmapLocationStyle {
...
@@ -12,13 +12,13 @@ internal object AmapLocationStyle {
// 高德定位类型
// 高德定位类型
private
var
styleAMap
=
mapOf
(
private
var
styleAMap
=
mapOf
(
MS
LocStyle
.
LOCATION_TYPE_LOCATE
to
MyLocationStyle
.
LOCATION_TYPE_LOCATE
,
LocStyle
Constant
.
LOCATION_TYPE_LOCATE
to
MyLocationStyle
.
LOCATION_TYPE_LOCATE
,
MS
LocStyle
.
LOCATION_TYPE_FOLLOW
to
MyLocationStyle
.
LOCATION_TYPE_FOLLOW
,
LocStyle
Constant
.
LOCATION_TYPE_FOLLOW
to
MyLocationStyle
.
LOCATION_TYPE_FOLLOW
,
MS
LocStyle
.
LOCATION_TYPE_MAP_ROTATE
to
MyLocationStyle
.
LOCATION_TYPE_MAP_ROTATE
,
LocStyle
Constant
.
LOCATION_TYPE_MAP_ROTATE
to
MyLocationStyle
.
LOCATION_TYPE_MAP_ROTATE
,
MS
LocStyle
.
LOCATION_TYPE_LOCATION_ROTATE
to
MyLocationStyle
.
LOCATION_TYPE_LOCATION_ROTATE
,
LocStyle
Constant
.
LOCATION_TYPE_LOCATION_ROTATE
to
MyLocationStyle
.
LOCATION_TYPE_LOCATION_ROTATE
,
MS
LocStyle
.
LOCATION_TYPE_LOCATION_ROTATE_NO_CENTER
to
MyLocationStyle
.
LOCATION_TYPE_LOCATION_ROTATE_NO_CENTER
,
LocStyle
Constant
.
LOCATION_TYPE_LOCATION_ROTATE_NO_CENTER
to
MyLocationStyle
.
LOCATION_TYPE_LOCATION_ROTATE_NO_CENTER
,
MS
LocStyle
.
LOCATION_TYPE_FOLLOW_NO_CENTER
to
MyLocationStyle
.
LOCATION_TYPE_FOLLOW_NO_CENTER
,
LocStyle
Constant
.
LOCATION_TYPE_FOLLOW_NO_CENTER
to
MyLocationStyle
.
LOCATION_TYPE_FOLLOW_NO_CENTER
,
MS
LocStyle
.
LOCATION_TYPE_MAP_ROTATE_NO_CENTER
to
MyLocationStyle
.
LOCATION_TYPE_MAP_ROTATE_NO_CENTER
LocStyle
Constant
.
LOCATION_TYPE_MAP_ROTATE_NO_CENTER
to
MyLocationStyle
.
LOCATION_TYPE_MAP_ROTATE_NO_CENTER
)
)
//高德初始化定位蓝点样式类
//高德初始化定位蓝点样式类
...
@@ -31,7 +31,7 @@ internal object AmapLocationStyle {
...
@@ -31,7 +31,7 @@ internal object AmapLocationStyle {
*/
*/
fun
setLocationStyle
(
fun
setLocationStyle
(
mapReadView
:
MapReadyView
?,
mapReadView
:
MapReadyView
?,
type
:
Int
=
MS
LocStyle
.
LOCATION_TYPE_LOCATION_ROTATE
type
:
Int
=
LocStyle
Constant
.
LOCATION_TYPE_LOCATION_ROTATE
)
{
)
{
var
aMap
=
mapReadView
?.
aMap
var
aMap
=
mapReadView
?.
aMap
aMyLocationStyle
.
myLocationType
(
styleAMap
.
get
(
type
)
!!
)
aMyLocationStyle
.
myLocationType
(
styleAMap
.
get
(
type
)
!!
)
...
...
mapapi/src/main/java/com/cusc/map/maps/amap/AmapNai.kt
View file @
c0a4d214
...
@@ -8,7 +8,7 @@ import com.amap.api.navi.AmapNaviType
...
@@ -8,7 +8,7 @@ import com.amap.api.navi.AmapNaviType
import
com.amap.api.navi.AmapPageType
import
com.amap.api.navi.AmapPageType
import
com.cusc.map.UserCtx
import
com.cusc.map.UserCtx
import
com.cusc.map.bean.WayPoi
import
com.cusc.map.bean.WayPoi
import
com.cusc.map.maps.cdata.
MS
LatLng
import
com.cusc.map.maps.cdata.LatLng
M
/**
/**
* 高德导航
* 高德导航
...
@@ -25,9 +25,9 @@ object AmapNai {
...
@@ -25,9 +25,9 @@ object AmapNai {
* @param ways
* @param ways
*/
*/
fun
startNavi
(
fun
startNavi
(
starPoint
:
MS
LatLng
,
starPoint
:
LatLng
M
,
startName
:
String
,
startName
:
String
,
endPoint
:
MS
LatLng
,
endPoint
:
LatLng
M
,
endName
:
String
,
endName
:
String
,
ways
:
List
<
WayPoi
>
ways
:
List
<
WayPoi
>
)
{
)
{
...
@@ -67,9 +67,9 @@ object AmapNai {
...
@@ -67,9 +67,9 @@ object AmapNai {
* @param ways
* @param ways
*/
*/
fun
startPlanNavi
(
fun
startPlanNavi
(
starPoint
:
MS
LatLng
,
starPoint
:
LatLng
M
,
startName
:
String
,
startName
:
String
,
endPoint
:
MS
LatLng
,
endPoint
:
LatLng
M
,
endName
:
String
,
endName
:
String
,
ways
:
List
<
WayPoi
>
ways
:
List
<
WayPoi
>
)
{
)
{
...
...
mapapi/src/main/java/com/cusc/map/maps/amap/AmapRoutePlans.kt
View file @
c0a4d214
...
@@ -12,7 +12,7 @@ import com.cusc.map.UserCtx
...
@@ -12,7 +12,7 @@ import com.cusc.map.UserCtx
import
com.cusc.map.bean.DriverRouteBean
import
com.cusc.map.bean.DriverRouteBean
import
com.cusc.map.bean.WayPoi
import
com.cusc.map.bean.WayPoi
import
com.cusc.map.intfaces.MyAMapNaviListener
import
com.cusc.map.intfaces.MyAMapNaviListener
import
com.cusc.map.maps.cdata.
MS
LatLng
import
com.cusc.map.maps.cdata.LatLng
M
import
com.cusc.map.maps.inters.OnDriveRoute
import
com.cusc.map.maps.inters.OnDriveRoute
import
com.cusc.map.ui.MapReadyView
import
com.cusc.map.ui.MapReadyView
...
@@ -47,9 +47,9 @@ class AmapRoutePlans {
...
@@ -47,9 +47,9 @@ class AmapRoutePlans {
* @param mapReadView 地图对象
* @param mapReadView 地图对象
*/
*/
fun
drivingPathPlanning
(
fun
drivingPathPlanning
(
starPoint
:
MS
LatLng
,
starPoint
:
LatLng
M
,
startName
:
String
=
"当前位置"
,
startName
:
String
=
"当前位置"
,
endPoint
:
MS
LatLng
,
endPoint
:
LatLng
M
,
endName
:
String
=
""
,
endName
:
String
=
""
,
ways
:
List
<
WayPoi
>,
ways
:
List
<
WayPoi
>,
mapReadView
:
MapReadyView
?,
mapReadView
:
MapReadyView
?,
...
...
mapapi/src/main/java/com/cusc/map/maps/cdata/
MS
LatLng.kt
→
mapapi/src/main/java/com/cusc/map/maps/cdata/LatLng
M
.kt
View file @
c0a4d214
...
@@ -5,7 +5,7 @@ import kotlinx.parcelize.Parcelize
...
@@ -5,7 +5,7 @@ import kotlinx.parcelize.Parcelize
/**经纬度*/
/**经纬度*/
@Parcelize
@Parcelize
data class
MS
LatLng
data class
LatLng
M
(
(
var
lat
:
Double
=
0.0
,
var
lat
:
Double
=
0.0
,
var
lng
:
Double
=
0.0
var
lng
:
Double
=
0.0
...
...
mapapi/src/main/java/com/cusc/map/maps/cdata/M
S
Overlay.kt
→
mapapi/src/main/java/com/cusc/map/maps/cdata/M
ap
Overlay.kt
View file @
c0a4d214
...
@@ -5,8 +5,8 @@ import com.amap.api.maps.model.Polygon
...
@@ -5,8 +5,8 @@ import com.amap.api.maps.model.Polygon
import
com.amap.api.maps.model.Polyline
import
com.amap.api.maps.model.Polyline
import
com.minedata.minenavi.map.Overlay
import
com.minedata.minenavi.map.Overlay
/**返回的图层*/
/**返回的
地图覆盖物
图层*/
object
M
S
Overlay
{
object
M
ap
Overlay
{
//四维线图层
//四维线图层
var
polyline
:
Overlay
?
=
null
var
polyline
:
Overlay
?
=
null
...
...
mapapi/src/main/java/com/cusc/map/maps/cdata/
MS
Marker.kt
→
mapapi/src/main/java/com/cusc/map/maps/cdata/Marker
M
.kt
View file @
c0a4d214
...
@@ -4,7 +4,7 @@ import com.minedata.minenavi.map.Marker
...
@@ -4,7 +4,7 @@ import com.minedata.minenavi.map.Marker
import
com.amap.api.maps.model.Marker
as
AMarker
import
com.amap.api.maps.model.Marker
as
AMarker
/**返回的mark*/
/**返回的mark*/
object
MS
Marker
{
object
Marker
M
{
/**四维mark*/
/**四维mark*/
var
maker
:
Marker
?
=
null
var
maker
:
Marker
?
=
null
...
...
mapapi/src/main/java/com/cusc/map/maps/mine/MineDrawInMap.kt
View file @
c0a4d214
...
@@ -12,9 +12,9 @@ import com.cusc.map.UserCtx
...
@@ -12,9 +12,9 @@ import com.cusc.map.UserCtx
import
com.cusc.map.maps.MsCircleOptions
import
com.cusc.map.maps.MsCircleOptions
import
com.cusc.map.maps.MsPolygonOptions
import
com.cusc.map.maps.MsPolygonOptions
import
com.cusc.map.maps.MsPolylineOptions
import
com.cusc.map.maps.MsPolylineOptions
import
com.cusc.map.maps.cdata.
MS
LatLng
import
com.cusc.map.maps.cdata.LatLng
M
import
com.cusc.map.maps.cdata.
MS
Marker
import
com.cusc.map.maps.cdata.Marker
M
import
com.cusc.map.maps.cdata.M
S
Overlay
import
com.cusc.map.maps.cdata.M
ap
Overlay
import
com.cusc.map.ui.MapReadyView
import
com.cusc.map.ui.MapReadyView
/**
/**
...
@@ -34,7 +34,7 @@ internal object MineDrawInMap {
...
@@ -34,7 +34,7 @@ internal object MineDrawInMap {
mapReadView
:
MapReadyView
?,
mapReadView
:
MapReadyView
?,
lat
:
Double
,
lat
:
Double
,
lng
:
Double
lng
:
Double
):
MS
Marker
{
):
Marker
M
{
var
context
=
UserCtx
.
Companion
.
instance
.
mContext
var
context
=
UserCtx
.
Companion
.
instance
.
mContext
// 根据不同的地图类型绘制标记点
// 根据不同的地图类型绘制标记点
val
icon
=
BitmapFactory
.
decodeResource
(
context
?.
resources
,
R
.
drawable
.
market_loc
)
val
icon
=
BitmapFactory
.
decodeResource
(
context
?.
resources
,
R
.
drawable
.
market_loc
)
...
@@ -44,8 +44,8 @@ internal object MineDrawInMap {
...
@@ -44,8 +44,8 @@ internal object MineDrawInMap {
// 位置坐标
// 位置坐标
.
position
(
latLng
)
.
position
(
latLng
)
var
maker
=
mapReadView
?.
mMineMap
?.
addMarker
(
options
)
var
maker
=
mapReadView
?.
mMineMap
?.
addMarker
(
options
)
MS
Marker
.
maker
=
maker
Marker
M
.
maker
=
maker
return
MS
Marker
return
Marker
M
}
}
...
@@ -57,9 +57,9 @@ internal object MineDrawInMap {
...
@@ -57,9 +57,9 @@ internal object MineDrawInMap {
*/
*/
fun
drawPolyline
(
fun
drawPolyline
(
mapReadView
:
MapReadyView
?,
mapReadView
:
MapReadyView
?,
msLatLng
:
List
<
MS
LatLng
>,
msLatLng
:
List
<
LatLng
M
>,
msPolylineOptions
:
MsPolylineOptions
msPolylineOptions
:
MsPolylineOptions
):
M
S
Overlay
{
):
M
ap
Overlay
{
// 绘制自定义地图的线
// 绘制自定义地图的线
var
latLngs
=
msLatLng
.
map
{
var
latLngs
=
msLatLng
.
map
{
LatLng
(
it
.
lat
,
it
.
lng
)
LatLng
(
it
.
lat
,
it
.
lng
)
...
@@ -72,8 +72,8 @@ internal object MineDrawInMap {
...
@@ -72,8 +72,8 @@ internal object MineDrawInMap {
.
outlineColor
(
msPolylineOptions
.
outlineColor
)
.
outlineColor
(
msPolylineOptions
.
outlineColor
)
.
setDottedLine
(
msPolylineOptions
.
isDotted
)
.
setDottedLine
(
msPolylineOptions
.
isDotted
)
var
polyline
=
mapReadView
?.
mMineMap
?.
addPolyline
(
options
)
var
polyline
=
mapReadView
?.
mMineMap
?.
addPolyline
(
options
)
M
S
Overlay
.
polyline
=
polyline
M
ap
Overlay
.
polyline
=
polyline
return
M
S
Overlay
return
M
ap
Overlay
}
}
...
@@ -85,9 +85,9 @@ internal object MineDrawInMap {
...
@@ -85,9 +85,9 @@ internal object MineDrawInMap {
*/
*/
fun
drawCircle
(
fun
drawCircle
(
mapReadView
:
MapReadyView
?,
mapReadView
:
MapReadyView
?,
center
:
MS
LatLng
,
center
:
LatLng
M
,
msCircleOptions
:
MsCircleOptions
?
msCircleOptions
:
MsCircleOptions
?
):
M
S
Overlay
{
):
M
ap
Overlay
{
// 根据地图类型绘制不同类型的圆形
// 根据地图类型绘制不同类型的圆形
var
latLng
=
LatLng
(
center
.
lat
,
center
.
lng
)
var
latLng
=
LatLng
(
center
.
lat
,
center
.
lng
)
val
options
=
CircleOptions
()
val
options
=
CircleOptions
()
...
@@ -97,8 +97,8 @@ internal object MineDrawInMap {
...
@@ -97,8 +97,8 @@ internal object MineDrawInMap {
.
strokeColor
(
msCircleOptions
?.
strokeColor
?:
"#500000FF"
.
toColorInt
())
.
strokeColor
(
msCircleOptions
?.
strokeColor
?:
"#500000FF"
.
toColorInt
())
.
strokeWidth
(
msCircleOptions
?.
strokeWidth
?:
15f
)
.
strokeWidth
(
msCircleOptions
?.
strokeWidth
?:
15f
)
var
circle
=
mapReadView
?.
mMineMap
?.
addCircle
(
options
)
var
circle
=
mapReadView
?.
mMineMap
?.
addCircle
(
options
)
M
S
Overlay
.
circle
=
circle
M
ap
Overlay
.
circle
=
circle
return
M
S
Overlay
return
M
ap
Overlay
}
}
...
@@ -109,9 +109,9 @@ internal object MineDrawInMap {
...
@@ -109,9 +109,9 @@ internal object MineDrawInMap {
*/
*/
fun
drawPolygon
(
fun
drawPolygon
(
mapReadView
:
MapReadyView
?,
mapReadView
:
MapReadyView
?,
msLatLng
:
List
<
MS
LatLng
>,
msLatLng
:
List
<
LatLng
M
>,
msPolygonOptions
:
MsPolygonOptions
msPolygonOptions
:
MsPolygonOptions
):
M
S
Overlay
{
):
M
ap
Overlay
{
var
latLngs
=
msLatLng
.
map
{
var
latLngs
=
msLatLng
.
map
{
LatLng
(
it
.
lat
,
it
.
lng
)
LatLng
(
it
.
lat
,
it
.
lng
)
}
}
...
@@ -124,8 +124,8 @@ internal object MineDrawInMap {
...
@@ -124,8 +124,8 @@ internal object MineDrawInMap {
dottedLine
(
msPolygonOptions
.
dLine
)
dottedLine
(
msPolygonOptions
.
dLine
)
}
}
var
polygon
=
mapReadView
?.
mMineMap
?.
addPolygon
(
polygonOptions
)
var
polygon
=
mapReadView
?.
mMineMap
?.
addPolygon
(
polygonOptions
)
M
S
Overlay
.
polygon
=
polygon
M
ap
Overlay
.
polygon
=
polygon
return
M
S
Overlay
return
M
ap
Overlay
}
}
}
}
\ No newline at end of file
mapapi/src/main/java/com/cusc/map/maps/mine/MineLocationStyle.kt
View file @
c0a4d214
...
@@ -2,7 +2,7 @@ package com.cusc.map.maps.mine
...
@@ -2,7 +2,7 @@ package com.cusc.map.maps.mine
import
com.minedata.minenavi.map.MyLocationStyle
import
com.minedata.minenavi.map.MyLocationStyle
import
com.cusc.map.ui.MapReadyView
import
com.cusc.map.ui.MapReadyView
import
com.cusc.map.maps.
MS
LocStyle
import
com.cusc.map.maps.LocStyle
Constant
/**
/**
* 四维显示定位小圆点
* 四维显示定位小圆点
...
@@ -19,7 +19,7 @@ internal object MineLocationStyle {
...
@@ -19,7 +19,7 @@ internal object MineLocationStyle {
*/
*/
fun
setLocationStyle
(
fun
setLocationStyle
(
mapReadView
:
MapReadyView
?,
mapReadView
:
MapReadyView
?,
type
:
Int
=
MS
LocStyle
.
LOCATION_TYPE_LOCATION_ROTATE
type
:
Int
=
LocStyle
Constant
.
LOCATION_TYPE_LOCATION_ROTATE
)
{
)
{
var
mMineMap
=
mapReadView
?.
mMineMap
var
mMineMap
=
mapReadView
?.
mMineMap
...
...
mapapi/src/main/java/com/cusc/map/maps/mine/MineNai.kt
View file @
c0a4d214
...
@@ -23,7 +23,7 @@ import com.cusc.map.UserCtx
...
@@ -23,7 +23,7 @@ import com.cusc.map.UserCtx
import
com.cusc.map.bean.WayPoi
import
com.cusc.map.bean.WayPoi
import
com.cusc.map.intfaces.MyMineNaviListener
import
com.cusc.map.intfaces.MyMineNaviListener
import
com.cusc.map.intfaces.OnNaviPresenterListener
import
com.cusc.map.intfaces.OnNaviPresenterListener
import
com.cusc.map.maps.cdata.
MS
LatLng
import
com.cusc.map.maps.cdata.LatLng
M
import
com.cusc.map.ui.MapReadyView
import
com.cusc.map.ui.MapReadyView
import
com.cusc.map.ui.MineNaiDirActivity
import
com.cusc.map.ui.MineNaiDirActivity
...
@@ -77,7 +77,7 @@ object MineNai {
...
@@ -77,7 +77,7 @@ object MineNai {
fun
startSimNavi
(
fun
startSimNavi
(
mapReadView
:
MapReadyView
?,
mapReadView
:
MapReadyView
?,
starPoint
:
MS
LatLng
,
starPoint
:
LatLng
M
,
routeBase
:
RouteBase
?,
routeBase
:
RouteBase
?,
onNaviPresenterListener
:
OnNaviPresenterListener
?
onNaviPresenterListener
:
OnNaviPresenterListener
?
)
{
)
{
...
@@ -99,9 +99,9 @@ object MineNai {
...
@@ -99,9 +99,9 @@ object MineNai {
* 直接跳转页面开启导航
* 直接跳转页面开启导航
*/
*/
fun
startNaviDirect
(
fun
startNaviDirect
(
starPoint
:
MS
LatLng
,
starPoint
:
LatLng
M
,
startName
:
String
=
"当前位置"
,
startName
:
String
=
"当前位置"
,
endPoint
:
MS
LatLng
,
endPoint
:
LatLng
M
,
endName
:
String
=
""
,
endName
:
String
=
""
,
ways
:
List
<
WayPoi
>
ways
:
List
<
WayPoi
>
)
{
)
{
...
@@ -119,7 +119,7 @@ object MineNai {
...
@@ -119,7 +119,7 @@ object MineNai {
*/
*/
fun
startNaviFormRouteBase
(
fun
startNaviFormRouteBase
(
routeBase
:
RouteBase
?,
routeBase
:
RouteBase
?,
mStartPoint
:
MS
LatLng
,
mStartPoint
:
LatLng
M
,
mapReadView
:
MapReadyView
?
mapReadView
:
MapReadyView
?
)
{
)
{
// mMineMap = mapReadView?.mMineMap
// mMineMap = mapReadView?.mMineMap
...
...
mapapi/src/main/java/com/cusc/map/maps/mine/MineNaiParams.kt
View file @
c0a4d214
...
@@ -2,7 +2,7 @@ package com.cusc.map.maps.mine
...
@@ -2,7 +2,7 @@ package com.cusc.map.maps.mine
import
android.os.Parcelable
import
android.os.Parcelable
import
com.cusc.map.bean.WayPoi
import
com.cusc.map.bean.WayPoi
import
com.cusc.map.maps.cdata.
MS
LatLng
import
com.cusc.map.maps.cdata.LatLng
M
import
kotlinx.parcelize.Parcelize
import
kotlinx.parcelize.Parcelize
/**
/**
...
@@ -10,9 +10,9 @@ import kotlinx.parcelize.Parcelize
...
@@ -10,9 +10,9 @@ import kotlinx.parcelize.Parcelize
*/
*/
@Parcelize
@Parcelize
data class
MineNaiParams
(
data class
MineNaiParams
(
val
starPoint
:
MS
LatLng
,
val
starPoint
:
LatLng
M
,
val
startName
:
String
,
val
startName
:
String
,
val
endPoint
:
MS
LatLng
,
val
endPoint
:
LatLng
M
,
val
endName
:
String
,
val
endName
:
String
,
val
ways
:
List
<
WayPoi
>
val
ways
:
List
<
WayPoi
>
)
:
Parcelable
)
:
Parcelable
\ No newline at end of file
mapapi/src/main/java/com/cusc/map/maps/mine/MineRoutePlans.kt
View file @
c0a4d214
...
@@ -16,7 +16,7 @@ import com.minedata.minenavi.util.Tools
...
@@ -16,7 +16,7 @@ import com.minedata.minenavi.util.Tools
import
com.cusc.map.bean.DriverRouteBean
import
com.cusc.map.bean.DriverRouteBean
import
com.cusc.map.bean.WayPoi
import
com.cusc.map.bean.WayPoi
import
com.cusc.map.intfaces.MyMineNaviListener
import
com.cusc.map.intfaces.MyMineNaviListener
import
com.cusc.map.maps.cdata.
MS
LatLng
import
com.cusc.map.maps.cdata.LatLng
M
import
com.cusc.map.maps.inters.OnDriveRoute
import
com.cusc.map.maps.inters.OnDriveRoute
import
com.cusc.map.ui.MapReadyView
import
com.cusc.map.ui.MapReadyView
import
com.cusc.map.utils.DisplayUtil
import
com.cusc.map.utils.DisplayUtil
...
@@ -58,9 +58,9 @@ object MineRoutePlans {
...
@@ -58,9 +58,9 @@ object MineRoutePlans {
* @param onDriveRoute 路径规划结果回调
* @param onDriveRoute 路径规划结果回调
*/
*/
fun
drivingPathPlanning
(
fun
drivingPathPlanning
(
starPoint
:
MS
LatLng
,
starPoint
:
LatLng
M
,
startName
:
String
=
"当前位置"
,
startName
:
String
=
"当前位置"
,
endPoint
:
MS
LatLng
,
endPoint
:
LatLng
M
,
endName
:
String
=
""
,
endName
:
String
=
""
,
ways
:
List
<
WayPoi
>,
ways
:
List
<
WayPoi
>,
mapReadView
:
MapReadyView
?,
mapReadView
:
MapReadyView
?,
...
...
mapapi/src/main/java/com/cusc/map/scenario/mine/AmapVehMove.kt
View file @
c0a4d214
...
@@ -7,7 +7,7 @@ import com.amap.api.maps.model.Marker
...
@@ -7,7 +7,7 @@ import com.amap.api.maps.model.Marker
import
com.amap.api.maps.model.MarkerOptions
import
com.amap.api.maps.model.MarkerOptions
import
com.amap.api.maps.utils.overlay.MovingPointOverlay
import
com.amap.api.maps.utils.overlay.MovingPointOverlay
import
com.cusc.map.R
import
com.cusc.map.R
import
com.cusc.map.maps.
MS
Navi
import
com.cusc.map.maps.Navi
gate
import
com.cusc.map.maps.MsOperationParent
import
com.cusc.map.maps.MsOperationParent
import
com.cusc.map.scenario.CucsVehicle
import
com.cusc.map.scenario.CucsVehicle
import
com.cusc.map.scenario.bean.VehiclePos
import
com.cusc.map.scenario.bean.VehiclePos
...
@@ -34,7 +34,7 @@ internal object AmapVehMove : MsOperationParent() {
...
@@ -34,7 +34,7 @@ internal object AmapVehMove : MsOperationParent() {
fun
aMapCarMove
(
vPos
:
VehiclePos
,
moveType
:
Int
)
{
fun
aMapCarMove
(
vPos
:
VehiclePos
,
moveType
:
Int
)
{
if
(
moveType
==
3
)
{
if
(
moveType
==
3
)
{
if
(
MS
Navi
.
isStartNai
)
{
//导航中就删除在线地图小车
if
(
Navi
gate
.
isStartNai
)
{
//导航中就删除在线地图小车
CucsVehicle
.
deleteCarModel
()
CucsVehicle
.
deleteCarModel
()
}
else
{
}
else
{
//计算2次定位时间差
//计算2次定位时间差
...
...
Prev
1
2
3
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