From 461e860424537aa84748dc7355c0d94f45e23516 Mon Sep 17 00:00:00 2001 From: cczhr <464591548@qq.com> Date: Fri, 16 Apr 2021 16:07:15 +0800 Subject: [PATCH] clean up redundant files --- app/build.gradle | 1 - app/src/main/AndroidManifest.xml | 5 +- .../com/cczhr/otglocation/BaiduMapActivity.kt | 68 ------------------- 3 files changed, 2 insertions(+), 72 deletions(-) delete mode 100644 app/src/main/java/com/cczhr/otglocation/BaiduMapActivity.kt diff --git a/app/build.gradle b/app/build.gradle index 3a1ac14..760dc59 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -43,7 +43,6 @@ android { } dependencies { - implementation(name:'BaiduLBS_AndroidSDK_Lib', ext:'aar') implementation 'com.google.android.material:material:1.3.0' implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" implementation 'androidx.core:core-ktx:1.3.2' diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index cd54d62..2b7a8da 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -44,8 +44,7 @@ - - + @@ -57,7 +56,7 @@ - + \ No newline at end of file diff --git a/app/src/main/java/com/cczhr/otglocation/BaiduMapActivity.kt b/app/src/main/java/com/cczhr/otglocation/BaiduMapActivity.kt deleted file mode 100644 index f1dcc85..0000000 --- a/app/src/main/java/com/cczhr/otglocation/BaiduMapActivity.kt +++ /dev/null @@ -1,68 +0,0 @@ -package com.cczhr.otglocation - -import com.baidu.location.BDAbstractLocationListener -import com.baidu.location.BDLocation -import com.baidu.location.LocationClient -import com.baidu.location.LocationClientOption -import com.baidu.mapapi.map.BaiduMap -import kotlinx.android.synthetic.main.activity_baidu_map.* - -/** - * @author cczhr - * @description - * @since 2021/3/26 11:45 - */ -class BaiduMapActivity :BaseActivity() { - override val layoutId: Int = R.layout.activity_baidu_map - - lateinit var baiduMap: BaiduMap - - lateinit var locationClient:LocationClient - override fun init() { - locationClient=LocationClient(this) - locationClient.locOption= LocationClientOption().apply { - isOpenGps=true - coorType="gcj02" - scanSpan=1000 - } - locationClient.registerLocationListener(object :BDAbstractLocationListener(){ - override fun onReceiveLocation(location: BDLocation?) { - - - - - } - - }) - baiduMap=map_view.map - baiduMap.isMyLocationEnabled=true - - - locationClient.start() - } - - - override fun onResume() { - map_view.onResume() - super.onResume() - - } - - - override fun onPause() { - map_view.onPause() - super.onPause() - - } - - - override fun onDestroy() { - locationClient.stop() - baiduMap.isMyLocationEnabled=false - map_view.onDestroy() - super.onDestroy() - - } - - -} \ No newline at end of file