Commit c7e0f0d2 authored by fengruiyu's avatar fengruiyu

修改升级的方法

parent dcd2fa00
......@@ -116,7 +116,6 @@ class HomeFragment : BaseFragment<FragmentHomeBinding, HomeViewModel>(), SensorE
viewModel.authorized("", currentLat.toString(), currentLon.toString(), false)
}
viewModel.getMapBean()
DialogUtils.showupgradevipDialog(requireContext())
}
override fun initViewObservable() {
......@@ -258,7 +257,6 @@ class HomeFragment : BaseFragment<FragmentHomeBinding, HomeViewModel>(), SensorE
if ("CN".equals(reverseGeoCodeResult.addressDetail.countryCodeIso2)){
if(currentMapZoom >= 15){
ToastUtils.showLong("请充值升级会员")
var zoom = 13f
// 默认 天安门
val center = LatLng(currentLat, currentLon)
......@@ -266,12 +264,11 @@ class HomeFragment : BaseFragment<FragmentHomeBinding, HomeViewModel>(), SensorE
val builder = MapStatus.Builder()
builder.target(center).zoom(zoom)
val mapStatusUpdate = MapStatusUpdateFactory.newMapStatus(builder.build())
showupgradevipDialog(requireContext())
// 设置地图状态
mBaiduMap?.animateMapStatus(mapStatusUpdate,200)
}
}else{
ToastUtils.showLong("请充值升级会员")
var zoom = 13f
// 默认 天安门
val center = LatLng(mCurrentLat, mCurrentLon)
......@@ -279,7 +276,8 @@ class HomeFragment : BaseFragment<FragmentHomeBinding, HomeViewModel>(), SensorE
val builder = MapStatus.Builder()
builder.target(center).zoom(zoom)
val mapStatusUpdate = MapStatusUpdateFactory.newMapStatus(builder.build())
// 设置地图状态
showupgradevipDialog(requireContext())
// 设置地图状态
mBaiduMap?.animateMapStatus(mapStatusUpdate,500)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment