Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_freeworld
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
android_freeworld
Commits
13c048f7
Commit
13c048f7
authored
Jul 31, 2021
by
fengruiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改搜索页面的问题
parent
f488b893
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
43 deletions
+12
-43
m.html
app/src/main/assets/web/m.html
+11
-3
SearchMapActivity.kt
...main/java/com/mints/street/main/home/SearchMapActivity.kt
+1
-40
No files found.
app/src/main/assets/web/m.html
View file @
13c048f7
...
...
@@ -32,8 +32,8 @@
<script
type=
"text/javascript"
charset=
"UTF-8"
src=
"./common/url.js"
></script>
<script>
document
.
write
(
'<script type="text/javascript"'
+
' src="https://api.map.baidu.com/api?v=3.0&ak='
+
getParam
(
"bk"
)
+
'"><
\
/script>'
)
document
.
write
(
'<script type="text/javascript"'
+
' src="https://api.map.baidu.com/api?v=3.0&ak='
+
getParam
(
"bk"
)
+
'"><
\
/script>'
)
</script>
...
...
@@ -42,6 +42,9 @@
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
panorama
=
new
BMap
.
Panorama
(
'panorama'
,
{
...
...
@@ -58,7 +61,12 @@
// a=116.316169
// b=40.005567
// 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});
...
...
app/src/main/java/com/mints/street/main/home/SearchMapActivity.kt
View file @
13c048f7
...
...
@@ -24,7 +24,6 @@ import com.mints.street.databinding.ActivitySearchMapBinding
* Created by 冯瑞雨 on 2021/7/13.
*/
class
SearchMapActivity
:
BaseActivity
<
ActivitySearchMapBinding
,
SearchMapViewModel
>()
{
// OnGetSuggestionResultListener {
companion
object
{
const
val
HISTORY_NAME
=
"history_name"
const
val
REQUEST_CODE
=
201
...
...
@@ -41,9 +40,7 @@ class SearchMapActivity : BaseActivity<ActivitySearchMapBinding, SearchMapViewMo
private
var
historyRecordAdapter
:
HistoryRecordAdapter
?
=
null
private
var
popularSceneAdapter
:
PopularSceneAdapter
?
=
null
//
// //检索模块
// private var mSuggestionSearch: SuggestionSearch? = null
override
fun
initContentView
(
savedInstanceState
:
Bundle
?)
=
R
.
layout
.
activity_search_map
...
...
@@ -59,11 +56,6 @@ class SearchMapActivity : BaseActivity<ActivitySearchMapBinding, SearchMapViewMo
binding
.
recyList
.
layoutManager
=
vLayout
binding
.
recyList
.
adapter
=
mAdapter
//
// // 初始化建议搜索模块,注册建议搜索事件监听
// mSuggestionSearch = SuggestionSearch.newInstance()
// mSuggestionSearch?.setOnGetSuggestionResultListener(this)
binding
.
et
.
addTextChangedListener
(
object
:
TextWatcher
{
override
fun
beforeTextChanged
(
s
:
CharSequence
?,
start
:
Int
,
count
:
Int
,
after
:
Int
)
{
}
...
...
@@ -84,14 +76,6 @@ class SearchMapActivity : BaseActivity<ActivitySearchMapBinding, SearchMapViewMo
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
}
}
/**
* 获取在线建议搜索结果,得到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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment