Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_street
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_street
Commits
039be24a
Commit
039be24a
authored
Aug 18, 2021
by
fengruiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
未登录时打开景点推荐,然后登陆,景点推荐全没了
问题已经解决
parent
f4d6a04f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
5 deletions
+17
-5
GoogleMapFragment.kt
...java/com/mints/street/main/googlemap/GoogleMapFragment.kt
+17
-5
No files found.
app/src/main/java/com/mints/street/main/googlemap/GoogleMapFragment.kt
View file @
039be24a
...
...
@@ -266,7 +266,8 @@ class GoogleMapFragment() : BaseFragment<ActivityGoogleMapBinding, HomeViewModel
* 第一次加载
*/
private
fun
beginInitZsMap
(
lat
:
Double
?
=
null
,
lng
:
Double
?
=
null
,
inner
:
Int
=
0
,
bean
:
HotViewBean
?=
null
)
{
inner
:
Int
=
0
,
bean
:
HotViewBean
?=
null
,
mapType
:
String
?
,
showVrButton
:
Int
?,
showScenics
:
Int
?)
{
val
initMapBean
=
InitMapBean
()
initMapBean
.
lat
=
lat
?:
gps
.
lat
initMapBean
.
lng
=
lng
?:
gps
.
lng
...
...
@@ -278,9 +279,9 @@ class GoogleMapFragment() : BaseFragment<ActivityGoogleMapBinding, HomeViewModel
initMapBean
.
vip
=
0
}
initMapBean
.
inner
=
inner
initMapBean
.
mapType
=
"hybrid"
initMapBean
.
showVrButton
=
1
initMapBean
.
showScenics
=
0
initMapBean
.
mapType
=
mapType
initMapBean
.
showVrButton
=
showVrButton
initMapBean
.
showScenics
=
showScenics
initMapBean
.
scenics
=
bean
?.
list
binding
.
webview
.
callHandler
(
"beginInitZsMap"
,
Gson
().
toJson
(
initMapBean
)
...
...
@@ -444,7 +445,18 @@ class GoogleMapFragment() : BaseFragment<ActivityGoogleMapBinding, HomeViewModel
})
viewModel
.
viewRecommed
.
observe
(
this
,
Observer
{
it
?.
apply
{
beginInitZsMap
(
gps
.
lat
,
gps
.
lng
,
bean
=
this
)
var
mapType
:
String
?
=
null
viewModel
.
mapStyleSortBean
.
value
?.
mapStyleSort
?.
get
(
0
)
?.
list
?.
forEach
outside
@
{
bean
->
if
(
bean
.
isSelected
==
true
){
mapType
=
bean
.
key
return
@outside
}
}
beginInitZsMap
(
gps
.
lat
,
gps
.
lng
,
bean
=
this
,
mapType
=
mapType
?:
"hybrid"
,
showVrButton
=
if
(
viewModel
.
mapStyleSortBean
.
value
?.
isStreetViewMap
==
true
){
1
}
else
{
0
}
,
showScenics
=
if
(
viewModel
.
mapStyleSortBean
.
value
?.
isRecommendedPlaces
==
true
){
1
}
else
{
0
})
}
})
}
...
...
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