diff --git a/build.gradle b/build.gradle
index bcde7f1aed..32a0f5815c 100644
--- a/build.gradle
+++ b/build.gradle
@@ -54,6 +54,14 @@ task clean(type: Delete) {
delete rootProject.buildDir
}
+task cleanAll(type: Delete){
+ group = "custom"
+ rootProject.allprojects {
+ println "delete ${it.buildDir}"
+ delete it.buildDir
+ }
+}
+
def getValueFromRootProperties(String key) {
File file = rootProject.file('gradle.properties')
String value = "";
diff --git a/foudations/build/jrebel/project-cleaned.marker b/foudations/build/jrebel/project-cleaned.marker
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/gradle.properties b/gradle.properties
index 95294f0192..b4058bc8c5 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -66,7 +66,7 @@ MOGO_MODULE_GUIDESHOW_PROVIDER_VERSION=1.0.2-SNAPSHOT
# 在线车辆F
MOGO_MODULE_ONLINECAR_VERSION=1.0.3.2
# v2x
-MOGO_MODULE_V2X_VERSION=1.0.8
+MOGO_MODULE_V2X_VERSION=1.0.9
# 媒体卡片
MOGO_MODULE_MEDIA_VERSION=1.0.4.4
# 推送
diff --git a/libraries/build/jrebel/project-cleaned.marker b/libraries/build/jrebel/project-cleaned.marker
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/libraries/map-baidu/.gitignore b/libraries/map-baidu/.gitignore
deleted file mode 100644
index 796b96d1c4..0000000000
--- a/libraries/map-baidu/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/build
diff --git a/libraries/map-baidu/build.gradle b/libraries/map-baidu/build.gradle
deleted file mode 100644
index 16897a579a..0000000000
--- a/libraries/map-baidu/build.gradle
+++ /dev/null
@@ -1,58 +0,0 @@
-apply plugin: 'com.android.library'
-
-android {
- compileSdkVersion rootProject.ext.android.compileSdkVersion
- // buildToolsVersion rootProject.ext.android.buildToolsVersion
- defaultConfig {
- minSdkVersion rootProject.ext.android.minSdkVersion
- targetSdkVersion rootProject.ext.android.targetSdkVersion
- versionCode Integer.valueOf(VERSION_CODE)
- versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION")
-
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- consumerProguardFiles 'consumer-rules.pro'
- }
-
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- }
- }
-
- sourceSets {
- main {
- jniLibs.srcDirs = ['libs']
- }
- }
-
-}
-
-repositories {
- flatDir {
- dirs 'libs'
- }
-}
-
-task copyLibs(type: Copy) {
- from configurations.compile
- into 'libs'
-}
-
-dependencies {
- implementation fileTree(dir: 'libs', include: ['*.jar'])
-
- implementation rootProject.ext.dependencies.androidxappcompat
-
- implementation project(':foudations:mogo-utils')
- implementation project(':libraries:mogo-map-api')
-
- implementation(name: 'onsdk_all', ext: 'aar') {
- transitive = true
- }
- implementation(name: 'NaviTts', ext: 'aar') {
- transitive = true
- }
-}
-
-apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
diff --git a/libraries/map-baidu/consumer-rules.pro b/libraries/map-baidu/consumer-rules.pro
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/libraries/map-baidu/gradle.properties b/libraries/map-baidu/gradle.properties
deleted file mode 100644
index f118c1b688..0000000000
--- a/libraries/map-baidu/gradle.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-GROUP=com.mogo.map
-POM_ARTIFACT_ID=map-baidu
-VERSION_CODE=1
diff --git a/libraries/map-baidu/libs/BaiduLBS_Android.jar b/libraries/map-baidu/libs/BaiduLBS_Android.jar
deleted file mode 100644
index 7a1224a266..0000000000
Binary files a/libraries/map-baidu/libs/BaiduLBS_Android.jar and /dev/null differ
diff --git a/libraries/map-baidu/libs/NaviTts.aar b/libraries/map-baidu/libs/NaviTts.aar
deleted file mode 100644
index e8c058c1c3..0000000000
Binary files a/libraries/map-baidu/libs/NaviTts.aar and /dev/null differ
diff --git a/libraries/map-baidu/libs/arm64-v8a/libBDSpeechDecoder_V1.so b/libraries/map-baidu/libs/arm64-v8a/libBDSpeechDecoder_V1.so
deleted file mode 100644
index a775b01c0e..0000000000
Binary files a/libraries/map-baidu/libs/arm64-v8a/libBDSpeechDecoder_V1.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/arm64-v8a/libBaiduMapSDK_base_v6_1_0.so b/libraries/map-baidu/libs/arm64-v8a/libBaiduMapSDK_base_v6_1_0.so
deleted file mode 100644
index c9c36f7183..0000000000
Binary files a/libraries/map-baidu/libs/arm64-v8a/libBaiduMapSDK_base_v6_1_0.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/arm64-v8a/libBaiduMapSDK_map_v6_1_0.so b/libraries/map-baidu/libs/arm64-v8a/libBaiduMapSDK_map_v6_1_0.so
deleted file mode 100644
index f4d488d753..0000000000
Binary files a/libraries/map-baidu/libs/arm64-v8a/libBaiduMapSDK_map_v6_1_0.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/arm64-v8a/libaime.so b/libraries/map-baidu/libs/arm64-v8a/libaime.so
deleted file mode 100644
index 9b5d0d4db9..0000000000
Binary files a/libraries/map-baidu/libs/arm64-v8a/libaime.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/arm64-v8a/libapp_BaiduMapApplib.so b/libraries/map-baidu/libs/arm64-v8a/libapp_BaiduMapApplib.so
deleted file mode 100644
index 091846e945..0000000000
Binary files a/libraries/map-baidu/libs/arm64-v8a/libapp_BaiduMapApplib.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/arm64-v8a/libapp_BaiduMapBaselib.so b/libraries/map-baidu/libs/arm64-v8a/libapp_BaiduMapBaselib.so
deleted file mode 100644
index 6f2b3e42d2..0000000000
Binary files a/libraries/map-baidu/libs/arm64-v8a/libapp_BaiduMapBaselib.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/arm64-v8a/libapp_BaiduNaviApplib.so b/libraries/map-baidu/libs/arm64-v8a/libapp_BaiduNaviApplib.so
deleted file mode 100755
index bd328dfd30..0000000000
Binary files a/libraries/map-baidu/libs/arm64-v8a/libapp_BaiduNaviApplib.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/arm64-v8a/libapp_BaiduVIlib.so b/libraries/map-baidu/libs/arm64-v8a/libapp_BaiduVIlib.so
deleted file mode 100644
index eeb1990cd9..0000000000
Binary files a/libraries/map-baidu/libs/arm64-v8a/libapp_BaiduVIlib.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/arm64-v8a/libbd_etts.so b/libraries/map-baidu/libs/arm64-v8a/libbd_etts.so
deleted file mode 100644
index abbd13cac2..0000000000
Binary files a/libraries/map-baidu/libs/arm64-v8a/libbd_etts.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/arm64-v8a/libcrypto.so b/libraries/map-baidu/libs/arm64-v8a/libcrypto.so
deleted file mode 100644
index 0125bd2d79..0000000000
Binary files a/libraries/map-baidu/libs/arm64-v8a/libcrypto.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/arm64-v8a/libgnustl_shared.so b/libraries/map-baidu/libs/arm64-v8a/libgnustl_shared.so
deleted file mode 100644
index be99b75ae5..0000000000
Binary files a/libraries/map-baidu/libs/arm64-v8a/libgnustl_shared.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/arm64-v8a/libindoor.so b/libraries/map-baidu/libs/arm64-v8a/libindoor.so
deleted file mode 100644
index bfb6f75dd0..0000000000
Binary files a/libraries/map-baidu/libs/arm64-v8a/libindoor.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/arm64-v8a/liblocSDK8a.so b/libraries/map-baidu/libs/arm64-v8a/liblocSDK8a.so
deleted file mode 100644
index cd47e1644e..0000000000
Binary files a/libraries/map-baidu/libs/arm64-v8a/liblocSDK8a.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/arm64-v8a/libmpcr.so b/libraries/map-baidu/libs/arm64-v8a/libmpcr.so
deleted file mode 100644
index a4682b0162..0000000000
Binary files a/libraries/map-baidu/libs/arm64-v8a/libmpcr.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/arm64-v8a/libssl.so b/libraries/map-baidu/libs/arm64-v8a/libssl.so
deleted file mode 100644
index 80b833c15b..0000000000
Binary files a/libraries/map-baidu/libs/arm64-v8a/libssl.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/armeabi-v7a/libBDSpeechDecoder_V1.so b/libraries/map-baidu/libs/armeabi-v7a/libBDSpeechDecoder_V1.so
deleted file mode 100644
index 1beda13fac..0000000000
Binary files a/libraries/map-baidu/libs/armeabi-v7a/libBDSpeechDecoder_V1.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/armeabi-v7a/libBaiduMapSDK_base_v6_1_0.so b/libraries/map-baidu/libs/armeabi-v7a/libBaiduMapSDK_base_v6_1_0.so
deleted file mode 100644
index 5c3881161b..0000000000
Binary files a/libraries/map-baidu/libs/armeabi-v7a/libBaiduMapSDK_base_v6_1_0.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/armeabi-v7a/libBaiduMapSDK_map_v6_1_0.so b/libraries/map-baidu/libs/armeabi-v7a/libBaiduMapSDK_map_v6_1_0.so
deleted file mode 100644
index b986b1f5ab..0000000000
Binary files a/libraries/map-baidu/libs/armeabi-v7a/libBaiduMapSDK_map_v6_1_0.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/armeabi-v7a/libaime.so b/libraries/map-baidu/libs/armeabi-v7a/libaime.so
deleted file mode 100644
index 7301642bdc..0000000000
Binary files a/libraries/map-baidu/libs/armeabi-v7a/libaime.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/armeabi-v7a/libapp_BaiduMapApplib.so b/libraries/map-baidu/libs/armeabi-v7a/libapp_BaiduMapApplib.so
deleted file mode 100644
index 38f467964e..0000000000
Binary files a/libraries/map-baidu/libs/armeabi-v7a/libapp_BaiduMapApplib.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/armeabi-v7a/libapp_BaiduMapBaselib.so b/libraries/map-baidu/libs/armeabi-v7a/libapp_BaiduMapBaselib.so
deleted file mode 100644
index 8578428812..0000000000
Binary files a/libraries/map-baidu/libs/armeabi-v7a/libapp_BaiduMapBaselib.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/armeabi-v7a/libapp_BaiduNaviApplib.so b/libraries/map-baidu/libs/armeabi-v7a/libapp_BaiduNaviApplib.so
deleted file mode 100755
index 428bd62e59..0000000000
Binary files a/libraries/map-baidu/libs/armeabi-v7a/libapp_BaiduNaviApplib.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/armeabi-v7a/libapp_BaiduVIlib.so b/libraries/map-baidu/libs/armeabi-v7a/libapp_BaiduVIlib.so
deleted file mode 100644
index 5f45e0dfac..0000000000
Binary files a/libraries/map-baidu/libs/armeabi-v7a/libapp_BaiduVIlib.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/armeabi-v7a/libbd_etts.so b/libraries/map-baidu/libs/armeabi-v7a/libbd_etts.so
deleted file mode 100644
index 34564fe71e..0000000000
Binary files a/libraries/map-baidu/libs/armeabi-v7a/libbd_etts.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/armeabi-v7a/libcrypto.so b/libraries/map-baidu/libs/armeabi-v7a/libcrypto.so
deleted file mode 100644
index b1b06dcba0..0000000000
Binary files a/libraries/map-baidu/libs/armeabi-v7a/libcrypto.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/armeabi-v7a/libgnustl_shared.so b/libraries/map-baidu/libs/armeabi-v7a/libgnustl_shared.so
deleted file mode 100644
index 96c22a2586..0000000000
Binary files a/libraries/map-baidu/libs/armeabi-v7a/libgnustl_shared.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/armeabi-v7a/libindoor.so b/libraries/map-baidu/libs/armeabi-v7a/libindoor.so
deleted file mode 100644
index b59be91e9a..0000000000
Binary files a/libraries/map-baidu/libs/armeabi-v7a/libindoor.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/armeabi-v7a/liblocSDK8a.so b/libraries/map-baidu/libs/armeabi-v7a/liblocSDK8a.so
deleted file mode 100644
index 0c6e58c5b0..0000000000
Binary files a/libraries/map-baidu/libs/armeabi-v7a/liblocSDK8a.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/armeabi-v7a/libmpcr.so b/libraries/map-baidu/libs/armeabi-v7a/libmpcr.so
deleted file mode 100644
index 64982f97f8..0000000000
Binary files a/libraries/map-baidu/libs/armeabi-v7a/libmpcr.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/armeabi-v7a/libssl.so b/libraries/map-baidu/libs/armeabi-v7a/libssl.so
deleted file mode 100644
index a355974d68..0000000000
Binary files a/libraries/map-baidu/libs/armeabi-v7a/libssl.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/armeabi/libBDSpeechDecoder_V1.so b/libraries/map-baidu/libs/armeabi/libBDSpeechDecoder_V1.so
deleted file mode 100644
index 1beda13fac..0000000000
Binary files a/libraries/map-baidu/libs/armeabi/libBDSpeechDecoder_V1.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/armeabi/libBaiduMapSDK_base_v6_1_0.so b/libraries/map-baidu/libs/armeabi/libBaiduMapSDK_base_v6_1_0.so
deleted file mode 100644
index 1563232805..0000000000
Binary files a/libraries/map-baidu/libs/armeabi/libBaiduMapSDK_base_v6_1_0.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/armeabi/libBaiduMapSDK_map_v6_1_0.so b/libraries/map-baidu/libs/armeabi/libBaiduMapSDK_map_v6_1_0.so
deleted file mode 100644
index 512604f711..0000000000
Binary files a/libraries/map-baidu/libs/armeabi/libBaiduMapSDK_map_v6_1_0.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/armeabi/libaime.so b/libraries/map-baidu/libs/armeabi/libaime.so
deleted file mode 100644
index 7301642bdc..0000000000
Binary files a/libraries/map-baidu/libs/armeabi/libaime.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/armeabi/libapp_BaiduMapApplib.so b/libraries/map-baidu/libs/armeabi/libapp_BaiduMapApplib.so
deleted file mode 100644
index 38f467964e..0000000000
Binary files a/libraries/map-baidu/libs/armeabi/libapp_BaiduMapApplib.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/armeabi/libapp_BaiduMapBaselib.so b/libraries/map-baidu/libs/armeabi/libapp_BaiduMapBaselib.so
deleted file mode 100644
index 8578428812..0000000000
Binary files a/libraries/map-baidu/libs/armeabi/libapp_BaiduMapBaselib.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/armeabi/libapp_BaiduNaviApplib.so b/libraries/map-baidu/libs/armeabi/libapp_BaiduNaviApplib.so
deleted file mode 100755
index 428bd62e59..0000000000
Binary files a/libraries/map-baidu/libs/armeabi/libapp_BaiduNaviApplib.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/armeabi/libapp_BaiduVIlib.so b/libraries/map-baidu/libs/armeabi/libapp_BaiduVIlib.so
deleted file mode 100644
index 5f45e0dfac..0000000000
Binary files a/libraries/map-baidu/libs/armeabi/libapp_BaiduVIlib.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/armeabi/libbd_etts.so b/libraries/map-baidu/libs/armeabi/libbd_etts.so
deleted file mode 100644
index 34564fe71e..0000000000
Binary files a/libraries/map-baidu/libs/armeabi/libbd_etts.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/armeabi/libcrypto.so b/libraries/map-baidu/libs/armeabi/libcrypto.so
deleted file mode 100644
index b1b06dcba0..0000000000
Binary files a/libraries/map-baidu/libs/armeabi/libcrypto.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/armeabi/libgnustl_shared.so b/libraries/map-baidu/libs/armeabi/libgnustl_shared.so
deleted file mode 100644
index 96c22a2586..0000000000
Binary files a/libraries/map-baidu/libs/armeabi/libgnustl_shared.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/armeabi/libindoor.so b/libraries/map-baidu/libs/armeabi/libindoor.so
deleted file mode 100644
index a0879cfddc..0000000000
Binary files a/libraries/map-baidu/libs/armeabi/libindoor.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/armeabi/liblocSDK8a.so b/libraries/map-baidu/libs/armeabi/liblocSDK8a.so
deleted file mode 100644
index 52869965c8..0000000000
Binary files a/libraries/map-baidu/libs/armeabi/liblocSDK8a.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/armeabi/libmpcr.so b/libraries/map-baidu/libs/armeabi/libmpcr.so
deleted file mode 100644
index 64982f97f8..0000000000
Binary files a/libraries/map-baidu/libs/armeabi/libmpcr.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/armeabi/libssl.so b/libraries/map-baidu/libs/armeabi/libssl.so
deleted file mode 100644
index a355974d68..0000000000
Binary files a/libraries/map-baidu/libs/armeabi/libssl.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/galaxy_lite_v2.3.jar b/libraries/map-baidu/libs/galaxy_lite_v2.3.jar
deleted file mode 100755
index 759d3dc92a..0000000000
Binary files a/libraries/map-baidu/libs/galaxy_lite_v2.3.jar and /dev/null differ
diff --git a/libraries/map-baidu/libs/intellij_annotations.jar b/libraries/map-baidu/libs/intellij_annotations.jar
deleted file mode 100755
index 9b77daace2..0000000000
Binary files a/libraries/map-baidu/libs/intellij_annotations.jar and /dev/null differ
diff --git a/libraries/map-baidu/libs/javapoet-1.9.0.jar b/libraries/map-baidu/libs/javapoet-1.9.0.jar
deleted file mode 100755
index 47887e3eac..0000000000
Binary files a/libraries/map-baidu/libs/javapoet-1.9.0.jar and /dev/null differ
diff --git a/libraries/map-baidu/libs/onsdk_all.aar b/libraries/map-baidu/libs/onsdk_all.aar
deleted file mode 100644
index 0fd4ddf7bd..0000000000
Binary files a/libraries/map-baidu/libs/onsdk_all.aar and /dev/null differ
diff --git a/libraries/map-baidu/libs/protobuf-java-2.3.0-micro.jar b/libraries/map-baidu/libs/protobuf-java-2.3.0-micro.jar
deleted file mode 100755
index 17e9a9dbc3..0000000000
Binary files a/libraries/map-baidu/libs/protobuf-java-2.3.0-micro.jar and /dev/null differ
diff --git a/libraries/map-baidu/libs/req_head.jar b/libraries/map-baidu/libs/req_head.jar
deleted file mode 100755
index a659589d89..0000000000
Binary files a/libraries/map-baidu/libs/req_head.jar and /dev/null differ
diff --git a/libraries/map-baidu/libs/x86/libBaiduMapSDK_base_v6_1_0.so b/libraries/map-baidu/libs/x86/libBaiduMapSDK_base_v6_1_0.so
deleted file mode 100644
index b8571364d2..0000000000
Binary files a/libraries/map-baidu/libs/x86/libBaiduMapSDK_base_v6_1_0.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/x86/libBaiduMapSDK_map_v6_1_0.so b/libraries/map-baidu/libs/x86/libBaiduMapSDK_map_v6_1_0.so
deleted file mode 100644
index 139987a006..0000000000
Binary files a/libraries/map-baidu/libs/x86/libBaiduMapSDK_map_v6_1_0.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/x86/libindoor.so b/libraries/map-baidu/libs/x86/libindoor.so
deleted file mode 100644
index 1de0a2c2d6..0000000000
Binary files a/libraries/map-baidu/libs/x86/libindoor.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/x86/liblocSDK8a.so b/libraries/map-baidu/libs/x86/liblocSDK8a.so
deleted file mode 100644
index cc244659ef..0000000000
Binary files a/libraries/map-baidu/libs/x86/liblocSDK8a.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/x86_64/libBaiduMapSDK_base_v6_1_0.so b/libraries/map-baidu/libs/x86_64/libBaiduMapSDK_base_v6_1_0.so
deleted file mode 100644
index 093ca822e0..0000000000
Binary files a/libraries/map-baidu/libs/x86_64/libBaiduMapSDK_base_v6_1_0.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/x86_64/libBaiduMapSDK_map_v6_1_0.so b/libraries/map-baidu/libs/x86_64/libBaiduMapSDK_map_v6_1_0.so
deleted file mode 100644
index 87dfc41479..0000000000
Binary files a/libraries/map-baidu/libs/x86_64/libBaiduMapSDK_map_v6_1_0.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/x86_64/libindoor.so b/libraries/map-baidu/libs/x86_64/libindoor.so
deleted file mode 100644
index 80a00c6827..0000000000
Binary files a/libraries/map-baidu/libs/x86_64/libindoor.so and /dev/null differ
diff --git a/libraries/map-baidu/libs/x86_64/liblocSDK8a.so b/libraries/map-baidu/libs/x86_64/liblocSDK8a.so
deleted file mode 100644
index b66eb9a5e8..0000000000
Binary files a/libraries/map-baidu/libs/x86_64/liblocSDK8a.so and /dev/null differ
diff --git a/libraries/map-baidu/proguard-rules.pro b/libraries/map-baidu/proguard-rules.pro
deleted file mode 100644
index f1b424510d..0000000000
--- a/libraries/map-baidu/proguard-rules.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-# Add project specific ProGuard rules here.
-# You can control the set of applied configuration files using the
-# proguardFiles setting in build.gradle.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
-
-# Uncomment this to preserve the line number information for
-# debugging stack traces.
-#-keepattributes SourceFile,LineNumberTable
-
-# If you keep the line number information, uncomment this to
-# hide the original source file name.
-#-renamesourcefileattribute SourceFile
diff --git a/libraries/map-baidu/src/main/AndroidManifest.xml b/libraries/map-baidu/src/main/AndroidManifest.xml
deleted file mode 100644
index aadb320f53..0000000000
--- a/libraries/map-baidu/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
- * 描述 - */ -public class BMap { - - public static void init( Context context ) { - SDKInitializer.initialize( context.getApplicationContext() ); - } -} diff --git a/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/BMapBaseMapView.java b/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/BMapBaseMapView.java deleted file mode 100644 index d612ac84aa..0000000000 --- a/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/BMapBaseMapView.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.mogo.map.impl.baidu; - -import android.content.Context; -import android.util.AttributeSet; - -import androidx.annotation.Nullable; - -import com.baidu.mapapi.SDKInitializer; -import com.baidu.mapapi.map.MapView; -import com.mogo.map.IMogoMapView; -import com.mogo.map.MogoBaseMapView; - -/** - * @author congtaowang - * @since 2019-12-25 - *
- * 描述 - */ -public class BMapBaseMapView extends MogoBaseMapView { - - public BMapBaseMapView( Context context ) { - super( context ); - init( context ); - } - - public BMapBaseMapView( Context context, @Nullable AttributeSet attrs ) { - super( context, attrs ); - init( context ); - } - - public BMapBaseMapView( Context context, @Nullable AttributeSet attrs, int defStyleAttr ) { - super( context, attrs, defStyleAttr ); - init( context ); - } - - private void init( Context context ) { - - } - - @Override - protected IMogoMapView createMapView( Context context ) { - return new BMapViewWrapper( new MapView( context ) ); - } -} diff --git a/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/BMapMarkerClickHandler.java b/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/BMapMarkerClickHandler.java deleted file mode 100644 index c9729530db..0000000000 --- a/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/BMapMarkerClickHandler.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.mogo.map.impl.baidu; - -import com.baidu.mapapi.map.Marker; -import com.mogo.map.impl.baidu.marker.BMapMarkerMap; -import com.mogo.map.marker.IMogoMarker; -import com.mogo.map.marker.IMogoMarkerClickListener; - -/** - * @author congtaowang - * @since 2019-12-24 - *
- * marker 点击事件处理 - */ -public class BMapMarkerClickHandler { - - public boolean handleMarkerClicked( Marker marker ) { - IMogoMarker iMogoMarker = BMapMarkerMap.get( marker ); - if ( iMogoMarker != null ) { - IMogoMarkerClickListener listener = iMogoMarker.getOnMarkerClickListener(); - if ( listener != null ) { - return listener.onMarkerClicked( iMogoMarker ); - } - } - return false; - } -} diff --git a/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/BMapUiSettingsWrapper.java b/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/BMapUiSettingsWrapper.java deleted file mode 100644 index 05eaba5176..0000000000 --- a/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/BMapUiSettingsWrapper.java +++ /dev/null @@ -1,91 +0,0 @@ -package com.mogo.map.impl.baidu; - -import com.baidu.mapapi.map.UiSettings; -import com.mogo.map.IMogoUiSettings; - -import java.lang.reflect.Method; - -/** - * @author congtaowang - * @since 2019-12-18 - *
- * 代理高德地图UiSettings - */ -public class BMapUiSettingsWrapper implements IMogoUiSettings { - - private UiSettings mUiSettings; - - public BMapUiSettingsWrapper( UiSettings mUiSettings ) { - this.mUiSettings = mUiSettings; - } - - @Override - public void setScaleControlsEnabled( boolean enabled ) { - if ( mUiSettings != null ) { - mUiSettings.setScrollGesturesEnabled( enabled ); - } - } - - @Override - public void setZoomControlsEnabled( boolean enabled ) { - if ( mUiSettings != null ) { - mUiSettings.setZoomGesturesEnabled( enabled ); - } - } - - @Override - public void setCompassEnabled( boolean enabled ) { - if ( mUiSettings != null ) { - mUiSettings.setCompassEnabled( enabled ); - } - } - - @Override - public void setMyLocationButtonEnabled( boolean enabled ) { - } - - @Override - public void setScrollGesturesEnabled( boolean enabled ) { - if ( mUiSettings != null ) { - mUiSettings.setScrollGesturesEnabled( enabled ); - } - } - - @Override - public void setZoomGesturesEnabled( boolean enabled ) { - if ( mUiSettings != null ) { - mUiSettings.setZoomGesturesEnabled( enabled ); - } - } - - @Override - public void setTiltGesturesEnabled( boolean enabled ) { - if ( mUiSettings != null ) { - mUiSettings.setOverlookingGesturesEnabled( enabled ); - } - } - - @Override - public void setRotateGesturesEnabled( boolean enabled ) { - if ( mUiSettings != null ) { - mUiSettings.setRotateGesturesEnabled( enabled ); - } - } - - @Override - public void setAllGesturesEnabled( boolean enabled ) { - if ( mUiSettings != null ) { - mUiSettings.setAllGesturesEnabled( enabled ); - } - } - - @Override - public void setIndoorSwitchEnabled( boolean enabled ) { - // don't edit. - } - - @Override - public void setLogoEnable( boolean enabled ) { - // don't edit. - } -} diff --git a/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/BMapViewWrapper.java b/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/BMapViewWrapper.java deleted file mode 100644 index 2b1d1d08bf..0000000000 --- a/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/BMapViewWrapper.java +++ /dev/null @@ -1,144 +0,0 @@ -package com.mogo.map.impl.baidu; - -import android.content.Context; -import android.os.Bundle; -import android.view.MotionEvent; -import android.view.View; - -import com.baidu.mapapi.map.BaiduMap; -import com.baidu.mapapi.map.MapPoi; -import com.baidu.mapapi.map.MapView; -import com.baidu.mapapi.map.Marker; -import com.baidu.mapapi.model.LatLng; -import com.baidu.navisdk.adapter.BaiduNaviManagerFactory; -import com.mogo.map.IMogoMap; -import com.mogo.map.IMogoMapView; -import com.mogo.map.impl.baidu.utils.ObjectUtils; -import com.mogo.map.listener.MogoMapListenerHandler; - -/** - * @author congtaowang - * @since 2019-12-18 - *
- * 代理高德导航地图 - */ -public class BMapViewWrapper implements IMogoMapView, - BaiduMap.OnMarkerClickListener, - BaiduMap.OnMapLoadedCallback, - BaiduMap.OnMapTouchListener, - BaiduMap.OnMapClickListener { - - private final MapView mMapView; - private IMogoMap mIMap; - - private BMapMarkerClickHandler mMarkerClickHandler; - - private static final String TAG = "AMapNaviViewWrapper"; - - public BMapViewWrapper( MapView mapView ) { - this.mMapView = mapView; - mMarkerClickHandler = new BMapMarkerClickHandler(); - BaiduMap map = mMapView.getMap(); - if ( map != null ) { - map.setOnMarkerClickListener( this ); - map.setOnMapLoadedCallback( this ); - map.setOnMapClickListener( this ); - } - } - - private Context getContext() { - return mMapView.getContext(); - } - - @Override - public View getMapView() { - return mMapView; - } - - @Override - public IMogoMap getMap() { - if ( mMapView != null ) { - if ( mIMap == null ) { - mIMap = new BMapWrapper( mMapView.getMap() ); - } - } - return mIMap; - } - - @Override - public void onCreate( Bundle bundle ) { - if ( mMapView != null ) { - mMapView.onCreate( getContext(), bundle ); - } - if ( BaiduNaviManagerFactory.getRoutePlanManager().isRoutePlanOk() ) { - BaiduNaviManagerFactory.getRouteResultManager().onCreate( getContext() ); - } - } - - @Override - public void onResume() { - if ( mMapView != null ) { - mMapView.onResume(); - } - if ( BaiduNaviManagerFactory.getRoutePlanManager().isRoutePlanOk() ) { - BaiduNaviManagerFactory.getRouteResultManager().onResume(); - } - } - - @Override - public void onPause() { - if ( mMapView != null ) { - mMapView.onPause(); - } - if ( BaiduNaviManagerFactory.getRoutePlanManager().isRoutePlanOk() ) { - BaiduNaviManagerFactory.getRouteResultManager().onPause(); - } - } - - @Override - public void onDestroy() { - if ( mMapView != null ) { - mMapView.onDestroy(); - } - - if ( BaiduNaviManagerFactory.getRoutePlanManager().isRoutePlanOk() ) { - BaiduNaviManagerFactory.getRouteResultManager().onDestroy(); - } - } - - @Override - public void onSaveInstanceState( Bundle outState ) { - if ( mMapView != null ) { - mMapView.onSaveInstanceState( outState ); - } - } - - @Override - public void onLowMemory() { - } - - @Override - public boolean onMarkerClick( Marker marker ) { - return mMarkerClickHandler.handleMarkerClicked( marker ); - } - - @Override - public void onMapLoaded() { - MogoMapListenerHandler.getInstance().onMapLoaded(); - } - - @Override - public void onTouch( MotionEvent motionEvent ) { - MogoMapListenerHandler.getInstance().onTouch( motionEvent ); - } - - @Override - public void onMapClick( LatLng latLng ) { - MogoMapListenerHandler.getInstance().onMapClick( ObjectUtils.fromBMap( latLng ) ); - } - - @Override - public void onMapPoiClick( MapPoi mapPoi ) { - MogoMapListenerHandler.getInstance().onPOIClick( ObjectUtils.fromBMap( mapPoi ) ); - } -} diff --git a/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/BMapWrapper.java b/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/BMapWrapper.java deleted file mode 100644 index 78b81081fe..0000000000 --- a/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/BMapWrapper.java +++ /dev/null @@ -1,170 +0,0 @@ -package com.mogo.map.impl.baidu; - -import com.baidu.mapapi.map.BaiduMap; -import com.baidu.mapapi.map.Marker; -import com.baidu.mapapi.map.MarkerOptions; -import com.baidu.mapapi.map.Overlay; -import com.baidu.mapapi.map.OverlayOptions; -import com.mogo.map.IMogoMap; -import com.mogo.map.IMogoUiSettings; -import com.mogo.map.impl.baidu.marker.BMapMarkerWrapper; -import com.mogo.map.impl.baidu.utils.ObjectUtils; -import com.mogo.map.marker.IMogoMarker; -import com.mogo.map.marker.MogoMarkerOptions; -import com.mogo.map.marker.MogoMarkersHandler; -import com.mogo.utils.logger.Logger; - -import java.util.ArrayList; -import java.util.List; - -/** - * @author congtaowang - * @since 2019-12-18 - *
- * 代理高德AMap - */ -public class BMapWrapper implements IMogoMap { - - private static final String TAG = "BMapWrapper"; - - private BaiduMap mBMap; - private IMogoUiSettings mUiSettings; - - public BMapWrapper( BaiduMap map ) { - this.mBMap = map; - } - - @Override - public IMogoUiSettings getUiSettings() { - if ( mUiSettings == null ) { - mUiSettings = new BMapUiSettingsWrapper( mBMap.getUiSettings() ); - } - return null; - } - - @Override - public IMogoMarker addMarker( String tag, MogoMarkerOptions options ) { - if ( !checkBMap() ) { - return null; - } - MarkerOptions markerOptions = ObjectUtils.fromMogo( options ); - if ( markerOptions == null ) { - Logger.e( TAG, "marker参数为空" ); - return null; - } - final IMogoMarker mogoMarker = new BMapMarkerWrapper( ( Marker ) mBMap.addOverlay( markerOptions ) ); - MogoMarkersHandler.getInstance().add( tag, mogoMarker ); - return mogoMarker; - } - - @Override - public ArrayList< IMogoMarker > addMarkers( String tag, ArrayList< MogoMarkerOptions > options, boolean moveToCenter ) { - if ( !checkBMap() ) { - return null; - } - - if ( options == null || options.isEmpty() ) { - return null; - } - - List< Overlay > markers = null; - ArrayList< OverlayOptions > markerOptions = new ArrayList<>(); - ArrayList< IMogoMarker > mogoMarkers = new ArrayList<>(); - - for ( MogoMarkerOptions option : options ) { - if ( option == null ) { - continue; - } - MarkerOptions mo = ObjectUtils.fromMogo( option ); - if ( mo == null ) { - continue; - } - markerOptions.add( mo ); - } - if ( markerOptions.isEmpty() ) { - return null; - } - markers = mBMap.addOverlays( markerOptions ); - if ( markers == null || markers.isEmpty() ) { - return null; - } - for ( Overlay marker : markers ) { - if ( marker instanceof Marker ) { - mogoMarkers.add( new BMapMarkerWrapper( ( ( Marker ) marker ) ) ); - } - } - MogoMarkersHandler.getInstance().add( tag, mogoMarkers ); - return mogoMarkers; - } - - @Override - public void clear() { - if ( checkBMap() ) { - mBMap.clear(); - } - } - - @Override - public void clear( boolean isKeepMyLocationOverlay ) { - if ( checkBMap() ) { - mBMap.clear(); - } - } - - @Override - public void setPointToCenter( int x, int y ) { - if ( checkBMap() ) { - Logger.w( TAG, "百度地图未实现该方法 - setPointToCenter" ); - } - } - - @Override - public void setTouchPoiEnable( boolean touchPoiEnable ) { - if ( checkBMap() ) { - Logger.w( TAG, "百度地图未实现该方法 - setTouchPoiEnable" ); - } - } - - @Override - public void setTrafficEnable( boolean enable ) { - if ( checkBMap() ) { - mBMap.setTrafficEnabled( enable ); - } - } - - @Override - public void showBuildings( boolean enabled ) { - if ( checkBMap() ) { - Logger.w( TAG, "百度地图未实现该方法 - showBuildings" ); - } - } - - @Override - public void showIndoorMap( boolean enable ) { - if ( checkBMap() ) { - Logger.w( TAG, "百度地图未实现该方法 - showIndoorMap" ); - } - } - - @Override - public void showMapText( boolean enable ) { - if ( checkBMap() ) { - Logger.w( TAG, "百度地图未实现该方法 - showMapText" ); - } - } - - @Override - public void stopAnimation() { - if ( checkBMap() ) { - Logger.w( TAG, "百度地图未实现该方法 - stopAnimation" ); - } - } - - private boolean checkBMap() { - if ( mBMap == null ) { - Logger.e( TAG, "百度map实例为空,请检查" ); - return false; - } - return true; - } -} diff --git a/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/location/BLocationClient.java b/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/location/BLocationClient.java deleted file mode 100644 index b8278c2c57..0000000000 --- a/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/location/BLocationClient.java +++ /dev/null @@ -1,118 +0,0 @@ -package com.mogo.map.impl.baidu.location; - -import android.content.Context; - -import com.baidu.location.BDAbstractLocationListener; -import com.baidu.location.BDLocation; -import com.baidu.location.LocationClient; -import com.baidu.location.LocationClientOption; -import com.mogo.map.impl.baidu.utils.ObjectUtils; -import com.mogo.map.location.IMogoLocationClient; -import com.mogo.map.location.IMogoLocationListener; -import com.mogo.map.location.MogoLocation; -import com.mogo.utils.logger.Logger; - -import java.util.HashSet; -import java.util.Iterator; -import java.util.Set; - -/** - * @author congtaowang - * @since 2019-12-19 - *
- * 百度定位 - */ -public class BLocationClient implements IMogoLocationClient { - - private static final String TAG = "LocationClient"; - - private static volatile BLocationClient sInstance; - private static Set< IMogoLocationListener > sListeners = new HashSet<>( 10 ); - private static MogoLocation sLastLocation = new MogoLocation(); - - private BLocationClient( Context context ) { - mClient = new LocationClient( context ); - mClient.registerLocationListener( new InternalLocationListener() ); - sLastLocation = ObjectUtils.fromBMap( mClient.getLastKnownLocation() ); - } - - public static BLocationClient getInstance( Context context ) { - if ( sInstance == null ) { - synchronized ( BLocationClient.class ) { - if ( sInstance == null ) { - sInstance = new BLocationClient( context ); - } - } - } - return sInstance; - } - - private LocationClient mClient; - - @Override - public void start() { - start( 2_000L ); - } - - @Override - public void start( long interval ) { - stop(); - LocationClientOption option = new LocationClientOption(); - option.setLocationMode( LocationClientOption.LocationMode.Hight_Accuracy ); - option.setIsNeedAddress( true ); - option.setScanSpan( ( ( int ) interval ) ); - if ( mClient != null ) { - mClient.setLocOption( option ); - } - mClient.start(); - } - - @Override - public void stop() { - if ( mClient != null ) { - mClient.stop(); - } - } - - @Override - public void addLocationListener( IMogoLocationListener listener ) { - if ( listener != null ) { - synchronized ( sListeners ) { - sListeners.add( listener ); - } - } - } - - @Override - public void removeLocationListener( IMogoLocationListener listener ) { - if ( listener != null ) { - synchronized ( sListeners ) { - sListeners.remove( listener ); - } - } - } - - @Override - public MogoLocation getLastKnowLocation() { - return sLastLocation; - } - - private static class InternalLocationListener extends BDAbstractLocationListener { - @Override - public void onReceiveLocation( BDLocation bdLocation ) { - if ( bdLocation == null || - bdLocation.getLatitude() == 0.0D || - bdLocation.getLongitude() == 0.0D ) { - return; - } - Logger.d( TAG, bdLocation.toString() ); - sLastLocation = ObjectUtils.fromBMap( bdLocation ); - synchronized ( sListeners ) { - Iterator< IMogoLocationListener > listenerIterator = sListeners.iterator(); - while ( listenerIterator.hasNext() ) { - listenerIterator.next().onLocationChanged( sLastLocation.clone() ); - } - } - } - } -} diff --git a/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/marker/BMapMarkerMap.java b/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/marker/BMapMarkerMap.java deleted file mode 100644 index abef89e35a..0000000000 --- a/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/marker/BMapMarkerMap.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.mogo.map.impl.baidu.marker; - -import com.baidu.mapapi.map.Marker; -import com.mogo.map.marker.IMogoMarker; - -import java.util.HashMap; -import java.util.Map; - -/** - * @author congtaowang - * @since 2019-12-25 - *
- * 管理百度marker和mogoMarker的映射关系 - */ -public class BMapMarkerMap { - - private static Map< Marker, IMogoMarker > sMap = new HashMap<>(); - - public static void put( Marker marker, IMogoMarker mogoMarker ) { - sMap.put( marker, mogoMarker ); - } - - public static IMogoMarker get( Marker marker ) { - return sMap.get( marker ); - } - - public static IMogoMarker remove( Marker marker ) { - return sMap.remove( marker ); - } -} diff --git a/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/marker/BMapMarkerWrapper.java b/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/marker/BMapMarkerWrapper.java deleted file mode 100644 index 17ddb3fe4b..0000000000 --- a/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/marker/BMapMarkerWrapper.java +++ /dev/null @@ -1,239 +0,0 @@ -package com.mogo.map.impl.baidu.marker; - -import android.graphics.Bitmap; -import android.view.View; - -import com.baidu.mapapi.map.BitmapDescriptor; -import com.baidu.mapapi.map.BitmapDescriptorFactory; -import com.baidu.mapapi.map.InfoWindow; -import com.baidu.mapapi.map.Marker; -import com.baidu.mapapi.model.LatLng; -import com.mogo.map.MogoLatLng; -import com.mogo.map.impl.baidu.utils.ObjectUtils; -import com.mogo.map.marker.IMogoInfoWindowAdapter; -import com.mogo.map.marker.IMogoMarker; -import com.mogo.map.marker.IMogoMarkerClickListener; -import com.mogo.map.marker.MogoMarkerOptions; - -import java.util.ArrayList; - -/** - * @author congtaowang - * @since 2019-12-18 - *
- * 高德marker - */ -public class BMapMarkerWrapper implements IMogoMarker { - - private Marker mMarker; - private Object mObject; - private IMogoMarkerClickListener mMogoMarkerClickListener; - private IMogoInfoWindowAdapter mMogoInfoWindowAdapter; - - private boolean mIsDestroy = false; - - public BMapMarkerWrapper( Marker marker ) { - this.mMarker = marker; - if ( marker != null ) { - // 设置百度 marker 的object对象为 IMogoMarker 实例。!!!! - BMapMarkerMap.put( marker, this ); - } - } - - @Override - public void destroy() { - BMapMarkerMap.remove( mMarker ); - if ( mMarker != null ) { - mMarker.remove(); - mMarker = null; - } - mMogoInfoWindowAdapter = null; - mMogoMarkerClickListener = null; - mObject = null; - mIsDestroy = true; - } - - @Override - public void remove() { - destroy(); - } - - @Override - public void hideInfoWindow() { - if ( mMarker != null ) { - mMarker.hideInfoWindow(); - } - } - - @Override - public void setAlpha( float alpha ) { - if ( mMarker != null ) { - mMarker.setAlpha( alpha ); - } - } - - @Override - public void setAnchor( float anchorU, float anchorV ) { - if ( mMarker != null ) { - mMarker.setAnchor( anchorU, anchorV ); - } - } - - @Override - public void setDraggable( boolean paramBoolean ) { - if ( mMarker != null ) { - mMarker.setDraggable( paramBoolean ); - } - } - - @Override - public void setIcon( Bitmap icon ) { - if ( icon == null || icon.isRecycled() ) { - return; - } - if ( mMarker != null ) { - mMarker.setIcon( BitmapDescriptorFactory.fromBitmap( icon ) ); - } - } - - @Override - public void setIcons( ArrayList< Bitmap > icons ) { - if ( icons == null || icons.isEmpty() ) { - return; - } - ArrayList< BitmapDescriptor > descriptors = new ArrayList<>(); - for ( Bitmap icon : icons ) { - if ( icon == null || icon.isRecycled() ) { - continue; - } - descriptors.add( BitmapDescriptorFactory.fromBitmap( icon ) ); - } - if ( descriptors.isEmpty() ) { - return; - } - if ( mMarker != null ) { - mMarker.setIcons( descriptors ); - } - } - - @Override - public void setInfoWindowEnable( boolean enabled ) { - - } - - @Override - public void setMarkerOptions( MogoMarkerOptions opt ) { - } - - @Override - public void setObject( Object object ) { - mObject = object; - } - - @Override - public Object getObject() { - return mObject; - } - - @Override - public void setPeriod( int period ) { - if ( mMarker != null ) { - mMarker.setPeriod( period ); - } - } - - @Override - public void setPosition( double lat, double lng ) { - if ( mMarker != null ) { - mMarker.setPosition( new LatLng( lat, lng ) ); - } - } - - @Override - public MogoLatLng getPosition() { - if ( mMarker != null ) { - final LatLng latLng = mMarker.getPosition(); - return ObjectUtils.fromBMap( latLng ); - } - return null; - } - - @Override - public void setRotateAngle( float rotate ) { - if ( mMarker != null ) { - mMarker.setRotate( rotate ); - } - } - - @Override - public void setSnippet( String snippet ) { - - } - - @Override - public void setTitle( String title ) { - if ( mMarker != null ) { - mMarker.setTitle( title ); - } - } - - @Override - public void setToTop() { - if ( mMarker != null ) { - mMarker.setToTop(); - } - } - - @Override - public void setVisible( boolean visible ) { - if ( mMarker != null ) { - mMarker.setVisible( visible ); - } - } - - @Override - public void setZIndex( int zIndex ) { - if ( mMarker != null ) { - mMarker.setZIndex( zIndex ); - } - } - - @Override - public void showInfoWindow() { - if ( mMarker != null ) { - InfoWindow iw = mMarker.getInfoWindow(); - View infoWindowView = getInfoWindowAdapter().getInfoWindow( this ); - if ( iw == null ) { - iw = new InfoWindow( infoWindowView, mMarker.getPosition(), 0 ); - mMarker.showInfoWindow( iw ); - } else { - mMarker.updateInfoWindowView( infoWindowView ); - } - } - } - - @Override - public void setOnMarkerClickListener( IMogoMarkerClickListener listener ) { - mMogoMarkerClickListener = listener; - } - - @Override - public IMogoMarkerClickListener getOnMarkerClickListener() { - return mMogoMarkerClickListener; - } - - @Override - public void setInfoWindowAdapter( IMogoInfoWindowAdapter adapter ) { - mMogoInfoWindowAdapter = adapter; - } - - @Override - public IMogoInfoWindowAdapter getInfoWindowAdapter() { - return mMogoInfoWindowAdapter; - } - - @Override - public boolean isDestroyed() { - return mIsDestroy; - } -} diff --git a/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/navi/BMapNaviListenerAdapter.java b/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/navi/BMapNaviListenerAdapter.java deleted file mode 100644 index 6e0603f20b..0000000000 --- a/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/navi/BMapNaviListenerAdapter.java +++ /dev/null @@ -1,302 +0,0 @@ -package com.mogo.map.impl.baidu.navi; - -import android.graphics.Bitmap; -import android.view.View; - -import com.baidu.navisdk.adapter.IBNRouteGuideManager; -import com.baidu.navisdk.adapter.IBNaviListener; -import com.baidu.navisdk.adapter.IBNaviViewListener; -import com.baidu.navisdk.adapter.IBaiduNaviManager; -import com.baidu.navisdk.adapter.struct.BNHighwayInfo; -import com.baidu.navisdk.adapter.struct.BNRoadCondition; -import com.baidu.navisdk.adapter.struct.BNaviInfo; -import com.baidu.navisdk.adapter.struct.BNaviLocation; -import com.baidu.navisdk.ui.routeguide.model.RGLineItem; -import com.mogo.utils.logger.Logger; - -import java.util.List; - -/** - * @author congtaowang - * @since 2019-12-26 - *
- * 百度导航监听: 导航初始化,专业导航,导航事件,导航视图事件 - */ -public class BMapNaviListenerAdapter implements - IBaiduNaviManager.INaviInitListener, - IBNRouteGuideManager.OnNavigationListener, - IBNaviListener, - IBNaviViewListener { - - private static final String TAG = "BMapNaviListenerAdapter"; - - // 导航初始化 - - /** - * 授权校验结果 - * - * @param status 0 表示成功,其他表示失败 - * @param msg 具体授权校验失败信息 - */ - @Override - public void onAuthResult( int status, String msg ) { - if ( status != 0 ) { - Logger.i( TAG, "key校验失败:" + msg ); - } - } - - /** - * 百度导航初始化开始 - */ - @Override - public void initStart() { - Logger.i( TAG, "百度导航开始初始化" ); - } - - /** - * 百度导航初始化成功 - */ - @Override - public void initSuccess() { - Logger.i( TAG, "百度导航初始化成功" ); - } - - /** - * 百度导航初始化失败 - */ - @Override - public void initFailed( int errorCode ) { - Logger.i( TAG, "百度导航初始化失败:errorcode=" + errorCode ); - } - // 导航初始化 - end - - // 专业导航 - - @Override - public void onNaviGuideEnd() { - - } - - @Override - public void notifyOtherAction( int i, int i1, int i2, Object o ) { - - } - - // 专业导航 - end - - // 导航事件 - - /** - * 当前路名更新 - * - * @param name 当前道路名 - */ - @Override - public void onRoadNameUpdate( String name ) { - - } - - /** - * 距离目的地的剩余距离 - * - * @param remainDistance 剩余距离,单位米 - * @param remainTime 剩余时间,单位秒 - */ - @Override - public void onRemainInfoUpdate( int remainDistance, int remainTime ) { - - } - - /** - * 诱导信息 - * - * @param naviInfo 对应的诱导信息 - */ - @Override - public void onGuideInfoUpdate( BNaviInfo naviInfo ) { - - } - - /** - * 高速信息 - * - * @param action SHOW: 展示 HIDE: 消隐 UPDATE: 更新信息 - * @param info 对应的高速信息 - */ - @Override - public void onHighWayInfoUpdate( IBNaviListener.Action action, BNHighwayInfo info ) { - - } - - /** - * 快速路出口信息 - * - * @param action SHOW: 展示 HIDE: 消隐 UPDATE: 更新信息 - * @param name 快速路名称 - * @param dist 离快速路出口的距离 - * @param id 快速路ID - */ - @Override - public void onFastExitWayInfoUpdate( IBNaviListener.Action action, String name, int dist, String id ) { - - } - - /** - * 放大图回调接口 - * - * @param action 显示/刷新/隐藏动作 - * @param enlargeMap 放大图View - * @param remainDistance 剩余距离 - * @param progress 路口的进度 - * @param roadName 下一个路名 - * @param turnIcon 转向标 - */ - @Override - public void onEnlargeMapUpdate( IBNaviListener.Action action, View enlargeMap, String remainDistance, int progress, String roadName, Bitmap turnIcon ) { - - } - - /** - * 日夜模式改变 - * - * @param style DayNightMode.DAY: 白天 DayNightMode.NIGHT: 黑夜 - */ - @Override - public void onDayNightChanged( DayNightMode style ) { - - } - - /** - * 路况信息更新 - * - * @param v 车行驶的进度 单位为浮点类型,0-1为0%-100% - * @param items 路况信息 - */ - @Override - public void onRoadConditionInfoUpdate( double v, List< BNRoadCondition > items ) { - - } - - /** - * 主辅路、高架桥信息更新 - * - * @param type {@link com.baidu.navisdk.adapter.BNaviCommonParams.BNMainSideBridge} - */ - @Override - public void onMainSideBridgeUpdate( int type ) { - - } - - /** - * 车道线信息更新 - * - * @param action Action.SHOW:显示 Action.HIDE:消隐 - * @param laneItems 车道线数据 - */ - @Override - public void onLaneInfoUpdate( IBNaviListener.Action action, List< RGLineItem > laneItems ) { - - } - - - /** - * 速度信息 - * - * @param speed 车速 "--" 代表速度不可信,其他String返回值为数字 km/h - * @param isOverSpeed 是否超速 - */ - @Override - public void onSpeedUpdate( String speed, boolean isOverSpeed ) { - - } - - /** - * 到达目的地后回调函数 - */ - @Override - public void onArriveDestination() { - - } - - /** - * 驾车路径导航到达某个途经点的回调函数 - */ - @Override - public void onArrivedWayPoint( int index ) { - - } - - /** - * 位置变化 - * - * @param bNaviLocation - */ - @Override - public void onLocationChange( BNaviLocation bNaviLocation ) { - - } - - // 导航事件 — end - - // 导航视图事件 - - /** - * 诱导面板的点击事件 - */ - @Override - public void onMainInfoPanCLick() { - - } - - /** - * 界面左上角转向操作的点击回调 - */ - @Override - public void onNaviTurnClick() { - - } - - /** - * 全览按钮的点击回调 - */ - @Override - public void onFullViewButtonClick( boolean show ) { - - } - - /** - * 全览小窗口的点击 - */ - @Override - public void onFullViewWindowClick( boolean show ) { - - } - - /** - * 导航页面左下角退出按钮点击后的回调接口 - */ - @Override - public void onNaviBackClick() { - - } - - /** - * 底部中间部分点击事件 - */ - @Override - public void onBottomBarClick( IBNaviViewListener.Action action ) { - - } - - /** - * 界面右下角功能设置按钮的回调接口 - * - * @param isOpen 设置界面是否打开 - */ - @Override - public void onNaviSetting( boolean isOpen ) { - - } - - // 导航视图事件 - end -} diff --git a/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/navi/NaviClient.java b/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/navi/NaviClient.java deleted file mode 100644 index 923cd5f30e..0000000000 --- a/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/navi/NaviClient.java +++ /dev/null @@ -1,210 +0,0 @@ -package com.mogo.map.impl.baidu.navi; - -import android.content.Context; -import android.os.Bundle; -import android.os.Handler; -import android.os.Looper; -import android.os.Message; - -import com.baidu.navisdk.adapter.BNRoutePlanNode; -import com.baidu.navisdk.adapter.BaiduNaviManagerFactory; -import com.baidu.navisdk.adapter.IBNRoutePlanManager; -import com.mogo.map.MogoLatLng; -import com.mogo.map.impl.baidu.location.BLocationClient; -import com.mogo.map.location.MogoLocation; -import com.mogo.map.navi.IMogoNavi; -import com.mogo.map.navi.MogoNaviConfig; -import com.mogo.utils.TipToast; -import com.mogo.utils.logger.Logger; - -import java.util.ArrayList; -import java.util.List; - -/** - * @author congtaowang - * @since 2019-12-25 - *
- * 高德导航 - */ -public class NaviClient implements IMogoNavi { - - private static final String TAG = "NaviClient"; - private final Context mContext; - - private NaviListenerAdapter mBMapNaviListener; - - /** - * 导航策略配置 - */ - private MogoNaviConfig mMogoNaviConfig = new MogoNaviConfig(); - - private static volatile NaviClient sInstance; - - private NaviClient( Context context ) { - mContext = context; - mBMapNaviListener = new NaviListenerAdapter(); - BaiduNaviManagerFactory.getBaiduNaviManager().init( context, "", "", mBMapNaviListener ); - } - - public static NaviClient getInstance( Context context ) { - if ( sInstance == null ) { - synchronized ( NaviClient.class ) { - if ( sInstance == null ) { - sInstance = new NaviClient( context ); - } - } - } - return sInstance; - } - - public synchronized void release() { - sInstance = null; - } - - @Override - public void naviTo( MogoLatLng endPoint ) { - naviTo( endPoint, mMogoNaviConfig ); - } - - @Override - public void naviTo( MogoLatLng endPoint, MogoNaviConfig config ) { - naviTo( endPoint, null, config ); - } - - @Override - public void naviTo( MogoLatLng endPoint, List< MogoLatLng > wayPoints ) { - naviTo( endPoint, wayPoints, mMogoNaviConfig ); - } - - @Override - public void naviTo( MogoLatLng endPoint, List< MogoLatLng > wayPoints, MogoNaviConfig config ) { - if ( !checkAMapNavi() ) { - return; - } - Logger.i( TAG, "开始规划路径" ); - mMogoNaviConfig = config; - if ( mMogoNaviConfig == null ) { - mMogoNaviConfig = new MogoNaviConfig(); - } - MogoLocation location = BLocationClient.getInstance( mContext ).getLastKnowLocation(); - if ( location == null ) { - location = new MogoLocation(); - } - List< BNRoutePlanNode > nodes = new ArrayList<>(); - BNRoutePlanNode sNode = getBNRoutePlanNode( location ); - if ( sNode == null ) { - TipToast.shortTip( "起点错误,请开启定位功能" ); - return; - } - nodes.add( sNode ); - if ( wayPoints != null && !wayPoints.isEmpty() ) { - for ( MogoLatLng wayPoint : wayPoints ) { - if ( wayPoint == null ) { - continue; - } - nodes.add( getBNRoutePlanNode( wayPoint ) ); - } - } - BNRoutePlanNode eNode = getBNRoutePlanNode( endPoint ); - if ( eNode == null ) { - if ( sNode == null ) { - TipToast.shortTip( "终点错误,请确认" ); - return; - } - } - nodes.add( eNode ); - Bundle extras = new Bundle(); - - int strategy = IBNRoutePlanManager.RoutePlanPreference.ROUTE_PLAN_PREFERENCE_DEFAULT; - - BaiduNaviManagerFactory.getRoutePlanManager().routeplanToNavi( nodes, strategy, extras, new Handler( Looper.getMainLooper() ) { - @Override - public void handleMessage( Message msg ) { - switch ( msg.what ) { - case IBNRoutePlanManager.MSG_NAVI_ROUTE_PLAN_START: - Logger.i( TAG, "算路开始" ); - break; - case IBNRoutePlanManager.MSG_NAVI_ROUTE_PLAN_SUCCESS: - Logger.i( TAG, "算路成功" ); - break; - case IBNRoutePlanManager.MSG_NAVI_ROUTE_PLAN_FAILED: - Logger.i( TAG, "算路失败" ); - break; - case IBNRoutePlanManager.MSG_NAVI_ROUTE_PLAN_TO_NAVI: - Logger.i( TAG, "算路成功准备进入导航" ); - BaiduNaviManagerFactory.getRouteResultManager().startNavi(); - break; - default: - // nothing - break; - } - } - } ); - } - - private BNRoutePlanNode getBNRoutePlanNode( MogoLatLng latLng ) { - if ( latLng == null ) { - return null; - } - return new BNRoutePlanNode.Builder() - .latitude( latLng.lat ) - .longitude( latLng.lng ) - .coordinateType( BNRoutePlanNode.CoordinateType.GCJ02 ) - .build(); - } - - private BNRoutePlanNode getBNRoutePlanNode( MogoLocation latLng ) { - if ( latLng == null ) { - return null; - } - return new BNRoutePlanNode.Builder() - .latitude( latLng.getLatitude() ) - .longitude( latLng.getLongitude() ) - .coordinateType( BNRoutePlanNode.CoordinateType.GCJ02 ) - .build(); - } - - @Override - public void reCalculateRoute( MogoNaviConfig config ) { - if ( !checkAMapNavi() ) { - return; - } - mMogoNaviConfig = config; - if ( mMogoNaviConfig == null ) { - mMogoNaviConfig = new MogoNaviConfig(); - } -// int strategy = mAMapNavi.strategyConvert( mMogoNaviConfig.isCongestion(), mMogoNaviConfig.isAvoidSpeed(), mMogoNaviConfig.isCost(), mMogoNaviConfig.isHighSpeed(), config.isMultipleRoute() ); -// mAMapNavi.reCalculateRoute( strategy ); - } - - @Override - public void stopNavi() { - BaiduNaviManagerFactory.getRouteGuideManager().forceQuitNaviWithoutDialog(); - } - - @Override - public boolean isNaviing() { - if ( mBMapNaviListener != null ) { - return mBMapNaviListener.isNaviing(); - } - return false; - } - - // -- end - - private boolean checkAMapNavi() { -// if ( mAMapNavi == null ) { -//// throw new MogoMapException( new NullPointerException( "高德导航实例为空!!!" ) ); -// Logger.e( TAG, "高德导航实例为空!!!" ); -// return false; -// } - return true; - } - - public boolean isRealNavi() { - if ( mMogoNaviConfig != null ) { - return mMogoNaviConfig.isRealNavi(); - } - return true; - } -} diff --git a/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/navi/NaviListenerAdapter.java b/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/navi/NaviListenerAdapter.java deleted file mode 100644 index d9157a12f7..0000000000 --- a/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/navi/NaviListenerAdapter.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.mogo.map.impl.baidu.navi; - -/** - * @author congtaowang - * @since 2019-12-26 - *
- * 百度导航 - */ -public class NaviListenerAdapter extends BMapNaviListenerAdapter { - - private boolean isNaviing = false; - - public void setNaviing( boolean naviing ) { - isNaviing = naviing; - } - - public boolean isNaviing() { - return isNaviing; - } - - @Override - public void onArriveDestination() { - isNaviing = true; - super.onArriveDestination(); - } -} diff --git a/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/search/GeocodeSearchClient.java b/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/search/GeocodeSearchClient.java deleted file mode 100644 index 4682e6067d..0000000000 --- a/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/search/GeocodeSearchClient.java +++ /dev/null @@ -1,91 +0,0 @@ -package com.mogo.map.impl.baidu.search; - -import android.content.Context; - -import com.baidu.mapapi.search.geocode.GeoCodeOption; -import com.baidu.mapapi.search.geocode.GeoCodeResult; -import com.baidu.mapapi.search.geocode.GeoCoder; -import com.baidu.mapapi.search.geocode.OnGetGeoCoderResultListener; -import com.baidu.mapapi.search.geocode.ReverseGeoCodeOption; -import com.baidu.mapapi.search.geocode.ReverseGeoCodeResult; -import com.mogo.map.exception.MogoMapException; -import com.mogo.map.impl.baidu.utils.ObjectUtils; -import com.mogo.map.search.geo.IMogoGeoSearch; -import com.mogo.map.search.geo.IMogoGeoSearchListener; -import com.mogo.map.search.geo.MogoGeocodeAddress; -import com.mogo.map.search.geo.MogoRegeocodeAddress; -import com.mogo.map.search.geo.query.MogoGeocodeQuery; -import com.mogo.map.search.geo.query.MogoRegeocodeQuery; - -import java.util.List; - -/** - * @author congtaowang - * @since 2019-12-19 - *
- * 百度地理编码/逆地理编码 - */ -public class GeocodeSearchClient implements IMogoGeoSearch, OnGetGeoCoderResultListener { - - private GeoCoder mClient; - private IMogoGeoSearchListener mListener; - - public GeocodeSearchClient( Context context ) { - mClient = GeoCoder.newInstance(); - mClient.setOnGetGeoCodeResultListener( this ); - } - - @Override - public void setGeoSearchListener( IMogoGeoSearchListener listener ) { - mListener = listener; - } - - @Override - public MogoRegeocodeAddress getFromLocation( MogoRegeocodeQuery query ) throws MogoMapException { - throw new MogoMapException( "百度地图不支持同步获取逆地理位置编码" ); - } - - @Override - public List< MogoGeocodeAddress > getFromLocationName( MogoGeocodeQuery query ) throws MogoMapException { - throw new MogoMapException( "百度地图不支持同步获取地理位置编码" ); - } - - @Override - public void getFromLocationAsyn( MogoRegeocodeQuery query ) { - if ( mClient != null ) { - mClient.reverseGeoCode( new ReverseGeoCodeOption() - .location( ObjectUtils.fromMogo2( query.getPoint() ) ) - .newVersion( 1 ) - .radius( query.getRadius() ) ); - } - } - - @Override - public void getFromLocationNameAsyn( MogoGeocodeQuery query ) { - if ( mClient != null ) { - mClient.geocode( new GeoCodeOption() - .city( query.getCity() ) - .address( query.getLocationName() ) ); - } - } - - @Override - public void onGetGeoCodeResult( GeoCodeResult geoCodeResult ) { - if ( mListener != null ) { - mListener.onGeocodeSearched( ObjectUtils.fromBMap( geoCodeResult ) ); - } - } - - @Override - public void onGetReverseGeoCodeResult( ReverseGeoCodeResult reverseGeoCodeResult ) { - if ( mListener != null ) { - mListener.onRegeocodeSearched( ObjectUtils.fromBMap( reverseGeoCodeResult ) ); - } - } - - @Override - public void destroy() { - mClient = null; - mListener = null; - } -} diff --git a/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/search/InputtipsSearch.java b/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/search/InputtipsSearch.java deleted file mode 100644 index da18ad08f5..0000000000 --- a/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/search/InputtipsSearch.java +++ /dev/null @@ -1,90 +0,0 @@ -package com.mogo.map.impl.baidu.search; - -import android.content.Context; - -import com.baidu.mapapi.search.core.SearchResult; -import com.baidu.mapapi.search.sug.OnGetSuggestionResultListener; -import com.baidu.mapapi.search.sug.SuggestionResult; -import com.baidu.mapapi.search.sug.SuggestionSearch; -import com.baidu.mapapi.search.sug.SuggestionSearchOption; -import com.mogo.map.impl.baidu.utils.ObjectUtils; -import com.mogo.map.search.inputtips.IMogoInputtipsListener; -import com.mogo.map.search.inputtips.IMogoInputtipsSearch; -import com.mogo.map.search.inputtips.MogoTip; -import com.mogo.map.search.inputtips.query.MogoInputtipsQuery; -import com.mogo.utils.logger.Logger; - -import java.util.ArrayList; -import java.util.List; - -/** - * @author congtaowang - * @since 2019-12-20 - *
- * 百度地图 inputtips 搜索实现 - */ -public class InputtipsSearch implements IMogoInputtipsSearch, OnGetSuggestionResultListener { - - private static final String TAG = "InputtipsSearch"; - - private SuggestionSearch mClient; - private SuggestionSearchOption mQuery; - private IMogoInputtipsListener mListener; - - public InputtipsSearch( Context context, MogoInputtipsQuery query ) { - mQuery = ObjectUtils.fromMogo( query ); - mClient = SuggestionSearch.newInstance(); - mClient.setOnGetSuggestionResultListener( this ); - } - - @Override - public void setQuery( MogoInputtipsQuery query ) { - this.mQuery = ObjectUtils.fromMogo( query ); - } - - @Override - public void setInputtipsListener( IMogoInputtipsListener listener ) { - this.mListener = listener; - } - - @Override - public void requestInputtipsAsyn() { - if ( mClient != null ) { - mClient.requestSuggestion( mQuery ); - } - } - - @Override - public void onGetSuggestionResult( SuggestionResult suggestionResult ) { - if ( suggestionResult.error == SearchResult.ERRORNO.NO_ERROR ) { - if ( mListener != null ) { - mListener.onGetInputtips( getResult( suggestionResult.getAllSuggestions() ) ); - } - } else { - Logger.e( TAG, "errorcode = " + suggestionResult.error ); - } - } - - private List< MogoTip > getResult( List< SuggestionResult.SuggestionInfo > suggestionInfos ) { - List< MogoTip > mogoTips = new ArrayList<>(); - if ( suggestionInfos != null ) { - for ( SuggestionResult.SuggestionInfo tip : suggestionInfos ) { - MogoTip mogoTip = ObjectUtils.fromBMap( tip ); - if ( mogoTip != null ) { - mogoTips.add( mogoTip ); - } - } - } - return mogoTips; - } - - @Override - public void destroy() { - if ( mClient != null ) { - mClient.destroy(); - } - mClient = null; - mListener = null; - mQuery = null; - } -} diff --git a/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/search/PoiSearchClient.java b/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/search/PoiSearchClient.java deleted file mode 100644 index 759dc52bca..0000000000 --- a/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/search/PoiSearchClient.java +++ /dev/null @@ -1,99 +0,0 @@ -package com.mogo.map.impl.baidu.search; - -import android.content.Context; - -import com.baidu.mapapi.search.poi.OnGetPoiSearchResultListener; -import com.baidu.mapapi.search.poi.PoiDetailResult; -import com.baidu.mapapi.search.poi.PoiDetailSearchResult; -import com.baidu.mapapi.search.poi.PoiIndoorResult; -import com.baidu.mapapi.search.poi.PoiResult; -import com.baidu.mapapi.search.poi.PoiSearch; -import com.mogo.map.exception.MogoMapException; -import com.mogo.map.search.geo.MogoPoiItem; -import com.mogo.map.search.poisearch.IMogoPoiSearch; -import com.mogo.map.search.poisearch.IMogoPoiSearchListener; -import com.mogo.map.search.poisearch.MogoPoiResult; -import com.mogo.map.search.poisearch.MogoSearchBound; -import com.mogo.map.search.poisearch.query.MogoPoiSearchQuery; - -/** - * @author congtaowang - * @since 2019-12-24 - *
- * 百度poi搜索 - *
- */ -public class PoiSearchClient implements IMogoPoiSearch, OnGetPoiSearchResultListener { - - private static final String TAG = "PoiSearchClient"; - - private MogoPoiSearchQuery mQuery; - private PoiSearch mClient; - private IMogoPoiSearchListener mListener; - private MogoSearchBound mBound; - - public PoiSearchClient( Context context, MogoPoiSearchQuery query ) { - mQuery = query; - mClient = PoiSearch.newInstance(); - mClient.setOnGetPoiSearchResultListener( this ); - } - - @Override - public void setPoiSearchListener( IMogoPoiSearchListener listener ) { - mListener = listener; - } - - @Override - public void searchPOIAsyn() { - } - - @Override - public MogoPoiResult searchPOI() throws MogoMapException { - return null; - } - - @Override - public void setQuery( MogoPoiSearchQuery query ) { - } - - @Override - public MogoPoiItem searchPOIId( String poiId ) throws MogoMapException { - return null; - } - - @Override - public void searchPOIIdAsyn( String poiId ) { - } - - @Override - public void setBound( MogoSearchBound bound ) { - } - - @Override - public void onGetPoiResult( PoiResult poiResult ) { - - } - - @Override - public void onGetPoiDetailResult( PoiDetailResult poiDetailResult ) { - - } - - @Override - public void onGetPoiDetailResult( PoiDetailSearchResult poiDetailSearchResult ) { - - } - - @Override - public void onGetPoiIndoorResult( PoiIndoorResult poiIndoorResult ) { - - } - - @Override - public void destroy() { - mQuery = null; - mClient = null; - mListener = null; - mBound = null; - } -} diff --git a/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/utils/MapStyleUtils.java b/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/utils/MapStyleUtils.java deleted file mode 100644 index 97d25339e3..0000000000 --- a/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/utils/MapStyleUtils.java +++ /dev/null @@ -1,65 +0,0 @@ -package com.mogo.map.impl.baidu.utils; - -import android.graphics.Bitmap; -import android.graphics.Color; - -/** - * @author congtaowang - * @since 2019-10-04 - *
- * 描述 - */ -public class MapStyleUtils { - - enum ColorEnum { - route_overlay_line_normal( Color.parseColor( "#7AD9B4" ) ), - route_overlay_line_unknown( Color.parseColor( "#3CD26E" ) ), - route_overlay_line_slow( Color.parseColor( "#EFCC7A" ) ), - route_overlay_line_very_traffic( Color.parseColor( "#E16262" ) ), - route_overlay_line_traffic( Color.parseColor( "#E88181" ) ), - transparent( Color.parseColor( "#00000000" ) ), - light_gray( Color.parseColor( "#CDD8FF" ) ); - - private int color; - - ColorEnum( int color ) { - this.color = color; - } - - public int getColor() { - return color; - } - } - -// public static RouteOverlayOptions getRouteOverlayOptions() { -// RouteOverlayOptions options = new RouteOverlayOptions(); -// // 设置导航线路的宽度 -// options.setLineWidth( 16 ); -// // 设置交通状况情况良好下的纹理位图 -// options.setSmoothTraffic( colorToBitmap( ColorEnum.route_overlay_line_normal.getColor() ) ); -// // 设置路线的图标 -// options.setNormalRoute( colorToBitmap( ColorEnum.route_overlay_line_normal.getColor() ) ); -// // 设置交通状况未知下的纹理位图 -// options.setUnknownTraffic( colorToBitmap( ColorEnum.route_overlay_line_unknown.getColor() ) ); -// // 设置交通状况迟缓下的纹理位图 -// options.setSlowTraffic( colorToBitmap( ColorEnum.route_overlay_line_slow.getColor() ) ); -// // 设置交通状况非常拥堵下的纹理位图 -// options.setVeryJamTraffic( colorToBitmap( ColorEnum.route_overlay_line_very_traffic.getColor() ) ); -// // 设置交通状况拥堵下的纹理位图 -// options.setJamTraffic( colorToBitmap( ColorEnum.route_overlay_line_traffic.getColor() ) ); -// // 设置浮于道路上的『小箭头』图标的纹理位图 -// options.setArrowOnTrafficRoute( colorToBitmap( ColorEnum.transparent.getColor() ) ); -// // 自定义走过路线纹理,默认走过路线置灰功能为关,需要在AMapNaviViewOptions.setAfterRouteAutoGray(boolean)打开,该方法才生效 -// options.setPassRoute( colorToBitmap( ColorEnum.light_gray.getColor() ) ); -// // 设置路线虚线纹理 -// options.setFairWayRes( colorToBitmap( ColorEnum.route_overlay_line_normal.getColor() ) ); -// return options; -// } - - public static Bitmap colorToBitmap( int color ) { - Bitmap.Config config = Bitmap.Config.ARGB_8888; - Bitmap bitmap = Bitmap.createBitmap( 1, 1, config ); - bitmap.eraseColor( color ); - return bitmap; - } -} diff --git a/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/utils/ObjectUtils.java b/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/utils/ObjectUtils.java deleted file mode 100644 index a0992f20b1..0000000000 --- a/libraries/map-baidu/src/main/java/com/mogo/map/impl/baidu/utils/ObjectUtils.java +++ /dev/null @@ -1,596 +0,0 @@ -package com.mogo.map.impl.baidu.utils; - -import android.graphics.Bitmap; - -import com.baidu.location.BDLocation; -import com.baidu.location.Poi; -import com.baidu.mapapi.map.BitmapDescriptor; -import com.baidu.mapapi.map.BitmapDescriptorFactory; -import com.baidu.mapapi.map.MapPoi; -import com.baidu.mapapi.map.MarkerOptions; -import com.baidu.mapapi.model.LatLng; -import com.baidu.mapapi.search.geocode.GeoCodeResult; -import com.baidu.mapapi.search.geocode.ReverseGeoCodeResult; -import com.baidu.mapapi.search.sug.SuggestionResult; -import com.baidu.mapapi.search.sug.SuggestionSearchOption; -import com.mogo.map.MogoLatLng; -import com.mogo.map.location.MogoLocation; -import com.mogo.map.marker.MogoMarkerOptions; -import com.mogo.map.model.MogoPoi; -import com.mogo.map.search.geo.MogoGeocodeAddress; -import com.mogo.map.search.geo.MogoGeocodeResult; -import com.mogo.map.search.geo.MogoRegeocodeAddress; -import com.mogo.map.search.geo.MogoRegeocodeResult; -import com.mogo.map.search.inputtips.MogoTip; -import com.mogo.map.search.inputtips.query.MogoInputtipsQuery; - -import java.util.ArrayList; -import java.util.List; - -/** - * @author congtaowang - * @since 2019-12-18 - *
- * 业务对象和实际对象转换
- */
-public class ObjectUtils {
-
- public static MarkerOptions fromMogo( MogoMarkerOptions opt ) {
-
- if ( opt == null ) {
- return null;
- }
- ArrayList< BitmapDescriptor > descriptors = new ArrayList<>();
- final ArrayList< Bitmap > icons = opt.getIcons();
- if ( icons != null && !icons.isEmpty() ) {
- for ( Bitmap icon : icons ) {
- if ( icon == null || icon.isRecycled() ) {
- continue;
- }
- descriptors.add( BitmapDescriptorFactory.fromBitmap( icon ) );
- }
- }
-
- return new MarkerOptions()
- .position( new LatLng( opt.getLatitude(), opt.getLongitude() ) )
- .title( opt.getTitle() )
- .icon( BitmapDescriptorFactory.fromBitmap( opt.getIcon() ) )
- .icons( descriptors )
- .clickable( true )
- .period( opt.getPeriod() )
- .rotate( opt.getRotate() )
- .flat( opt.isFlat() )
- .visible( opt.isVisible() )
- .alpha( opt.getAlpha() )
- .anchor( opt.getU(), opt.getV() )
- .draggable( opt.isDraggable() )
- .zIndex( opt.getzIndex() );
- }
-
- //
-//
- public static MogoLocation fromBMap( BDLocation bdLocation ) {
- if ( bdLocation == null ) {
- return null;
- }
- MogoLocation location = new MogoLocation();
- location.setLocType( bdLocation.getLocType() );
- location.setSpeed( bdLocation.getSpeed() );
- location.setLatitude( bdLocation.getLatitude() );
- location.setLongitude( bdLocation.getLongitude() );
- location.setAltitude( bdLocation.getAltitude() );
-// location.setTime( bdLocation.getTime() );
-// location.setBearing( bdLocation.getBearing() );
- location.setAccuracy( bdLocation.getGpsAccuracyStatus() );
- location.setCityCode( bdLocation.getCityCode() );
- location.setCityName( bdLocation.getCity() );
-// location.setProvider( bdLocation.getProvider() );
- location.setAddress( bdLocation.getAddress().address );
- location.setDistrict( bdLocation.getDistrict() );
- location.setProvince( bdLocation.getProvince() );
- location.setAdCode( bdLocation.getAdCode() );
-// location.setLocationDetail( bdLocation.getLocationDetail() );
-// location.setPoiName( bdLocation.getPoiName() );
-// location.setAoiName( bdLocation.getAoiName() );
-// location.setErrCode( bdLocation.getErrorCode() );
-// location.setErrInfo( bdLocation.getErrorInfo() );
- location.setStreetNum( bdLocation.getStreetNumber() );
- location.setDescription( bdLocation.getLocationDescribe() );
- location.setBuildingId( bdLocation.getBuildingID() );
- location.setFloor( bdLocation.getFloor() );
- location.setGpsAccuracyStatus( bdLocation.getGpsAccuracyStatus() );
- location.setSatellite( bdLocation.getSatelliteNumber() );
- return location;
- }
-
- //
-// public static LatLonPoint fromMogo( MogoLatLng latLng ) {
-// if ( latLng == null ) {
-// return null;
-// }
-// return new LatLonPoint( latLng.lat, latLng.lng );
-// }
-//
-// public static NaviLatLng fromMogoAsNavi( MogoLatLng latLng ) {
-// if ( latLng == null ) {
-// return null;
-// }
-// return new NaviLatLng( latLng.lat, latLng.lng );
-// }
-//
- public static LatLng fromMogo2( MogoLatLng latLng ) {
- if ( latLng == null ) {
- return null;
- }
- return new LatLng( latLng.lat, latLng.lng );
- }
-
- //
-// public static MogoLatLng fromBMap( LatLonPoint point ) {
-// if ( point == null ) {
-// return null;
-// }
-// return new MogoLatLng( point.getLatitude(), point.getLongitude() );
-// }
-//
- public static MogoLatLng fromBMap( LatLng point ) {
- if ( point == null ) {
- return null;
- }
- return new MogoLatLng( point.latitude, point.longitude );
- }
-
- public static MogoPoi fromBMap( MapPoi poi ) {
- if ( poi == null ) {
- return null;
- }
- MogoPoi mogoPoi = new MogoPoi();
- mogoPoi.setCoordinate( fromBMap( poi.getPosition() ) );
- mogoPoi.setName( poi.getName() );
- mogoPoi.setPoiId( poi.getUid() );
- return mogoPoi;
- }
-
- //
-// public static GeocodeQuery fromMogo( MogoGeocodeQuery query ) {
-// if ( query == null ) {
-// return null;
-// }
-// GeocodeQuery q = new GeocodeQuery( query.getLocationName(), query.getCity() );
-// return q;
-// }
-//
-// public static RegeocodeQuery fromMogo( MogoRegeocodeQuery query ) {
-// if ( query == null ) {
-// return null;
-// }
-// RegeocodeQuery q = new RegeocodeQuery( fromMogo( query.getPoint() ), query.getRadius(), query.getLatlngType() );
-// return q;
-// }
-//
-// public static MogoAoiItem fromBMap( AoiItem amapItem ) {
-// if ( amapItem == null ) {
-// return null;
-// }
-// MogoAoiItem mogoAoiItem = new MogoAoiItem();
-// mogoAoiItem.setAdCode( amapItem.getAdCode() );
-// mogoAoiItem.setAoiArea( amapItem.getAoiArea() );
-// mogoAoiItem.setAoiCenterPoint( fromBMap( amapItem.getAoiCenterPoint() ) );
-// mogoAoiItem.setAoiId( amapItem.getAoiId() );
-// mogoAoiItem.setAoiName( amapItem.getAoiName() );
-// return mogoAoiItem;
-// }
-//
-// public static MogoBusinessArea fromBMap( BusinessArea amapItem ) {
-// if ( amapItem == null ) {
-// return null;
-// }
-// MogoBusinessArea mogoBusinessArea = new MogoBusinessArea();
-// mogoBusinessArea.setCenterPoint( fromBMap( amapItem.getCenterPoint() ) );
-// mogoBusinessArea.setName( amapItem.getName() );
-// return mogoBusinessArea;
-// }
-//
-//
-// public static MogoCrossroad fromBMap( Crossroad amapItem ) {
-// if ( amapItem == null ) {
-// return null;
-// }
-// MogoCrossroad mogoCrossroad = new MogoCrossroad();
-// mogoCrossroad.setDirection( amapItem.getDirection() );
-// mogoCrossroad.setDistance( amapItem.getDistance() );
-// mogoCrossroad.setFirstRoadId( amapItem.getFirstRoadId() );
-// mogoCrossroad.setFirstRoadName( amapItem.getFirstRoadName() );
-// mogoCrossroad.setSecondRoadId( amapItem.getSecondRoadId() );
-// mogoCrossroad.setSecondRoadName( amapItem.getSecondRoadName() );
-// return mogoCrossroad;
-// }
-//
-// public static MogoGeocodeAddress fromBMap( GeocodeAddress address ) {
-// if ( address == null ) {
-// return null;
-// }
-// MogoGeocodeAddress mogoGeocodeAddress = new MogoGeocodeAddress();
-// mogoGeocodeAddress.setAdcode( address.getAdcode() );
-// mogoGeocodeAddress.setBuilding( address.getBuilding() );
-// mogoGeocodeAddress.setCity( address.getCity() );
-// mogoGeocodeAddress.setDistrict( address.getDistrict() );
-// mogoGeocodeAddress.setFormatAddress( address.getFormatAddress() );
-// mogoGeocodeAddress.setLatlng( fromBMap( address.getLatLonPoint() ) );
-// mogoGeocodeAddress.setLevel( address.getLevel() );
-// mogoGeocodeAddress.setNeighborhood( address.getNeighborhood() );
-// mogoGeocodeAddress.setProvince( address.getProvince() );
-// mogoGeocodeAddress.setTownship( address.getTownship() );
-// return mogoGeocodeAddress;
-// }
-
- //
- public static MogoGeocodeResult fromBMap( GeoCodeResult result ) {
- if ( result == null ) {
- return null;
- }
- MogoGeocodeResult mogoGeocodeResult = new MogoGeocodeResult();
- final List< MogoGeocodeAddress > addresses = new ArrayList<>();
- MogoGeocodeAddress mogoGeocodeAddress = new MogoGeocodeAddress();
- mogoGeocodeAddress.setLatlng( fromBMap( result.getLocation() ) );
- mogoGeocodeResult.setAddresses( addresses );
- return mogoGeocodeResult;
- }
-
- //
-// public static MogoIndoorData fromBMap( IndoorData data ) {
-// if ( data == null ) {
-// return null;
-// }
-// MogoIndoorData mogoIndoorData = new MogoIndoorData();
-// mogoIndoorData.setFloor( data.getFloor() );
-// mogoIndoorData.setFloorName( data.getFloorName() );
-// mogoIndoorData.setPoiId( data.getPoiId() );
-// return mogoIndoorData;
-// }
-//
-// public static MogoPhoto fromBMap( Photo photo ) {
-// if ( photo == null ) {
-// return null;
-// }
-// MogoPhoto mogoPhoto = new MogoPhoto();
-// mogoPhoto.setTitle( photo.getTitle() );
-// mogoPhoto.setUrl( photo.getUrl() );
-// return mogoPhoto;
-// }
-//
-// public static MogoPoiItemExtension fromBMap( PoiItemExtension poiItemExtension ) {
-// if ( poiItemExtension == null ) {
-// return null;
-// }
-// MogoPoiItemExtension mogoPoiItemExtension = new MogoPoiItemExtension();
-// mogoPoiItemExtension.setOpentime( poiItemExtension.getOpentime() );
-// mogoPoiItemExtension.setRating( poiItemExtension.getmRating() );
-// return mogoPoiItemExtension;
-// }
-//
-// public static MogoRegeocodeRoad fromBMap( RegeocodeRoad regeocodeRoad ) {
-// if ( regeocodeRoad == null ) {
-// return null;
-// }
-// MogoRegeocodeRoad mogoRegeocodeRoad = new MogoRegeocodeRoad();
-// mogoRegeocodeRoad.setDirection( regeocodeRoad.getDirection() );
-// mogoRegeocodeRoad.setDistance( regeocodeRoad.getDistance() );
-// mogoRegeocodeRoad.setId( regeocodeRoad.getId() );
-// mogoRegeocodeRoad.setName( regeocodeRoad.getName() );
-// mogoRegeocodeRoad.setPoint( fromBMap( regeocodeRoad.getLatLngPoint() ) );
-// return mogoRegeocodeRoad;
-// }
-//
-// public static MogoStreetNumber fromBMap( StreetNumber streetNumber ) {
-// if ( streetNumber == null ) {
-// return null;
-// }
-// MogoStreetNumber mogoStreetNumber = new MogoStreetNumber();
-// mogoStreetNumber.setDirection( streetNumber.getDirection() );
-// mogoStreetNumber.setDistance( streetNumber.getDistance() );
-// mogoStreetNumber.setLatLonPoint( fromBMap( streetNumber.getLatLonPoint() ) );
-// mogoStreetNumber.setNumber( streetNumber.getNumber() );
-// mogoStreetNumber.setStreet( streetNumber.getStreet() );
-// return mogoStreetNumber;
-// }
-//
-// public static MogoSubPoiItem fromBMap( SubPoiItem subPoiItem ) {
-// if ( subPoiItem == null ) {
-// return null;
-// }
-// MogoSubPoiItem mogoSubPoiItem = new MogoSubPoiItem();
-// mogoSubPoiItem.setDistance( subPoiItem.getDistance() );
-// mogoSubPoiItem.setPoiId( subPoiItem.getPoiId() );
-// mogoSubPoiItem.setPoint( fromBMap( subPoiItem.getLatLonPoint() ) );
-// mogoSubPoiItem.setSnippet( subPoiItem.getSnippet() );
-// mogoSubPoiItem.setSubName( mogoSubPoiItem.getSubName() );
-// mogoSubPoiItem.setSubTypeDes( mogoSubPoiItem.getSubTypeDes() );
-// mogoSubPoiItem.setTitle( mogoSubPoiItem.getTitle() );
-// return mogoSubPoiItem;
-// }
-//
-// public static MogoPoiItem fromBMap( PoiItem poiItem ) {
-// if ( poiItem == null ) {
-// return null;
-// }
-// MogoPoiItem mogoPoiItem = new MogoPoiItem();
-// mogoPoiItem.setAdCode( poiItem.getAdCode() );
-// mogoPoiItem.setAdName( poiItem.getAdName() );
-// mogoPoiItem.setBusinessArea( poiItem.getBusinessArea() );
-// mogoPoiItem.setCityCode( poiItem.getCityCode() );
-// mogoPoiItem.setCityName( poiItem.getCityName() );
-// mogoPoiItem.setDirection( poiItem.getDirection() );
-// mogoPoiItem.setDistance( poiItem.getDistance() );
-// mogoPoiItem.setEmail( poiItem.getEmail() );
-// mogoPoiItem.setEnter( fromBMap( poiItem.getEnter() ) );
-// mogoPoiItem.setExit( fromBMap( poiItem.getExit() ) );
-// mogoPoiItem.setIndoorData( fromBMap( poiItem.getIndoorData() ) );
-// mogoPoiItem.setParkingType( poiItem.getParkingType() );
-// mogoPoiItem.setIndoorMap( poiItem.isIndoorMap() );
-// if ( poiItem.getPhotos() != null ) {
-// List< MogoPhoto > mogoPhotos = new ArrayList<>();
-// for ( Photo photo : poiItem.getPhotos() ) {
-// MogoPhoto mogoPhoto = fromBMap( photo );
-// if ( mogoPhoto != null ) {
-// mogoPhotos.add( mogoPhoto );
-// }
-// }
-// mogoPoiItem.setPhotos( mogoPhotos );
-// }
-// mogoPoiItem.setPoiExtension( fromBMap( poiItem.getPoiExtension() ) );
-// mogoPoiItem.setPoiId( poiItem.getPoiId() );
-// mogoPoiItem.setPoint( fromBMap( poiItem.getLatLonPoint() ) );
-// mogoPoiItem.setPostcode( poiItem.getPostcode() );
-// mogoPoiItem.setProvinceCode( poiItem.getProvinceCode() );
-// mogoPoiItem.setProvinceName( poiItem.getProvinceName() );
-// mogoPoiItem.setShopID( poiItem.getShopID() );
-// mogoPoiItem.setSnippet( poiItem.getSnippet() );
-// if ( poiItem.getSubPois() != null ) {
-// List< MogoSubPoiItem > mogoSubPoiItems = new ArrayList<>();
-// for ( SubPoiItem subPois : poiItem.getSubPois() ) {
-// MogoSubPoiItem mogoSubPoiItem = fromBMap( subPois );
-// if ( mogoPoiItem != null ) {
-// mogoSubPoiItems.add( mogoSubPoiItem );
-// }
-// }
-// mogoPoiItem.setSubPois( mogoSubPoiItems );
-// }
-// mogoPoiItem.setTel( poiItem.getTel() );
-// mogoPoiItem.setTypeCode( poiItem.getTypeCode() );
-// mogoPoiItem.setTitle( poiItem.getTitle() );
-// mogoPoiItem.setTypeDes( poiItem.getTypeDes() );
-// mogoPoiItem.setWebsite( poiItem.getWebsite() );
-// return mogoPoiItem;
-// }
-//
-// public static MogoRegeocodeAddress fromBMap( ReverseGeoCodeResult regeocodeAddress ) {
-// if ( regeocodeAddress == null ) {
-// return null;
-// }
-// MogoRegeocodeAddress mogoRegeocodeAddress = new MogoRegeocodeAddress();
-// mogoRegeocodeAddress.setAdCode( regeocodeAddress.getAdcode() + "" );
-// if ( regeocodeAddress.getAois() != null ) {
-// List< MogoAoiItem > items = new ArrayList<>();
-// for ( AoiItem aois : regeocodeAddress.getAois() ) {
-// final MogoAoiItem mogoAoiItem = fromBMap( aois );
-// if ( mogoAoiItem != null ) {
-// items.add( mogoAoiItem );
-// }
-// }
-// mogoRegeocodeAddress.setAois( items );
-// }
-//
-// mogoRegeocodeAddress.setBuilding( regeocodeAddress.getB );
-// if ( regeocodeAddress.getBusinessAreas() != null ) {
-// List< MogoBusinessArea > mogoBusinessAreas = new ArrayList<>();
-// for ( BusinessArea businessArea : regeocodeAddress.getBusinessAreas() ) {
-// MogoBusinessArea mogoBusinessArea = fromBMap( businessArea );
-// if ( mogoBusinessArea != null ) {
-// mogoBusinessAreas.add( mogoBusinessArea );
-// }
-// }
-// mogoRegeocodeAddress.setBusinessAreas( mogoBusinessAreas );
-// }
-//
-// mogoRegeocodeAddress.setCity( regeocodeAddress.getCity() );
-// mogoRegeocodeAddress.setCityCode( regeocodeAddress.getCityCode() );
-// mogoRegeocodeAddress.setCountry( regeocodeAddress.getCountry() );
-// if ( regeocodeAddress.getCrossroads() != null ) {
-// List< MogoCrossroad > mogoCrossroads = new ArrayList<>();
-// for ( Crossroad crossroad : regeocodeAddress.getCrossroads() ) {
-//
-// MogoCrossroad mogoCrossroad = fromBMap( crossroad );
-// if ( mogoCrossroad != null ) {
-// mogoCrossroads.add( mogoCrossroad );
-// }
-// }
-// mogoRegeocodeAddress.setCrossroads( mogoCrossroads );
-// }
-// mogoRegeocodeAddress.setDistrict( regeocodeAddress.getDistrict() );
-// mogoRegeocodeAddress.setFormatAddress( regeocodeAddress.getFormatAddress() );
-// mogoRegeocodeAddress.setNeighborhood( regeocodeAddress.getNeighborhood() );
-// if ( regeocodeAddress.getPois() != null ) {
-// List< MogoPoiItem > mogoPoiItems = new ArrayList<>();
-// for ( PoiItem pois : regeocodeAddress.getPois() ) {
-// MogoPoiItem mogoPoiItem = fromBMap( pois );
-// mogoPoiItems.add( mogoPoiItem );
-// }
-// mogoRegeocodeAddress.setPois( mogoPoiItems );
-// }
-// mogoRegeocodeAddress.setProvince( regeocodeAddress.getProvince() );
-// if ( regeocodeAddress.getRoads() != null ) {
-// List< MogoRegeocodeRoad > mogoRegeocodeRoads = new ArrayList<>();
-// for ( RegeocodeRoad road : regeocodeAddress.getRoads() ) {
-// MogoRegeocodeRoad mogoRegeocodeRoad = fromBMap( road );
-// if ( mogoRegeocodeRoad != null ) {
-// mogoRegeocodeRoads.add( mogoRegeocodeRoad );
-// }
-// }
-// mogoRegeocodeAddress.setRoads( mogoRegeocodeRoads );
-// }
-// mogoRegeocodeAddress.setStreetNumber( fromBMap( regeocodeAddress.getStreetNumber() ) );
-// mogoRegeocodeAddress.setTowncode( regeocodeAddress.getTowncode() );
-// mogoRegeocodeAddress.setTownship( regeocodeAddress.getTownship() );
-// return mogoRegeocodeAddress;
-// }
-
- //
- public static MogoRegeocodeResult fromBMap( ReverseGeoCodeResult regeocodeResult ) {
- if ( regeocodeResult == null ) {
- return null;
- }
- MogoRegeocodeResult mogoRegeocodeResult = new MogoRegeocodeResult();
- mogoRegeocodeResult.setRegeocodeAddress( null );
- return mogoRegeocodeResult;
- }
-
- //
- public static SuggestionSearchOption fromMogo( MogoInputtipsQuery query ) {
- if ( query == null ) {
- return null;
- }
- SuggestionSearchOption searchOption = new SuggestionSearchOption();
- searchOption.city( query.getCity() )
- .keyword( query.getKeyword() )
- .citylimit( query.isCityLimit() );
- return searchOption;
- }
-
- public static MogoTip fromBMap( SuggestionResult.SuggestionInfo tip ) {
- if ( tip == null ) {
- return null;
- }
- MogoTip mogoTip = new MogoTip();
- mogoTip.setAddress( tip.getAddress() );
- mogoTip.setAdCode( "" );
- mogoTip.setDistrict( tip.getDistrict() );
- mogoTip.setName( tip.getKey() );
- mogoTip.setPoiID( tip.getUid() );
- mogoTip.setPoint( fromBMap( tip.getPt() ) );
- mogoTip.setTypeCode( "" );
- return mogoTip;
- }
-//
-// public static MogoPoi fromBMap( Poi poi ) {
-// if ( poi == null ) {
-// return null;
-// }
-// MogoPoi mogoPoi = new MogoPoi();
-// mogoPoi.setCoordinate( fromBMap( poi.getCoordinate() ) );
-// mogoPoi.setName( poi.getName() );
-// mogoPoi.setPoiId( poi.getPoiId() );
-// return mogoPoi;
-// }
-//
-// public static MogoPoiSearchQuery fromBMap( PoiSearch.Query query ) {
-// if ( query == null ) {
-// return null;
-// }
-// MogoPoiSearchQuery mogoPoiSearchQuery = new MogoPoiSearchQuery( query.getQueryString(), query.getCategory(), query.getCity() );
-// mogoPoiSearchQuery.setBuilding( query.getBuilding() );
-// mogoPoiSearchQuery.setCityLimit( query.getCityLimit() );
-// mogoPoiSearchQuery.setDistanceSort( query.isDistanceSort() );
-// mogoPoiSearchQuery.setLocation( fromBMap( query.getLocation() ) );
-// mogoPoiSearchQuery.setPageNum( query.getPageNum() );
-// mogoPoiSearchQuery.setPageSize( query.getPageSize() );
-// return mogoPoiSearchQuery;
-// }
-//
-// public static PoiSearch.Query fromMogo( MogoPoiSearchQuery query ) {
-// if ( query == null ) {
-// return null;
-// }
-// PoiSearch.Query psq = new PoiSearch.Query( query.getQuery(), query.getCategory(), query.getCity() );
-// psq.setBuilding( query.getBuilding() );
-// psq.setCityLimit( query.isCityLimit() );
-// psq.setDistanceSort( query.isDistanceSort() );
-// psq.setLocation( fromMogo( query.getLocation() ) );
-// psq.setPageNum( query.getPageNum() );
-// psq.setPageSize( query.getPageSize() );
-// return psq;
-// }
-//
-// public static MogoSearchBound fromBMap( PoiSearch.SearchBound bound ) {
-// if ( bound == null ) {
-// return null;
-// }
-// if ( bound.getShape() == PoiSearch.SearchBound.BOUND_SHAPE ) {
-// return new MogoSearchBound( fromBMap( bound.getCenter() ), bound.getRange(), bound.isDistanceSort() );
-// } else if ( bound.getShape() == PoiSearch.SearchBound.POLYGON_SHAPE ) {
-// return new MogoSearchBound( fromBMap( bound.getPolyGonList() ) );
-// } else if ( bound.getShape() == PoiSearch.SearchBound.RECTANGLE_SHAPE ) {
-// return new MogoSearchBound( fromBMap( bound.getLowerLeft() ), fromBMap( bound.getUpperRight() ) );
-// }
-// return null;
-// }
-//
-// public static List< MogoLatLng > fromBMap( List< LatLonPoint > latLngs ) {
-// if ( latLngs == null ) {
-// return null;
-// }
-// List< MogoLatLng > result = new ArrayList<>( latLngs.size() );
-// for ( LatLonPoint latLng : latLngs ) {
-// result.add( fromBMap( latLng ) );
-// }
-// return result;
-// }
-//
-// public static List< LatLonPoint > fromMogo( List< MogoLatLng > latLngs ) {
-// if ( latLngs == null ) {
-// return null;
-// }
-// List< LatLonPoint > result = new ArrayList<>( latLngs.size() );
-// for ( MogoLatLng latLng : latLngs ) {
-// result.add( fromMogo( latLng ) );
-// }
-// return result;
-// }
-//
-//
-// public static PoiSearch.SearchBound fromMogo( MogoSearchBound bound ) {
-// if ( bound == null ) {
-// return null;
-// }
-// if ( bound.getShape() == MogoSearchBound.SHAPE_BOUND ) {
-// return new PoiSearch.SearchBound( fromMogo( bound.getCenterPoint() ), bound.getRadiusInMeters(), bound.isDistanceSort() );
-// } else if ( bound.getShape() == MogoSearchBound.SHAPE_POLYGON ) {
-// return new PoiSearch.SearchBound( fromMogo( bound.getPolyGonList() ) );
-// } else if ( bound.getShape() == MogoSearchBound.SHAPE_RECTANGLE ) {
-// return new PoiSearch.SearchBound( fromMogo( bound.getLowerLeft() ), fromMogo( bound.getUpperRight() ) );
-// }
-// return null;
-// }
-//
-// public static MogoPoiResult fromBMap( PoiResult result ) {
-// if ( result == null ) {
-// return null;
-// }
-// MogoPoiResult mogoPoiResult = new MogoPoiResult();
-// if ( result.getPois() != null ) {
-// final List< PoiItem > poiItems = result.getPois();
-// final ArrayList< MogoPoiItem > mogoPoiItems = new ArrayList<>( poiItems.size() );
-// for ( PoiItem poiItem : poiItems ) {
-// mogoPoiItems.add( fromBMap( poiItem ) );
-// }
-// mogoPoiResult.setPois( mogoPoiItems );
-// }
-// return mogoPoiResult;
-// }
-//
-// public static MogoNaviInfo fromBMap( NaviInfo naviInfo ) {
-// if ( naviInfo == null ) {
-// return null;
-// }
-// MogoNaviInfo mogoNaviInfo = new MogoNaviInfo();
-// mogoNaviInfo.setCurrentRoadName( naviInfo.getCurrentRoadName() );
-// mogoNaviInfo.setCurrentSpeed( naviInfo.getCurrentSpeed() );
-// mogoNaviInfo.setCurStepRetainDistance( naviInfo.getCurStepRetainDistance() );
-// mogoNaviInfo.setCurStepRetainTime( naviInfo.getCurStepRetainTime() );
-// mogoNaviInfo.setIconType( naviInfo.getIconType() );
-// mogoNaviInfo.setNextRoadName( naviInfo.getNextRoadName() );
-// mogoNaviInfo.setPathRetainDistance( naviInfo.getPathRetainDistance() );
-// mogoNaviInfo.setPathRetainTime( naviInfo.getPathRetainTime() );
-// return mogoNaviInfo;
-// }
-}
diff --git a/libraries/map-baidu/src/main/res/values/strings.xml b/libraries/map-baidu/src/main/res/values/strings.xml
deleted file mode 100644
index 9641815763..0000000000
--- a/libraries/map-baidu/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-