增加自动定位开关
This commit is contained in:
parent
58f5329a75
commit
392fb91215
@ -59,6 +59,11 @@ class Constant {
|
||||
|
||||
const val DEBUG = true
|
||||
|
||||
/**
|
||||
* 是否自动定位
|
||||
*/
|
||||
var AUTO_LOCATION = false
|
||||
|
||||
var IS_VIDEO_SPEED by kotlin.properties.Delegates.notNull<Boolean>()
|
||||
|
||||
const val message_status_late = "预约,待发送"
|
||||
|
@ -352,6 +352,10 @@ class MainViewModel @Inject constructor(
|
||||
)
|
||||
)
|
||||
}
|
||||
if(Constant.AUTO_LOCATION){
|
||||
mapController.mMapView.vtmMap.animator()
|
||||
.animateTo(GeoPoint( location.longitude, location.latitude))
|
||||
}
|
||||
}
|
||||
}
|
||||
//显示轨迹图层
|
||||
|
@ -17,6 +17,7 @@ import com.github.k1rakishou.fsaf.callback.FSAFActivityCallbacks
|
||||
import com.github.k1rakishou.fsaf.callback.FileChooserCallback
|
||||
import com.navinfo.collect.library.data.entity.TaskBean
|
||||
import com.navinfo.collect.library.map.NIMapController
|
||||
import com.navinfo.omqs.Constant
|
||||
import com.navinfo.omqs.R
|
||||
import com.navinfo.omqs.databinding.FragmentPersonalCenterBinding
|
||||
import com.navinfo.omqs.db.ImportOMDBHelper
|
||||
@ -114,6 +115,12 @@ class PersonalCenterFragment(private var indoorDataListener: ((Boolean) -> Unit?
|
||||
}
|
||||
})
|
||||
}
|
||||
R.id.personal_center_menu_open_auto_location -> {
|
||||
Constant.AUTO_LOCATION = true
|
||||
}
|
||||
R.id.personal_center_menu_close_auto_location -> {
|
||||
Constant.AUTO_LOCATION = false
|
||||
}
|
||||
R.id.personal_center_menu_test -> {
|
||||
viewModel.readRealmData()
|
||||
//108.90107116103331 34.29568928574205
|
||||
|
@ -56,6 +56,18 @@
|
||||
<!-- android:icon="@drawable/ic_baseline_layers_24"-->
|
||||
<!-- android:title="图层管理" />-->
|
||||
|
||||
<item
|
||||
android:id="@+id/personal_center_menu_open_auto_location"
|
||||
android:icon="@drawable/baseline_person_24"
|
||||
android:visible="true"
|
||||
android:title="开启自动定位" />
|
||||
|
||||
<item
|
||||
android:id="@+id/personal_center_menu_close_auto_location"
|
||||
android:icon="@drawable/baseline_person_24"
|
||||
android:visible="true"
|
||||
android:title="关闭自动定位" />
|
||||
|
||||
<item
|
||||
android:id="@+id/personal_center_menu_test"
|
||||
android:icon="@drawable/baseline_person_24"
|
||||
|
Loading…
x
Reference in New Issue
Block a user