Commit 9c0bfa8f authored by fengruiyu's avatar fengruiyu

解决地图抖动的问题

parent c6c482c8
...@@ -160,14 +160,14 @@ class HomeFragment : BaseFragment<FragmentHomeBinding, HomeViewModel>(), SensorE ...@@ -160,14 +160,14 @@ class HomeFragment : BaseFragment<FragmentHomeBinding, HomeViewModel>(), SensorE
currentLon = status?.target?.longitude?:0.0 currentLon = status?.target?.longitude?:0.0
mRecommendStopSearch?.requestRecommendStop( mRecommendStopSearch?.requestRecommendStop(
RecommendStopSearchOption().location( RecommendStopSearchOption().location(
center LatLng(currentLat,currentLat)
) )
) )
} }
}) })
mBaiduMap?.setOnMapLoadedCallback { mBaiduMap?.setOnMapLoadedCallback {
mRecommendStopSearch?.requestRecommendStop(RecommendStopSearchOption().location(center)) mRecommendStopSearch?.requestRecommendStop(RecommendStopSearchOption().location( LatLng(currentLat,currentLat)))
} }
//使地图缩放级别增大一级 //使地图缩放级别增大一级
binding.imageIn.setOnClickListener { binding.imageIn.setOnClickListener {
...@@ -183,7 +183,6 @@ class HomeFragment : BaseFragment<FragmentHomeBinding, HomeViewModel>(), SensorE ...@@ -183,7 +183,6 @@ class HomeFragment : BaseFragment<FragmentHomeBinding, HomeViewModel>(), SensorE
} }
mRecommendStopSearch = RecommendStopSearch.newInstance() mRecommendStopSearch = RecommendStopSearch.newInstance()
mRecommendStopSearch?.setOnGetRecommendStopResultListener { result -> mRecommendStopSearch?.setOnGetRecommendStopResultListener { result ->
result
if (result != null) { if (result != null) {
addMarkerToMap(result.recommendStopInfoList) addMarkerToMap(result.recommendStopInfoList)
} }
......
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