[charter_p]
[乘客屏 处理点击事件]
This commit is contained in:
yangyakun
2024-01-22 18:07:45 +08:00
parent e033fe412f
commit 48bde19b5b
4 changed files with 75 additions and 10 deletions

View File

@@ -163,12 +163,8 @@ class MainFragment : MvpFragment<MainFragment?, BusPassengerPresenter?>(), IMogo
}
aciv_map_2_default.setOnClickListener {
omvOverMap.displayCustomOverView()
val controller = getMapUIController()
if (controller != null) {
//切换到地图中间
controller.changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT, null)
// 切换缩放到中视角
controller.changeZoom2(0.8f)
mapBizView.getUI()?.let {
it.changeMapVisualAngle(it.getVrAngleDefaultMode(), null)
}
}
MogoMapListenerHandler.mogoMapListenerHandler.registerHostMapListener(TAG, this)

View File

@@ -0,0 +1,57 @@
package com.mogo.och.charter.passenger.ui.map
import android.content.Context
import android.os.Bundle
import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.MotionEvent
import android.widget.FrameLayout
import com.mogo.eagle.core.function.view.MapBizView
import com.mogo.map.uicontroller.IMogoMapUIController
import com.mogo.och.charter.passenger.R
class BizMapView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : FrameLayout(context, attrs, defStyleAttr) {
private lateinit var mapBizView: MapBizView
init {
LayoutInflater.from(context).inflate(R.layout.charter_p_bizmap, this, true)
mapBizView = findViewById(R.id.bizMapView)
}
override fun onInterceptTouchEvent(ev: MotionEvent?): Boolean {
return true
}
fun getUI(): IMogoMapUIController? {
return mapBizView.getUI()
}
fun onCreate(bundle: Bundle?) {
mapBizView.onCreate(bundle)
}
fun onResume() {
mapBizView.onResume()
}
fun onSaveInstanceState(outState: Bundle){
mapBizView.onSaveInstanceState(outState)
}
fun onLowMemory() {
mapBizView.onLowMemory()
}
fun onPause() {
mapBizView.onPause()
}
fun onDestroy() {
mapBizView.onDestroy()
}
}

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:parentTag="FrameLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.mogo.eagle.core.function.view.MapBizView
android:id="@+id/bizMapView"
app:styleMode="MAP_STYLE_DAY_VR"
app:isWeatherEnable="false"
app:locationIcon3DRes="@raw/m1"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</merge>

View File

@@ -4,13 +4,10 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.mogo.eagle.core.function.view.MapBizView
<com.mogo.och.charter.passenger.ui.map.BizMapView
android:id="@+id/mapBizView"
android:layout_width="0dp"
app:layout_constraintWidth_percent="0.6045"
app:styleMode="MAP_STYLE_DAY_VR"
app:isWeatherEnable="false"
app:locationIcon3DRes="@raw/m1"
android:layout_height="match_parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"