Commit 6b587c56 authored by p x's avatar p x
Browse files

实现UML设计

parent f8483b51
package com.sd.maplibrary.factorys
import com.sd.maplibrary.bean.MSLatLng
import com.sd.maplibrary.bean.WayPoi
import com.sd.maplibrary.core.MapReadyView
import com.sd.maplibrary.core.basic.mine.MineRoutePlans
import com.sd.maplibrary.core.basic.mine.MineToggleLayers
/**
* 四维基础地图实现
*/
class MineBasic : IBasicMap {
override fun toggleLayers(mapReadView: MapReadyView?, type: Int) {
MineToggleLayers.toggleLayers(mapReadView, type)
}
override fun drivingPathPlanning(
starPoint: MSLatLng,
startName: String,
endPoint: MSLatLng,
endName: String,
ways: List<WayPoi>,
mapReadView: MapReadyView?
) {
MineRoutePlans.drivingPathPlanning(starPoint, startName, endPoint, endName, ways, mapReadView)
}
companion object {
val mineBasic: MineBasic by lazy { MineBasic() }
}
}
\ No newline at end of file
......@@ -46,14 +46,14 @@ class ForeMapFragment : Fragment() {
//跳转到搜索界面
private var searchAct =
/* private var searchAct =
registerForActivityResult(ActivityResultContracts.StartActivityForResult(), { result ->
if (result.resultCode == Activity.RESULT_OK) {
val intent = result.data
val returnedData = intent?.getStringExtra("123")
Log.d("----", "----Returned data: $returnedData")
}
})
})*/
private var mMineMap: MineMap? = null
......
package com.sd.maplibrary.intfaces
/***高德实现类***/
class AMapCore: MapFuncs {
companion object {
val aMapCore:AMapCore by lazy { AMapCore() }
}
}
\ No newline at end of file
package com.sd.maplibrary.intfaces
/****Map 业务接口**/
interface MapFuncs {
}
\ No newline at end of file
package com.sd.maplibrary.intfaces
/****四维实现类***/
class MineCore : MapFuncs {
companion object {
val mineCore:MineCore by lazy { MineCore() }
}
}
\ No newline at end of file
......@@ -10,7 +10,7 @@ import com.minedata.minenavi.mapdal.InitializationException
import javax.microedition.khronos.egl.EGLConfig
import javax.microedition.khronos.opengles.GL10
/***四维地图**/
/**四维在线地图容器**/
class ForeMapView : MapView {
constructor(context: Context?) : super(context)
......
......@@ -16,7 +16,7 @@ import com.sd.maplibrary.databinding.MultiViewBinding
import com.sd.maplibrary.fragments.AMapFragment
import com.sd.maplibrary.fragments.ForeMapFragment
/**多底图容器**/
class MapMultiView : LinearLayout {
constructor(context: Context?) : super(context) {
......@@ -57,8 +57,8 @@ class MapMultiView : LinearLayout {
// }
enmuValue = MSDKInitializer.getMapType().ordinal
println("------------MapMultiView = ${MSDKInitializer.getMapType().ordinal}")
println("------------enmuValue = $enmuValue")
// println("------------MapMultiView = ${MSDKInitializer.getMapType().ordinal}")
// println("------------enmuValue = $enmuValue")
binding = MultiViewBinding.inflate(LayoutInflater.from(context))
addView(binding.root)
loadMapFrament()
......@@ -79,7 +79,7 @@ class MapMultiView : LinearLayout {
}
/****地图加载监听回调*/
/**地图加载监听回调*/
fun addMapRenderCallback(onMapReadyLis: OnMapReadyLis) {
if (enmuValue == 0) {
foreMapFragment.addMapRenderCallback(onMapReadyLis)
......@@ -88,7 +88,7 @@ class MapMultiView : LinearLayout {
}
}
/****获取 mMineMap 或者 aMap ***/
/**获取 mMineMap 或者 aMap ***/
fun getAnyMap(): Any? {
if (enmuValue == 0) {
return foreMapFragment.getAnyMap() as MineMap
......
......@@ -13,8 +13,7 @@ import android.view.View.MeasureSpec
/**
*author:pc-20171125
*data:2019/11/7 16:08
* 显示工具
*/
object DisplayUtil {
fun getDpi(): Int {
......
package com.sd.shupathwebview.utils
package com.sd.maplibrary.utils
import android.content.ContentValues
import android.content.Context
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment