Skip to content

Commit

Permalink
Merge pull request #8 from TheMelody/v1.0.3
Browse files Browse the repository at this point in the history
升级腾讯地图、高德地图、百度地图SDK到最新版本;
  • Loading branch information
TheMelody authored Jun 26, 2023
2 parents d908665 + 8661968 commit c4a0b99
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ jobs:
artifactErrorsFailBuild: true
body: |
### 功能更新
- 升级高德地图、百度地图SDK到最新版本
- Compose升级至1.3.3稳定版本
- 升级腾讯地图、高德地图、百度地图SDK到最新版本
- 针对MapView单独做onDispose处理
token: ${{ secrets.github_token }}
commit: master
# tag名称
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ OmniMap Compose 🗺
-------
<table>
<tr>
<td>gd_compose</td><td><img alt="Maven Central" src="https://img.shields.io/maven-central/v/io.github.TheMelody/gd_compose?versionPrefix=1.0.2"></td>
<td>gd_compose</td><td><img alt="Maven Central" src="https://img.shields.io/maven-central/v/io.github.TheMelody/gd_compose?versionPrefix=1.0.3"></td>
</tr>
<tr>
<td>tencent_compose</td><td><img alt="Maven Central" src="https://img.shields.io/maven-central/v/io.github.TheMelody/tencent_compose?versionPrefix=1.0.2"></td>
<td>tencent_compose</td><td><img alt="Maven Central" src="https://img.shields.io/maven-central/v/io.github.TheMelody/tencent_compose?versionPrefix=1.0.3"></td>
</tr>
<tr>
<td>baidu_compose</td><td><img alt="Maven Central" src="https://img.shields.io/maven-central/v/io.github.TheMelody/baidu_compose?versionPrefix=1.0.2"></td>
<td>baidu_compose</td><td><img alt="Maven Central" src="https://img.shields.io/maven-central/v/io.github.TheMelody/baidu_compose?versionPrefix=1.0.3"></td>
</tr>
</table>

Expand Down
2 changes: 1 addition & 1 deletion baidu-map-compose/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ dependencies {
implementation "androidx.compose.ui:ui:$compose_version"
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1'
// 地图组件
api 'com.baidu.lbsyun:BaiduMapSDK_Map:7.5.7.1'
api 'com.baidu.lbsyun:BaiduMapSDK_Map:7.5.8'
}
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ private fun MapLifecycle(mapView: MapView) {

onDispose {
lifecycle.removeObserver(mapLifecycleObserver)
}
}
DisposableEffect(mapView) {
onDispose {
// fix memory leak
mapView.onDestroy()
mapView.removeAllViews()
Expand Down
2 changes: 1 addition & 1 deletion gd-map-compose/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ dependencies {
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1'

// 高德地图3d
api 'com.amap.api:3dmap:9.6.2'
api 'com.amap.api:3dmap:9.7.0'
// 高德地图:搜索相关API,路径规划需要用到这里面的类
api "com.amap.api:search:9.5.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,10 @@ private fun MapLifecycle(mapView: MapView) {
onDispose {
lifecycle.removeObserver(mapLifecycleObserver)
context.unregisterComponentCallbacks(callbacks)
}
}
DisposableEffect(mapView) {
onDispose {
// fix memory leak
mapView.onDestroy()
mapView.removeAllViews()
Expand Down
2 changes: 1 addition & 1 deletion gradle_map.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ MIN_SDK_VERSION = 21
HUAWEI_MIN_SDK_VERSION = 24

# publish maven central library version_name
LIB_VERSION_NAME = 1.0.2
LIB_VERSION_NAME = 1.0.3
8 changes: 4 additions & 4 deletions sample-baidu/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ dependencies {
implementation project(path: ':sample-ui-components')
implementation project(path: ':baidu-map-compose')
// 基础库
implementation 'com.baidu.lbsyun:base:7.5.7.1'
implementation 'com.baidu.lbsyun:base:7.5.8'
// 定位组件
implementation "com.baidu.lbsyun:BaiduMapSDK_Location:9.4.0"
implementation "com.baidu.lbsyun:BaiduMapSDK_Location:9.4.5"
// 检索组件
implementation 'com.baidu.lbsyun:BaiduMapSDK_Search:7.5.7.1'
implementation 'com.baidu.lbsyun:BaiduMapSDK_Search:7.5.8'
// 工具组件
implementation 'com.baidu.lbsyun:BaiduMapSDK_Util:7.5.7.1'
implementation 'com.baidu.lbsyun:BaiduMapSDK_Util:7.5.8'

}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import com.tencent.lbssearch.`object`.param.Geo2AddressParam
import com.tencent.lbssearch.`object`.param.SearchParam
import com.tencent.lbssearch.`object`.result.Geo2AddressResultObject
import com.tencent.lbssearch.`object`.result.SearchResultObject
import com.tencent.map.tools.net.http.HttpResponseListener
import com.tencent.tencentmap.mapsdk.maps.model.LatLng
import kotlinx.coroutines.suspendCancellableCoroutine

Expand Down Expand Up @@ -122,7 +121,8 @@ object DragDropSelectPointRepository {
.setPageSize(20)
.setPolicy(Geo2AddressParam.PoiOptions.POLICY_DEFAULT)
)
tencentSearch.geo2address(geo2AddressParam, object: HttpResponseListener<BaseObject> {
tencentSearch.geo2address(geo2AddressParam, object:
com.tencent.lbssearch.httpresponse.HttpResponseListener<BaseObject> {
override fun onSuccess(p0: Int, arg1: BaseObject?) {
val obj = arg1 as? Geo2AddressResultObject?
if (null == obj?.result) {
Expand All @@ -148,7 +148,7 @@ object DragDropSelectPointRepository {
val nearBy = SearchParam.Nearby(latLng, 1000)
//圆形范围搜索, autoExtend(false) => 设置搜索范围不扩大,这里传true,扩大搜索范围
val searchParam = SearchParam(addressName, SearchParam.Region(cityName).autoExtend(true)).pageSize(20).boundary(nearBy)
search.search(searchParam,object: HttpResponseListener<BaseObject>{
search.search(searchParam,object: com.tencent.lbssearch.httpresponse.HttpResponseListener<BaseObject>{
override fun onSuccess(arg0: Int, arg1: BaseObject?) {
val obj = arg1 as? SearchResultObject?
if (obj?.data == null) {
Expand Down
2 changes: 1 addition & 1 deletion tencent-map-compose/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ dependencies {
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1'

// 地图库
api 'com.tencent.map:tencent-map-vector-sdk:5.0.0'
api 'com.tencent.map:tencent-map-vector-sdk:5.1.0'
// 地图组件库,包括小车平移、点聚合等组件功能。
api 'com.tencent.map:sdk-utilities:1.0.9.1'
}
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ private fun MapLifecycle(mapView: MapView) {

onDispose {
lifecycle.removeObserver(mapLifecycleObserver)
}
}
DisposableEffect(mapView) {
onDispose {
// fix memory leak
mapView.onDestroy()
mapView.removeAllViews()
Expand Down

0 comments on commit c4a0b99

Please sign in to comment.