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
ab228446
Commit
ab228446
authored
Jan 06, 2026
by
p x
Browse files
更改类名
parent
a8779687
Changes
20
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/com/sd/demo/MainActivity.kt
View file @
ab228446
...
@@ -134,7 +134,6 @@ class MainActivity : AppCompatActivity() {
...
@@ -134,7 +134,6 @@ class MainActivity : AppCompatActivity() {
/**
/**
* Init map
* Init map
*
* @param type MINE=四维 AMAP=高德
* @param type MINE=四维 AMAP=高德
*/
*/
fun
initMap
(
type
:
MAP_TYPE
=
MAP_TYPE
.
MINE
)
{
fun
initMap
(
type
:
MAP_TYPE
=
MAP_TYPE
.
MINE
)
{
...
...
app/src/main/java/com/sd/demo/ui/TLineActivity.kt
View file @
ab228446
...
@@ -8,7 +8,7 @@ import com.cusc.map.map2d.DelDrawInMap
...
@@ -8,7 +8,7 @@ import com.cusc.map.map2d.DelDrawInMap
import
com.cusc.map.map2d.cdata.MapOverlay
import
com.cusc.map.map2d.cdata.MapOverlay
import
com.cusc.map.map2d.DrawInMap
import
com.cusc.map.map2d.DrawInMap
import
com.cusc.map.map2d.MethodAdv
import
com.cusc.map.map2d.MethodAdv
import
com.cusc.map.map2d.
Ms
PolylineOptions
import
com.cusc.map.map2d.PolylineOptions
import
com.cusc.map.ui.MapView.OnMapReadyLis
import
com.cusc.map.ui.MapView.OnMapReadyLis
import
com.sd.demo.databinding.ActivityTlineBinding
import
com.sd.demo.databinding.ActivityTlineBinding
...
@@ -44,12 +44,12 @@ class TLineActivity : AppCompatActivity() {
...
@@ -44,12 +44,12 @@ class TLineActivity : AppCompatActivity() {
binding
.
bt1
.
setOnClickListener
{
binding
.
bt1
.
setOnClickListener
{
//绘制一条线 //画实线
//绘制一条线 //画实线
var
m
sL
atLng
=
listOf
<
LatLngM
>(
var
matLng
=
listOf
<
LatLngM
>(
LatLngM
(
39.999391
,
116.135972
),
LatLngM
(
39.898323
,
116.057694
),
LatLngM
(
39.999391
,
116.135972
),
LatLngM
(
39.898323
,
116.057694
),
LatLngM
(
39.900430
,
116.265061
),
LatLngM
(
39.955192
,
116.140092
)
LatLngM
(
39.900430
,
116.265061
),
LatLngM
(
39.955192
,
116.140092
)
)
)
var
msP
olylineOptions
=
Ms
PolylineOptions
()
var
p
olylineOptions
=
PolylineOptions
()
mSOverlay
=
DrawInMap
.
drawPolyline
(
m
sL
atLng
,
msP
olylineOptions
)
mSOverlay
=
DrawInMap
.
drawPolyline
(
matLng
,
p
olylineOptions
)
}
}
binding
.
bt2
.
setOnClickListener
{
binding
.
bt2
.
setOnClickListener
{
//画虚线
//画虚线
...
@@ -58,7 +58,7 @@ class TLineActivity : AppCompatActivity() {
...
@@ -58,7 +58,7 @@ class TLineActivity : AppCompatActivity() {
LatLngM
(
39.900230
,
116.265062
),
LatLngM
(
39.951192
,
116.140090
)
LatLngM
(
39.900230
,
116.265062
),
LatLngM
(
39.951192
,
116.140090
)
)
)
//绘制线选项
//绘制线选项
var
msPolylineOptions
=
Ms
PolylineOptions
().
apply
{
var
msPolylineOptions
=
PolylineOptions
().
apply
{
isDotted
=
true
//是否虚线
isDotted
=
true
//是否虚线
}
}
mSOverlay2
=
DrawInMap
.
drawPolyline
(
msLatLng
,
msPolylineOptions
)
mSOverlay2
=
DrawInMap
.
drawPolyline
(
msLatLng
,
msPolylineOptions
)
...
...
app/src/main/java/com/sd/demo/ui/TPoiSearchActivity.kt
View file @
ab228446
...
@@ -56,25 +56,27 @@ class TPoiSearchActivity : AppCompatActivity() {
...
@@ -56,25 +56,27 @@ class TPoiSearchActivity : AppCompatActivity() {
}
}
//poi搜索
/**poi关键字搜索
* @param keyword 关键字
* ***/
fun
testPoiSearch
(
keyword
:
String
)
{
fun
testPoiSearch
(
keyword
:
String
)
{
//poi关键字搜索
//poi关键字搜索
PoiSearch
.
startPoiSearch
(
PoiSearch
.
startPoiSearch
(
keyword
,
//关键字
keyword
,
//关键字
41.80196
,
41.80196
,
123.43326
,
123.43326
,
"110115"
,
"110115"
,
//行政区编码必传
object
:
OnMSPoiSearchLis
{
object
:
OnMSPoiSearchLis
{
override
fun
onPoiLis
(
override
fun
onPoiLis
(
poiList
:
List
<
PoiSearchRes
>
poiList
:
List
<
PoiSearchRes
>
)
{
)
{
//自定义适配器展示列表
//
自定义适配器展示列表
poiAdapter
.
submitList
(
poiList
)
poiAdapter
.
submitList
(
poiList
)
}
}
})
})
}
}
/
/poi
范围搜索
/
***
范围搜索
**/
fun
testPoiSearchBound
(
keyword
:
String
)
{
fun
testPoiSearchBound
(
keyword
:
String
)
{
//poi 范围搜索
//poi 范围搜索
PoiSearch
.
startPoiSearchBound
(
PoiSearch
.
startPoiSearchBound
(
...
...
app/src/main/java/com/sd/demo/ui/TPolygonActivity.kt
View file @
ab228446
...
@@ -8,7 +8,7 @@ import com.cusc.map.map2d.DelDrawInMap
...
@@ -8,7 +8,7 @@ import com.cusc.map.map2d.DelDrawInMap
import
com.cusc.map.map2d.cdata.MapOverlay
import
com.cusc.map.map2d.cdata.MapOverlay
import
com.cusc.map.map2d.DrawInMap
import
com.cusc.map.map2d.DrawInMap
import
com.cusc.map.map2d.MethodAdv
import
com.cusc.map.map2d.MethodAdv
import
com.cusc.map.map2d.
Ms
PolygonOptions
import
com.cusc.map.map2d.PolygonOptions
import
com.cusc.map.ui.MapView.OnMapReadyLis
import
com.cusc.map.ui.MapView.OnMapReadyLis
import
com.sd.demo.databinding.ActivityTpolygonBinding
import
com.sd.demo.databinding.ActivityTpolygonBinding
...
@@ -39,11 +39,11 @@ class TPolygonActivity : AppCompatActivity() {
...
@@ -39,11 +39,11 @@ class TPolygonActivity : AppCompatActivity() {
LatLngM
(
39.904430
,
116.265061
),
LatLngM
(
39.950192
,
116.140002
)
LatLngM
(
39.904430
,
116.265061
),
LatLngM
(
39.950192
,
116.140002
)
)
)
//构造面参数
//构造面参数
var
msPolygonOptions
=
Ms
PolygonOptions
().
apply
{
var
msPolygonOptions
=
PolygonOptions
().
apply
{
dLine
=
true
dLine
=
true
}
}
mSOverlay
=
DrawInMap
.
drawPolygon
(
mspLatLng
,
msPolygonOptions
)
mSOverlay
=
DrawInMap
.
drawPolygon
(
mspLatLng
,
msPolygonOptions
)
//移动地图中心点
MethodAdv
.
setMapCenter
(
39.993391
,
116.135272
)
MethodAdv
.
setMapCenter
(
39.993391
,
116.135272
)
}
}
})
})
...
...
app/src/main/res/layout/activity_tpoi_search.xml
View file @
ab228446
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
android:id=
"@+id/et1"
android:id=
"@+id/et1"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"5000"
/>
android:text=
"5000"
/>
<Button
<Button
...
@@ -57,13 +57,13 @@
...
@@ -57,13 +57,13 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
android:layout_height=
"match_parent"
>
<!--基础底图-->
<com.cusc.map.ui.MapView
<com.cusc.map.ui.MapView
android:id=
"@+id/MapView"
android:id=
"@+id/MapView"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
/>
/>
<!--用户自定义列表-->
<androidx.recyclerview.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/poi_list"
android:id=
"@+id/poi_list"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
...
mapapi/build.gradle.kts
View file @
ab228446
...
@@ -56,7 +56,7 @@ android {
...
@@ -56,7 +56,7 @@ android {
// val versionName = config.versionName
// val versionName = config.versionName
// val formatter = DateTimeFormatter.ofPattern("yyyy_MM_dd_HHmm")
// val formatter = DateTimeFormatter.ofPattern("yyyy_MM_dd_HHmm")
// val createTime = LocalDateTime.now().format(formatter)
// val createTime = LocalDateTime.now().format(formatter)
outputFileName
=
"
map_
cusc_${version}.aar"
outputFileName
=
"cusc
_map
_${version}.aar"
}
}
}
}
}
}
...
@@ -101,7 +101,7 @@ dependencies {
...
@@ -101,7 +101,7 @@ dependencies {
dokka
{
dokka
{
dokkaPublications
.
javadoc
{
dokkaPublications
.
javadoc
{
moduleName
.
set
(
"
mapsdk
"
)
moduleName
.
set
(
"
CuscMapSDK
"
)
// moduleVersion.set(project.version.toString())
// moduleVersion.set(project.version.toString())
description
=
"Android 地图SDK"
description
=
"Android 地图SDK"
// Standard output directory for HTML documentation
// Standard output directory for HTML documentation
...
@@ -124,7 +124,7 @@ dokka {
...
@@ -124,7 +124,7 @@ dokka {
suppress
.
set
(
true
)
//suppress = true:完全禁用匹配包的文档生成
suppress
.
set
(
true
)
//suppress = true:完全禁用匹配包的文档生成
}
}
perPackageOption
{
perPackageOption
{
matchingRegex
.
set
(
".*core.*|.*fragments.*|.*scenario\\.mine.*|
.*tests.*|
overlay"
)
matchingRegex
.
set
(
".*core.*|.*fragments.*|.*scenario\\.mine.*|overlay"
)
suppress
.
set
(
true
)
//suppress = true:完全禁用匹配包的文档生成
suppress
.
set
(
true
)
//suppress = true:完全禁用匹配包的文档生成
}
}
perPackageOption
{
perPackageOption
{
...
...
mapapi/src/main/java/com/cusc/map/fragments/ForeMapFragment.kt
View file @
ab228446
...
@@ -27,7 +27,7 @@ import com.cusc.map.ui.MapReadyView
...
@@ -27,7 +27,7 @@ import com.cusc.map.ui.MapReadyView
//private const val ARG_PARAM2 = "param2"
//private const val ARG_PARAM2 = "param2"
/**
/**
*四维地图容器
*四维
二维
地图容器
*/
*/
class
ForeMapFragment
:
Fragment
()
{
class
ForeMapFragment
:
Fragment
()
{
// private var param1: String? = null
// private var param1: String? = null
...
...
mapapi/src/main/java/com/cusc/map/fragments/PartRoadFragment.kt
View file @
ab228446
...
@@ -45,6 +45,7 @@ class PartRoadFragment : Fragment() {
...
@@ -45,6 +45,7 @@ class PartRoadFragment : Fragment() {
}
}
private
fun
initView
()
{
private
fun
initView
()
{
//初始化四维局部图SDK
carRoadVM
.
webViewClient
=
CarAndRoadWebViewClient
(
binding
.
roadWebview
)
carRoadVM
.
webViewClient
=
CarAndRoadWebViewClient
(
binding
.
roadWebview
)
carRoadVM
.
webViewClient
?.
run
{
carRoadVM
.
webViewClient
?.
run
{
setDebugLogging
(
true
)
setDebugLogging
(
true
)
...
...
mapapi/src/main/java/com/cusc/map/fragments/UnityFragment.kt
View file @
ab228446
...
@@ -77,6 +77,7 @@ class UnityFragment : Fragment(), IUnityPlayerLifecycleEvents {
...
@@ -77,6 +77,7 @@ class UnityFragment : Fragment(), IUnityPlayerLifecycleEvents {
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
super
.
onCreate
(
savedInstanceState
)
//创建四维Unity SDK里的实例
mUnityPlayer
=
UnityPlayer
(
requireContext
(),
this
)
mUnityPlayer
=
UnityPlayer
(
requireContext
(),
this
)
}
}
...
...
mapapi/src/main/java/com/cusc/map/location/MineGpsLocation.kt
View file @
ab228446
...
@@ -54,7 +54,7 @@ internal object MineGpsLocation {
...
@@ -54,7 +54,7 @@ internal object MineGpsLocation {
}
}
//---------------四维回调---------------
//---------------四维
定位
回调---------------
private
var
mineLocationListener
=
object
:
MineLocationListener
{
private
var
mineLocationListener
=
object
:
MineLocationListener
{
override
fun
onSimLocationChanged
(
location
:
MineLocation
?)
{
override
fun
onSimLocationChanged
(
location
:
MineLocation
?)
{
}
}
...
...
mapapi/src/main/java/com/cusc/map/map2d/DrawInMap.kt
View file @
ab228446
...
@@ -8,7 +8,7 @@ import com.cusc.map.map2d.cdata.MapOverlay
...
@@ -8,7 +8,7 @@ import com.cusc.map.map2d.cdata.MapOverlay
import
com.cusc.map.map2d.mine.MineDrawInMap
import
com.cusc.map.map2d.mine.MineDrawInMap
/**绘制线选项**/
/**绘制线选项**/
class
Ms
PolylineOptions
{
class
PolylineOptions
{
/***填充颜色**/
/***填充颜色**/
var
fcolor
=
"#000000"
.
toColorInt
()
var
fcolor
=
"#000000"
.
toColorInt
()
...
@@ -39,7 +39,7 @@ class CircleOptionsM {
...
@@ -39,7 +39,7 @@ class CircleOptionsM {
}
}
/**绘制一个面选项**/
/**绘制一个面选项**/
class
Ms
PolygonOptions
{
class
PolygonOptions
{
/***填充颜色**/
/***填充颜色**/
var
fillColor
=
"#10FF00FF"
.
toColorInt
()
var
fillColor
=
"#10FF00FF"
.
toColorInt
()
...
@@ -88,7 +88,7 @@ object DrawInMap : MsOperationParent() {
...
@@ -88,7 +88,7 @@ object DrawInMap : MsOperationParent() {
* @return MSOverlay 覆盖物对象
* @return MSOverlay 覆盖物对象
*/
*/
fun
drawPolyline
(
fun
drawPolyline
(
msLatLng
:
List
<
LatLngM
>,
msPolylineOptions
:
Ms
PolylineOptions
msLatLng
:
List
<
LatLngM
>,
msPolylineOptions
:
PolylineOptions
):
MapOverlay
{
):
MapOverlay
{
val
mapReadView
=
getMapReadView
()
val
mapReadView
=
getMapReadView
()
when
(
MapSdkInit
.
getMapType
())
{
when
(
MapSdkInit
.
getMapType
())
{
...
@@ -142,7 +142,7 @@ object DrawInMap : MsOperationParent() {
...
@@ -142,7 +142,7 @@ object DrawInMap : MsOperationParent() {
*/
*/
fun
drawPolygon
(
fun
drawPolygon
(
msLatLng
:
List
<
LatLngM
>,
msLatLng
:
List
<
LatLngM
>,
msPolygonOptions
:
Ms
PolygonOptions
msPolygonOptions
:
PolygonOptions
):
MapOverlay
{
):
MapOverlay
{
val
mapReadView
=
getMapReadView
()
val
mapReadView
=
getMapReadView
()
when
(
MapSdkInit
.
getMapType
())
{
when
(
MapSdkInit
.
getMapType
())
{
...
...
mapapi/src/main/java/com/cusc/map/map2d/MapSdkInit.kt
View file @
ab228446
...
@@ -112,7 +112,7 @@ object MapSdkInit {
...
@@ -112,7 +112,7 @@ object MapSdkInit {
if
(
UserCtx
.
instance
.
wmtsUrl
.
isEmpty
()
==
false
)
{
if
(
UserCtx
.
instance
.
wmtsUrl
.
isEmpty
()
==
false
)
{
SDKInitializer
.
setStyleUrl
(
MineMap
.
UrlType
.
satellite
,
UserCtx
.
instance
.
wmtsUrl
)
SDKInitializer
.
setStyleUrl
(
MineMap
.
UrlType
.
satellite
,
UserCtx
.
instance
.
wmtsUrl
)
}
}
// 执行SDK初始化
// 执行
四维
SDK初始化
SDKInitializer
.
initialize
(
ctx
,
object
:
InitListener
{
SDKInitializer
.
initialize
(
ctx
,
object
:
InitListener
{
override
fun
onInitSuccess
()
{
override
fun
onInitSuccess
()
{
onSdkInitCb
?.
onInitSuccess
()
onSdkInitCb
?.
onInitSuccess
()
...
...
mapapi/src/main/java/com/cusc/map/map2d/MsOperationParent.kt
View file @
ab228446
...
@@ -4,7 +4,7 @@ import com.cusc.map.ui.MapReadyView
...
@@ -4,7 +4,7 @@ import com.cusc.map.ui.MapReadyView
import
com.cusc.map.utils.ToastHelper
import
com.cusc.map.utils.ToastHelper
//地图操作父类
//地图操作父类
internal
open
class
MsOperationParent
{
open
class
MsOperationParent
{
fun
getMapReadView
():
MapReadyView
?
{
fun
getMapReadView
():
MapReadyView
?
{
if
(
UserCtx
.
instance
.
mContext
==
null
)
{
if
(
UserCtx
.
instance
.
mContext
==
null
)
{
return
null
return
null
...
...
mapapi/src/main/java/com/cusc/map/map2d/amap/AmapDrawInMap.kt
View file @
ab228446
...
@@ -6,13 +6,13 @@ import com.amap.api.maps.model.BitmapDescriptorFactory
...
@@ -6,13 +6,13 @@ import com.amap.api.maps.model.BitmapDescriptorFactory
import
com.amap.api.maps.model.CircleOptions
import
com.amap.api.maps.model.CircleOptions
import
com.amap.api.maps.model.LatLng
import
com.amap.api.maps.model.LatLng
import
com.amap.api.maps.model.MarkerOptions
import
com.amap.api.maps.model.MarkerOptions
import
com.amap.api.maps.model.PolygonOptions
import
com.amap.api.maps.model.PolygonOptions
as
APolygonOptions
import
com.amap.api.maps.model.PolylineOptions
import
com.amap.api.maps.model.PolylineOptions
as
APolylineOptions
import
com.cusc.map.R
import
com.cusc.map.R
import
com.cusc.map.map2d.UserCtx
import
com.cusc.map.map2d.UserCtx
import
com.cusc.map.map2d.CircleOptionsM
import
com.cusc.map.map2d.CircleOptionsM
import
com.cusc.map.map2d.
Ms
PolygonOptions
import
com.cusc.map.map2d.PolygonOptions
import
com.cusc.map.map2d.
Ms
PolylineOptions
import
com.cusc.map.map2d.PolylineOptions
import
com.cusc.map.map2d.cdata.LatLngM
import
com.cusc.map.map2d.cdata.LatLngM
import
com.cusc.map.ui.MapReadyView
import
com.cusc.map.ui.MapReadyView
import
com.cusc.map.map2d.cdata.MapOverlay
import
com.cusc.map.map2d.cdata.MapOverlay
...
@@ -65,13 +65,13 @@ object AmapDrawInMap {
...
@@ -65,13 +65,13 @@ object AmapDrawInMap {
fun
drawPolyline
(
fun
drawPolyline
(
mapReadView
:
MapReadyView
?,
mapReadView
:
MapReadyView
?,
msLatLng
:
List
<
LatLngM
>,
msLatLng
:
List
<
LatLngM
>,
msPolylineOptions
:
Ms
PolylineOptions
msPolylineOptions
:
com
.
cusc
.
map
.
map2d
.
PolylineOptions
):
MapOverlay
{
):
MapOverlay
{
// 绘制高德地图的线
// 绘制高德地图的线
var
latLngs
=
msLatLng
.
map
{
var
latLngs
=
msLatLng
.
map
{
LatLng
(
it
.
lat
,
it
.
lng
)
LatLng
(
it
.
lat
,
it
.
lng
)
}
}
val
aOption
=
PolylineOptions
().
addAll
(
latLngs
)
val
aOption
=
A
PolylineOptions
().
addAll
(
latLngs
)
.
width
(
msPolylineOptions
.
width
)
.
width
(
msPolylineOptions
.
width
)
.
color
(
msPolylineOptions
.
fcolor
)
.
color
(
msPolylineOptions
.
fcolor
)
.
setDottedLine
(
msPolylineOptions
.
isDotted
)
.
setDottedLine
(
msPolylineOptions
.
isDotted
)
...
@@ -113,12 +113,12 @@ object AmapDrawInMap {
...
@@ -113,12 +113,12 @@ object AmapDrawInMap {
fun
drawPolygon
(
fun
drawPolygon
(
mapReadView
:
MapReadyView
?,
mapReadView
:
MapReadyView
?,
msLatLng
:
List
<
LatLngM
>,
msLatLng
:
List
<
LatLngM
>,
msPolygonOptions
:
Ms
PolygonOptions
msPolygonOptions
:
com
.
cusc
.
map
.
map2d
.
PolygonOptions
):
MapOverlay
{
):
MapOverlay
{
var
latLngs
=
msLatLng
.
map
{
var
latLngs
=
msLatLng
.
map
{
LatLng
(
it
.
lat
,
it
.
lng
)
LatLng
(
it
.
lat
,
it
.
lng
)
}
}
val
aPolygonOptions
=
PolygonOptions
().
apply
{
val
aPolygonOptions
=
A
PolygonOptions
().
apply
{
addAll
(
latLngs
)
addAll
(
latLngs
)
fillColor
(
msPolygonOptions
.
fillColor
)
fillColor
(
msPolygonOptions
.
fillColor
)
strokeWidth
(
msPolygonOptions
.
strokeWidth
)
strokeWidth
(
msPolygonOptions
.
strokeWidth
)
...
...
mapapi/src/main/java/com/cusc/map/map2d/mine/MineDrawInMap.kt
View file @
ab228446
...
@@ -4,14 +4,14 @@ import android.graphics.BitmapFactory
...
@@ -4,14 +4,14 @@ import android.graphics.BitmapFactory
import
androidx.core.graphics.toColorInt
import
androidx.core.graphics.toColorInt
import
com.minedata.minenavi.map.CircleOptions
import
com.minedata.minenavi.map.CircleOptions
import
com.minedata.minenavi.map.MarkerOptions
import
com.minedata.minenavi.map.MarkerOptions
import
com.minedata.minenavi.map.PolygonOptions
import
com.minedata.minenavi.map.PolygonOptions
as
MPolygonOptions
import
com.minedata.minenavi.map.PolylineOptions
import
com.minedata.minenavi.map.PolylineOptions
as
MPolylineOptions
import
com.minedata.minenavi.mapdal.LatLng
import
com.minedata.minenavi.mapdal.LatLng
import
com.cusc.map.R
import
com.cusc.map.R
import
com.cusc.map.map2d.UserCtx
import
com.cusc.map.map2d.UserCtx
import
com.cusc.map.map2d.CircleOptionsM
import
com.cusc.map.map2d.CircleOptionsM
import
com.cusc.map.map2d.
Ms
PolygonOptions
import
com.cusc.map.map2d.PolygonOptions
import
com.cusc.map.map2d.
Ms
PolylineOptions
import
com.cusc.map.map2d.PolylineOptions
import
com.cusc.map.map2d.cdata.LatLngM
import
com.cusc.map.map2d.cdata.LatLngM
import
com.cusc.map.map2d.cdata.MarkerM
import
com.cusc.map.map2d.cdata.MarkerM
import
com.cusc.map.map2d.cdata.MapOverlay
import
com.cusc.map.map2d.cdata.MapOverlay
...
@@ -24,7 +24,7 @@ internal object MineDrawInMap {
...
@@ -24,7 +24,7 @@ internal object MineDrawInMap {
/**
/**
* 绘制 marker 点
*
四维
绘制 marker 点
* @param mapReadView 地图准备就绪的视图对象
* @param mapReadView 地图准备就绪的视图对象
* @param lat 纬度坐标
* @param lat 纬度坐标
* @param lng 经度坐标
* @param lng 经度坐标
...
@@ -50,7 +50,7 @@ internal object MineDrawInMap {
...
@@ -50,7 +50,7 @@ internal object MineDrawInMap {
/**
/**
* 绘制线
*
四维
绘制线
* @param mapReadView 地图加载返回
* @param mapReadView 地图加载返回
* @param msLatLng 坐标点集合
* @param msLatLng 坐标点集合
* @param msPolylineOptions 绘制线选项
* @param msPolylineOptions 绘制线选项
...
@@ -58,13 +58,13 @@ internal object MineDrawInMap {
...
@@ -58,13 +58,13 @@ internal object MineDrawInMap {
fun
drawPolyline
(
fun
drawPolyline
(
mapReadView
:
MapReadyView
?,
mapReadView
:
MapReadyView
?,
msLatLng
:
List
<
LatLngM
>,
msLatLng
:
List
<
LatLngM
>,
msPolylineOptions
:
Ms
PolylineOptions
msPolylineOptions
:
com
.
cusc
.
map
.
map2d
.
PolylineOptions
):
MapOverlay
{
):
MapOverlay
{
// 绘制自定义地图的线
// 绘制自定义地图的线
var
latLngs
=
msLatLng
.
map
{
var
latLngs
=
msLatLng
.
map
{
LatLng
(
it
.
lat
,
it
.
lng
)
LatLng
(
it
.
lat
,
it
.
lng
)
}
}
var
options
=
PolylineOptions
()
var
options
=
M
PolylineOptions
()
// 添加顶点坐标
// 添加顶点坐标
.
addAll
(
latLngs
)
.
addAll
(
latLngs
)
.
width
(
msPolylineOptions
.
width
)
.
width
(
msPolylineOptions
.
width
)
...
@@ -77,7 +77,7 @@ internal object MineDrawInMap {
...
@@ -77,7 +77,7 @@ internal object MineDrawInMap {
}
}
/**绘制圆形
/**
四维
绘制圆形
* @param mapReadView 地图准备就绪视图对象
* @param mapReadView 地图准备就绪视图对象
* @param center 中心点坐标
* @param center 中心点坐标
* @param msCircleOptions 绘制圆形选项
* @param msCircleOptions 绘制圆形选项
...
@@ -110,13 +110,13 @@ internal object MineDrawInMap {
...
@@ -110,13 +110,13 @@ internal object MineDrawInMap {
fun
drawPolygon
(
fun
drawPolygon
(
mapReadView
:
MapReadyView
?,
mapReadView
:
MapReadyView
?,
msLatLng
:
List
<
LatLngM
>,
msLatLng
:
List
<
LatLngM
>,
msPolygonOptions
:
Ms
PolygonOptions
msPolygonOptions
:
com
.
cusc
.
map
.
map2d
.
PolygonOptions
):
MapOverlay
{
):
MapOverlay
{
var
latLngs
=
msLatLng
.
map
{
var
latLngs
=
msLatLng
.
map
{
LatLng
(
it
.
lat
,
it
.
lng
)
LatLng
(
it
.
lat
,
it
.
lng
)
}
}
// 声明 多边形参数对象
// 声明 多边形参数对象
val
polygonOptions
=
PolygonOptions
().
apply
{
val
polygonOptions
=
M
PolygonOptions
().
apply
{
addAll
(
latLngs
)
addAll
(
latLngs
)
fillColor
(
msPolygonOptions
.
fillColor
)
fillColor
(
msPolygonOptions
.
fillColor
)
strokeWidth
(
msPolygonOptions
.
strokeWidth
)
strokeWidth
(
msPolygonOptions
.
strokeWidth
)
...
...
mapapi/src/main/java/com/cusc/map/map2d/mine/MineGestures.kt
View file @
ab228446
...
@@ -24,7 +24,7 @@ internal object MineGestures {
...
@@ -24,7 +24,7 @@ internal object MineGestures {
/**
/**
* 设置地图旋转手势是否可用
*
四维
设置地图旋转手势是否可用
* @param mapReadView 地图准备就绪视图对象
* @param mapReadView 地图准备就绪视图对象
* @param enable 是否启用旋转手势功能
* @param enable 是否启用旋转手势功能
*/
*/
...
@@ -35,7 +35,7 @@ internal object MineGestures {
...
@@ -35,7 +35,7 @@ internal object MineGestures {
/**
/**
* 设置地图倾斜手势功能的启用状态
*
四维
设置地图倾斜手势功能的启用状态
* @param mapReadView 地图准备就绪视图对象
* @param mapReadView 地图准备就绪视图对象
* @param enable 是否启用倾斜手势功能,true为启用,false为禁用
* @param enable 是否启用倾斜手势功能,true为启用,false为禁用
* */
* */
...
...
mapapi/src/main/java/com/cusc/map/map2d/mine/MineLayers.kt
View file @
ab228446
...
@@ -23,14 +23,14 @@ internal object MineLayers {
...
@@ -23,14 +23,14 @@ internal object MineLayers {
private
fun
switch2D
(
mMineMap
:
MineMap
?)
{
private
fun
switch2D
(
mMineMap
:
MineMap
?)
{
//切换为2D平面图
//
四维
切换为2D平面图
// mMineMap?.setElevation(90f)
// mMineMap?.setElevation(90f)
mMineMap
?.
setStyleClass
(
"DEFAULT"
)
mMineMap
?.
setStyleClass
(
"DEFAULT"
)
mMineMap
?.
enableSatelliteLayer
(
false
)
mMineMap
?.
enableSatelliteLayer
(
false
)
}
}
private
fun
switchSatelliteLayer
(
mMineMap
:
MineMap
?)
{
private
fun
switchSatelliteLayer
(
mMineMap
:
MineMap
?)
{
//切换为卫星图
//
四维
切换为卫星图
mMineMap
?.
setSatelliteImageType
(
MineMap
.
SatelliteImageSource
.
bing
,
CoordType
.
GCJ02
)
mMineMap
?.
setSatelliteImageType
(
MineMap
.
SatelliteImageSource
.
bing
,
CoordType
.
GCJ02
)
mMineMap
?.
setStyleClass
(
"SATELLITE"
)
mMineMap
?.
setStyleClass
(
"SATELLITE"
)
mMineMap
?.
enableSatelliteLayer
(
true
)
mMineMap
?.
enableSatelliteLayer
(
true
)
...
...
mapapi/src/main/java/com/cusc/map/tests/AbsMap.kt
deleted
100644 → 0
View file @
a8779687
package
com.cusc.map.tests
abstract
class
AbsMap
:
IMap
{
}
\ No newline at end of file
mapapi/src/main/java/com/cusc/map/tests/IMap.kt
deleted
100644 → 0
View file @
a8779687
package
com.cusc.map.tests
interface
IMap
{
fun
getMap
():
Int
}
\ No newline at end of file
mapapi/src/main/java/com/cusc/map/ui/MapView.kt
View file @
ab228446
...
@@ -42,10 +42,10 @@ class MapView : LinearLayout {
...
@@ -42,10 +42,10 @@ class MapView : LinearLayout {
private
lateinit
var
binding
:
MultiViewBinding
private
lateinit
var
binding
:
MultiViewBinding
//四维
在线
地图
//四维
二维
地图
private
val
foreMapFragment
by
lazy
{
ForeMapFragment
.
newInstance
()
}
private
val
foreMapFragment
by
lazy
{
ForeMapFragment
.
newInstance
()
}
//四维
高精
地图
//四维
三维
地图
private
val
unityFragment
by
lazy
{
UnityFragment
.
newInstance
()
}
private
val
unityFragment
by
lazy
{
UnityFragment
.
newInstance
()
}
//四维局部地图
//四维局部地图
...
...
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