Commit 6dedaf52 authored by 张释方's avatar 张释方

Merge branch 'dev_1.0.0' of http://gitlab.mints-id.com/android/android_street into branche_zsf

parents df36da0c c520d1f0
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
<script type="text/javascript" charset="UTF-8" src="./common/url.js"></script> <script type="text/javascript" charset="UTF-8" src="./common/url.js"></script>
<script> <script>
document.write('<script type="text/javascript"' + document.write('<script type="text/javascript"' +
' src="https://api.map.baidu.com/api?v=3.0&ak='+getParam("bk")+'"><\/script>') ' src="https://api.map.baidu.com/api?v=3.0&ak=' + getParam("bk") + '"><\/script>')
</script> </script>
...@@ -42,6 +42,9 @@ ...@@ -42,6 +42,9 @@
var c = 1;//getParam("c");//39.915表示纬度 var c = 1;//getParam("c");//39.915表示纬度
var lat = getParam("lat");//39.915表示纬度
var lng = getParam("lng");//39.915表示纬度
var d = getParam("d");//39.915表示纬度 var d = getParam("d");//39.915表示纬度
var panorama = new BMap.Panorama('panorama', { var panorama = new BMap.Panorama('panorama', {
...@@ -58,7 +61,12 @@ ...@@ -58,7 +61,12 @@
// a=116.316169 // a=116.316169
// b=40.005567 // b=40.005567
// panorama.setPosition(new BMap.Point(a,b)); // panorama.setPosition(new BMap.Point(a,b));
panorama.setId(d);//根据全景id展示全景图 if (d == null || d == "") {
panorama.setId(d);//根据全景id展示全景图
} else {
panorama.setPosition(new BMap.Point(lng, lat));
}
// panorama.setPov({pitch: 5.04, heading: 343.92}); // panorama.setPov({pitch: 5.04, heading: 343.92});
......
...@@ -24,7 +24,6 @@ import com.mints.street.databinding.ActivitySearchMapBinding ...@@ -24,7 +24,6 @@ import com.mints.street.databinding.ActivitySearchMapBinding
* Created by 冯瑞雨 on 2021/7/13. * Created by 冯瑞雨 on 2021/7/13.
*/ */
class SearchMapActivity : BaseActivity<ActivitySearchMapBinding, SearchMapViewModel>() { class SearchMapActivity : BaseActivity<ActivitySearchMapBinding, SearchMapViewModel>() {
// OnGetSuggestionResultListener {
companion object { companion object {
const val HISTORY_NAME = "history_name" const val HISTORY_NAME = "history_name"
const val REQUEST_CODE = 201 const val REQUEST_CODE = 201
...@@ -41,9 +40,7 @@ class SearchMapActivity : BaseActivity<ActivitySearchMapBinding, SearchMapViewMo ...@@ -41,9 +40,7 @@ class SearchMapActivity : BaseActivity<ActivitySearchMapBinding, SearchMapViewMo
private var historyRecordAdapter: HistoryRecordAdapter? = null private var historyRecordAdapter: HistoryRecordAdapter? = null
private var popularSceneAdapter: PopularSceneAdapter? = null private var popularSceneAdapter: PopularSceneAdapter? = null
//
// //检索模块
// private var mSuggestionSearch: SuggestionSearch? = null
override fun initContentView(savedInstanceState: Bundle?) = R.layout.activity_search_map override fun initContentView(savedInstanceState: Bundle?) = R.layout.activity_search_map
...@@ -59,11 +56,6 @@ class SearchMapActivity : BaseActivity<ActivitySearchMapBinding, SearchMapViewMo ...@@ -59,11 +56,6 @@ class SearchMapActivity : BaseActivity<ActivitySearchMapBinding, SearchMapViewMo
binding.recyList.layoutManager = vLayout binding.recyList.layoutManager = vLayout
binding.recyList.adapter = mAdapter binding.recyList.adapter = mAdapter
//
// // 初始化建议搜索模块,注册建议搜索事件监听
// mSuggestionSearch = SuggestionSearch.newInstance()
// mSuggestionSearch?.setOnGetSuggestionResultListener(this)
binding.et.addTextChangedListener(object : TextWatcher { binding.et.addTextChangedListener(object : TextWatcher {
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) { override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {
} }
...@@ -84,14 +76,6 @@ class SearchMapActivity : BaseActivity<ActivitySearchMapBinding, SearchMapViewMo ...@@ -84,14 +76,6 @@ class SearchMapActivity : BaseActivity<ActivitySearchMapBinding, SearchMapViewMo
viewModel.searchabroad(s.toString()) viewModel.searchabroad(s.toString())
} }
// onGetSuggestionResult(postionConfig)
// // 使用建议搜索服务获取建议列表,结果在onSuggestionResult()中更新【这里也是百度三方的东西】
// mSuggestionSearch?.requestSuggestion(
// SuggestionSearchOption().keyword(s.toString()) // 关键字
// .city(viewModel.positioningBean?.city ?: "北京")
// )
} }
}) })
...@@ -203,27 +187,4 @@ class SearchMapActivity : BaseActivity<ActivitySearchMapBinding, SearchMapViewMo ...@@ -203,27 +187,4 @@ class SearchMapActivity : BaseActivity<ActivitySearchMapBinding, SearchMapViewMo
} }
} }
/**
* 获取在线建议搜索结果,得到requestSuggestion返回的搜索结果
* 【这里是第三方百度的东西】
* @param suggestionResult Sug检索结果
*/
/* override fun onGetSuggestionResult(suggestionResult: SuggestionResult?) {
if (suggestionResult == null || suggestionResult.allSuggestions == null) {
return
}
viewModel.searchAfterOneItems.clear()
if (TextUtils.isEmpty(binding.et.text)) {
return
}
for (info in suggestionResult.allSuggestions) {
viewModel.searchAfterOneItems.add(
SearchAfterItem(
viewModel, info.key, info.address, info.pt
)
)
}
}*/
} }
\ No newline at end of file
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