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
ff7a96fc
Commit
ff7a96fc
authored
Aug 17, 2021
by
张释方
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_1.0.1' of
http://gitlab.mints-id.com/android/android_street
into branch_zsf_2
parents
a35a846e
044c435b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
98 additions
and
116 deletions
+98
-116
zsmap.html
app/src/main/assets/web/zsmap.html
+0
-23
zsmap.js
app/src/main/assets/web/zsmap.js
+88
-89
map.js
app/src/main/assets/web/zsmap_files/map.js
+7
-1
GoogleMapFragment.kt
...java/com/mints/street/main/googlemap/GoogleMapFragment.kt
+3
-3
No files found.
app/src/main/assets/web/zsmap.html
View file @
ff7a96fc
...
...
@@ -38,29 +38,6 @@
margin-left
:
-35px
;
}
#bmap
{
width
:
100%
;
height
:
100%
;
overflow
:
hidden
;
margin
:
0
;
position
:
absolute
;
font-family
:
"微软雅黑"
;
}
.anchorBL
,
a
{
display
:
none
!important
;
}
#map
.gmnoprint
{
display
:
none
!important
;
}
.zsmaker
{
margin-top
:
35px
;
}
.scale
{
position
:
fixed
;
left
:
20px
;
...
...
app/src/main/assets/web/zsmap.js
View file @
ff7a96fc
...
...
@@ -58,7 +58,7 @@ var vm = new Vue({
scenics
:
[],
markes
:
[],
pxValue
:
50
,
gdcenter
:
null
gdcenter
:
null
},
created
:
function
()
{
...
...
@@ -148,6 +148,10 @@ var vm = new Vue({
if
(
params
!=
null
)
{
console
.
log
(
params
);
openScenicsFrame
(
params
);
G_MAP
.
setCenter
({
lat
:
params
.
lat
,
lng
:
params
.
lng
})
}
});
vm
.
markes
.
push
(
marker
);
...
...
@@ -200,6 +204,7 @@ var vm = new Vue({
}
},
G_initMap
:
function
(
point
,
zoomLevel
)
{
if
(
zoomLevel
==
undefined
||
zoomLevel
==
null
)
zoomLevel
=
15
;
...
...
@@ -221,6 +226,9 @@ var vm = new Vue({
rotateControl
:
false
,
fullscreenControl
:
false
,
clickableIcons
:
false
,
disableDoubleClickZoom
:
true
,
keyboardShortcuts
:
false
,
// gestureHandling: "auto"
// gestureHandling:"none",
// gestureHandling: "greedy",
...
...
@@ -238,35 +246,26 @@ var vm = new Vue({
vm
.
mapScale
=
getScaleInfos
(
zoomLevel
,
lat
,
vm
);
});
G_MAP
.
addListener
(
'zoom_changed'
,
function
()
{
console
.
log
(
"拖动"
,
vm
.
gdcenter
)
if
(
vm
.
gdcenter
!=
null
){
console
.
log
(
"++++>"
)
// G_MAP.panTo(vm.gdcenter) //第二次初始化
}
});
G_MAP
.
addListener
(
"dragend"
,
()
=>
{
centerChanged
();
});
document
.
addEventListener
(
"touchstart"
,
function
(
e
)
{
console
.
log
(
e
.
touches
);
if
(
e
.
touches
.
length
>
1
)
{
vm
.
gdcenter
=
{
lat
:
G_MAP
.
getCenter
().
lat
(),
lng
:
G_MAP
.
getCenter
().
lng
()
};
console
.
log
(
"两指"
,
vm
.
gdcenter
)
}
else
{
vm
.
gdcenter
=
null
;
console
.
log
(
"一指"
,
vm
.
gdcenter
)
}
},
false
);
// document.addEventListener("touchstart", function (e) {
// console.log(e.touches);
// if (e.touches.length > 1) {
// vm.gdcenter =
// {
// lat: G_MAP.getCenter().lat(),
// lng: G_MAP.getCenter().lng()
// };
// console.log("两指")
// } else {
// vm.gdcenter = null;
// console.log("一指")
// }
// }, false);
// G_MAP.addListener('zoom_changed', () => {
// console.log(G_MAP.getCenter().lat())
...
...
@@ -284,75 +283,75 @@ var vm = new Vue({
window
.
onload
=
function
()
{
allIsOk
();
//
init();
//
init();
}
function
init
()
{
vm
.
initZsMap
({
"lng"
:
0
,
"lat"
:
0
})
setTimeout
(
function
()
{
vm
.
doShowScenics
([
{
"name"
:
"故宫"
,
"img"
:
"https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg_camera/img/ui/homepage/1628578695759.jpeg"
,
"desc"
:
"北京故宫呀"
,
"lng"
:
"116.313355"
,
"lat"
:
"39.983856"
,
"blng"
:
"116.32222419295384"
,
"blat"
:
"39.99602192441332"
,
"bvid"
:
"01002200001309200841046795L"
}
]);
},
3000
)
setTimeout
(
function
()
{
vm
.
showVrButton
=
true
;
},
5000
)
setTimeout
(
function
()
{
vm
.
showVrButton
=
false
;
},
7000
)
setTimeout
(
function
()
{
vm
.
showVrButton
=
true
;
},
8000
)
setTimeout
(
function
()
{
vm
.
doCloseScenics
();
},
6000
)
setTimeout
(
function
()
{
G_MAP
.
setMapTypeId
(
'roadmap'
);
},
7000
)
setTimeout
(
function
()
{
G_MAP
.
setMapTypeId
(
'terrain'
);
},
11000
)
setTimeout
(
function
()
{
G_MAP
.
setMapTypeId
(
'satellite'
);
},
13000
)
setTimeout
(
function
()
{
G_MAP
.
setMapTypeId
(
'hybrid'
);
},
15000
)
setTimeout
(
function
()
{
vm
.
doShowScenics
([
{
"name"
:
"故宫"
,
"img"
:
"https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg_camera/img/ui/homepage/1628578695759.jpeg"
,
"desc"
:
"北京故宫呀"
,
"lng"
:
"116.313355"
,
"lat"
:
"39.983856"
,
"blng"
:
"116.32222419295384"
,
"blat"
:
"39.99602192441332"
,
"bvid"
:
"01002200001309200841046795L"
}
]);
},
9000
)
//
//
setTimeout(function () {
//
vm.doShowScenics([
//
{
//
"name": "故宫",
//
"img": "https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg_camera/img/ui/homepage/1628578695759.jpeg",
//
"desc": "北京故宫呀",
//
"lng": "116.313355",
//
"lat": "39.983856",
//
"blng": "116.32222419295384",
//
"blat": "39.99602192441332",
//
"bvid": "01002200001309200841046795L"
//
}
//
]);
//
}, 3000)
//
//
setTimeout(function () {
//
vm.showVrButton = true;
//
}, 5000)
//
//
setTimeout(function () {
//
vm.showVrButton = false;
//
}, 7000)
//
//
setTimeout(function () {
//
vm.showVrButton = true;
//
}, 8000)
//
//
setTimeout(function () {
//
vm.doCloseScenics();
//
}, 6000)
//
//
setTimeout(function () {
//
G_MAP.setMapTypeId('roadmap');
//
//
}, 7000)
//
setTimeout(function () {
//
G_MAP.setMapTypeId('terrain');
//
//
}, 11000)
//
//
setTimeout(function () {
//
G_MAP.setMapTypeId('satellite');
//
//
}, 13000)
//
setTimeout(function () {
//
G_MAP.setMapTypeId('hybrid');
//
//
}, 15000)
//
//
setTimeout(function () {
//
vm.doShowScenics([
//
{
//
"name": "故宫",
//
"img": "https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg_camera/img/ui/homepage/1628578695759.jpeg",
//
"desc": "北京故宫呀",
//
"lng": "116.313355",
//
"lat": "39.983856",
//
"blng": "116.32222419295384",
//
"blat": "39.99602192441332",
//
"bvid": "01002200001309200841046795L"
//
}
//
]);
//
}, 9000)
}
app/src/main/assets/web/zsmap_files/map.js
View file @
ff7a96fc
...
...
@@ -19,7 +19,13 @@ c?"a":_.Ir.satellite,null,null,"satellite",a.N,a.j,a.H,b,a.i)},jja=function(a,b)
_
.
Ir
.
roadmap
,
"m@"
+
a
.
O
,{
type
:
68
,
params
:{
set
:
"Roadmap"
}},
"roadmap"
,
a
.
N
,
a
.
j
,
a
.
H
,
void
0
,
a
.
i
):
"terrain"
==
b
?
new
us
(
jja
(
a
,
"terrain"
),
a
.
g
,
a
.
o
,
21
,
"
\
u5730
\
u5f62"
,
"
\
u663e
\
u793a
\
u5e26
\
u5730
\
u5f62
\
u7684
\
u8857
\
u9053
\
u5730
\
u56fe"
,
_
.
Ir
.
terrain
,
"r@"
+
a
.
O
,{
type
:
68
,
params
:{
set
:
"Terrain"
}},
"terrain"
,
a
.
N
,
a
.
j
,
a
.
H
,
void
0
,
a
.
i
):
new
us
(
jja
(
a
,
"roadmap"
),
a
.
g
,
a
.
o
,
22
,
"
\
u5730
\
u56fe"
,
"
\
u663e
\
u793a
\
u8857
\
u9053
\
u5730
\
u56fe"
,
_
.
Ir
.
roadmap
,
"m@"
+
a
.
O
,{
type
:
68
,
params
:{
set
:
"Roadmap"
}},
"roadmap"
,
a
.
N
,
a
.
j
,
a
.
H
,
void
0
,
a
.
i
);
return
b
},
lja
=
function
(
a
){
if
(
!
b
){
var
b
=
document
.
createElement
(
"div"
);
b
.
style
.
pointerEvents
=
"none"
;
b
.
style
.
width
=
"100%"
;
b
.
style
.
height
=
"100%"
;
b
.
style
.
boxSizing
=
"border-box"
;
b
.
style
.
position
=
"absolute"
;
b
.
style
.
zIndex
=
1000002
;
b
.
style
.
opacity
=
0
;
b
.
style
.
border
=
"2px solid #1a73e8"
}
new
_
.
Dn
(
a
,
"focus"
,
function
(){
b
.
style
.
opacity
=
_
.
Sr
?
_
.
tr
(
a
,
":focus-visible"
)?
1
:
0
:
!
1
===
_
.
Rr
?
0
:
1
});
new
_
.
Dn
(
a
,
"blur"
,
function
(){
b
.
style
.
opacity
=
0
});
return
b
},
mja
=
function
(
a
){
_
.
G
(
this
,
a
,
2
)},
As
=
function
(
a
){
_
.
G
(
this
,
a
,
14
)},
nja
=
function
(
a
){
Bs
||
(
Bs
=
{
oa
:
"mu4sesbebbeesb"
},
Bs
.
Da
=
[
_
.
Jl
()]);
var
b
=
Bs
;
return
_
.
wi
.
g
(
a
.
Kb
(),
b
)},
Cs
=
function
(
a
){
_
.
G
(
this
,
a
,
2
)},
Ds
=
function
(
a
){
_
.
G
(
this
,
a
,
2
)},
Es
=
function
(
a
){
_
.
G
(
this
,
a
,
4
)},
Fs
=
function
(
a
){
_
.
G
(
this
,
a
,
1
)},
Gs
=
function
(
a
){
_
.
G
(
this
,
a
,
8
)},
pja
=
function
(
a
){
this
.
g
=
a
;
this
.
i
=
_
.
nn
(
"p"
,
a
);
this
.
o
=
0
;
_
.
Mm
(
a
,
"gm-style-pbc"
);
_
.
Mm
(
this
.
i
,
"gm-style-pbt"
);
_
.
im
(
oja
,
a
);
a
.
style
.
transitionDuration
=
"0"
;
a
.
style
.
opacity
=
0
;
_
.
wn
(
a
)},
qja
=
function
(
a
,
b
){
var
c
=
_
.
qk
.
V
?
"
\
u6309
\
u4f4f
\
u2318
\
u5e76
\
u6eda
\
u52a8
\
u9f20
\
u6807
\
u6eda
\
u8f6e
\
u624d
\
u53ef
\
u7f29
\
u653e
\
u5730
\
u56fe"
:
"
\
u6309
\
u4f4f Ctrl
\
u5e76
\
u6eda
\
u52a8
\
u9f20
\
u6807
\
u6eda
\
u8f6e
\
u624d
\
u53ef
\
u7f29
\
u653e
\
u5730
\
u56fe"
;
a
.
i
.
textContent
=
(
void
0
===
b
?
0
:
b
)?
c
:
"
\
u4f7f
\
u7528
\
u53cc
\
u6307
\
u79fb
\
u52a8
\
u5730
\
u56fe"
;
a
.
g
.
style
.
transitionDuration
=
"0.3s"
;
a
.
g
.
style
.
opacity
=
1
},
rja
=
function
(
a
){
a
.
g
.
style
.
transitionDuration
=
"0.8s"
;
a
.
g
.
style
.
opacity
=
0
},
sja
=
function
(){
var
a
=
window
.
innerWidth
/
(
document
.
body
.
scrollWidth
+
1
);
return
.
95
>
window
.
innerHeight
/
(
document
.
body
.
scrollHeight
+
1
)
||
.
95
>
a
||
_
.
Aga
()},
tja
=
function
(
a
,
b
,
c
,
d
){
return
0
==
b
?
"none"
:
"none"
==
c
||
"greedy"
==
c
||
"zoomaroundcenter"
==
c
?
c
:
d
?
"greedy"
:
"cooperative"
==
c
||
a
()?
"cooperative"
:
"greedy"
},
a
.
i
.
textContent
=
(
void
0
===
b
?
0
:
b
)?
c
:
"
\
u4f7f
\
u7528
\
u53cc
\
u6307
\
u79fb
\
u52a8
\
u5730
\
u56fe"
;
a
.
g
.
style
.
transitionDuration
=
"0.3s"
;
a
.
g
.
style
.
opacity
=
1
},
rja
=
function
(
a
){
a
.
g
.
style
.
transitionDuration
=
"0.8s"
;
a
.
g
.
style
.
opacity
=
0
},
sja
=
function
(){
var
a
=
window
.
innerWidth
/
(
document
.
body
.
scrollWidth
+
1
);
return
.
95
>
window
.
innerHeight
/
(
document
.
body
.
scrollHeight
+
1
)
||
.
95
>
a
||
_
.
Aga
()},
tja
=
function
(
a
,
b
,
c
,
d
){
var
x
=
0
==
b
?
"none"
:
"none"
==
c
||
"greedy"
==
c
||
"zoomaroundcenter"
==
c
?
c
:
d
?
"greedy"
:
"cooperative"
==
c
||
a
()?
"cooperative"
:
"greedy"
if
(
x
=
'cooperative'
)
x
=
'zoomaroundcenter'
;
return
x
;
},
uja
=
function
(
a
){
return
new
_
.
Cn
([
a
.
draggable
,
a
.
av
,
a
.
hm
],
_
.
zk
(
tja
,
sja
))},
wja
=
function
(
a
,
b
,
c
,
d
){
var
e
=
this
;
this
.
g
=
a
;
this
.
o
=
b
;
this
.
N
=
c
.
Bf
;
this
.
O
=
d
;
this
.
H
=
0
;
this
.
j
=
null
;
this
.
i
=!
1
;
_
.
ho
(
c
.
Gh
,{
Sd
:
function
(
f
){
Hs
(
e
,
"mousedown"
,
f
.
coords
,
f
.
Ib
)},
ii
:
function
(
f
){
e
.
o
.
Zl
()
||
(
e
.
j
=
f
,
5
<
Date
.
now
()
-
e
.
H
&&
vja
(
e
))},
be
:
function
(
f
){
Hs
(
e
,
"mouseup"
,
f
.
coords
,
f
.
Ib
)},
onClick
:
function
(
f
){
var
g
=
f
.
coords
,
h
=
f
.
event
;
f
=
f
.
Ni
;
3
===
h
.
button
?
f
||
Hs
(
e
,
"rightclick"
,
g
,
h
.
Ib
):
f
?
Hs
(
e
,
"dblclick"
,
g
,
h
.
Ib
,
_
.
Gn
(
"dblclick"
,
g
,
h
.
Ib
)):
Hs
(
e
,
"click"
,
g
,
h
.
Ib
,
_
.
Gn
(
"click"
,
g
,
h
.
Ib
))},
Ei
:{
hi
:
function
(
f
,
g
){
e
.
i
||
(
e
.
i
=!
0
,
Hs
(
e
,
"dragstart"
,
f
.
Jd
,
g
.
Ib
))},
Gj
:
function
(
f
,
g
){
var
h
=
e
.
i
?
"drag"
:
"mousemove"
;
Hs
(
e
,
h
,
f
.
Jd
,
g
.
Ib
,
_
.
Gn
(
h
,
f
.
Jd
,
g
.
Ib
))},
Ti
:
function
(
f
,
g
){
e
.
i
&&
(
e
.
i
=!
1
,
Hs
(
e
,
"dragend"
,
f
,
g
.
Ib
))}},
Fj
:
function
(
f
){
_
.
On
(
f
);
Hs
(
e
,
"contextmenu"
,
f
.
coords
,
f
.
Ib
)}}).
Zi
(
!
0
);
new
_
.
En
(
c
.
Bf
,
c
.
Gh
,{
Fk
:
function
(
f
){
return
Hs
(
e
,
"mouseout"
,
f
,
f
)},
Gk
:
function
(
f
){
return
Hs
(
e
,
"mouseover"
,
f
,
f
)}})},
vja
=
function
(
a
){
if
(
a
.
j
){
var
b
=
a
.
j
;
xja
(
a
,
"mousemove"
,
b
.
coords
,
b
.
Ib
);
a
.
j
=
null
;
a
.
H
=
Date
.
now
()}},
Hs
=
function
(
a
,
b
,
c
,
d
,
e
){
vja
(
a
);
xja
(
a
,
b
,
c
,
d
,
e
)},
xja
=
function
(
a
,
b
,
c
,
d
,
e
){
var
f
=
e
||
d
,
g
=
a
.
o
.
Pf
(
c
),
h
=
_
.
Tl
(
g
,
a
.
g
.
getProjection
()),
k
=
a
.
N
.
getBoundingClientRect
();
c
=
new
_
.
Fn
(
h
,
f
,
new
_
.
M
(
c
.
clientX
-
k
.
left
,
c
.
clientY
-
k
.
top
),
new
_
.
M
(
g
.
g
,
g
.
i
));
var
l
=!!
d
&&!!
d
.
touches
,
m
=!!
d
&&
"touch"
===
d
.
pointerType
,
p
=!!
d
&&!!
window
.
MSPointerEvent
&&
d
.
pointerType
===
window
.
MSPointerEvent
.
MSPOINTER_TYPE_TOUCH
;
f
=
a
.
g
.
__gm
.
o
;
g
=
b
;
h
=
f
.
j
;
var
q
=
c
.
domEvent
&&
_
.
Tk
(
c
.
domEvent
);
if
(
f
.
g
){
k
=
f
.
g
;
var
r
=
f
.
o
}
else
if
(
"mouseout"
==
g
||
q
)
r
=
k
=
null
;
else
{
for
(
var
t
=
...
...
app/src/main/java/com/mints/street/main/googlemap/GoogleMapFragment.kt
View file @
ff7a96fc
...
...
@@ -280,9 +280,9 @@ class GoogleMapFragment() : BaseFragment<ActivityGoogleMapBinding, HomeViewModel
var
mutualBean
=
MutualBean
()
when
(
type
){
1
->
mutualBean
.
type
=
"hybrid"
2
->
mutualBean
.
type
=
"
roadmap
"
3
->
mutualBean
.
type
=
"
satellite
"
4
->
mutualBean
.
type
=
"
terrain
"
2
->
mutualBean
.
type
=
"
satellite
"
3
->
mutualBean
.
type
=
"
terrain
"
4
->
mutualBean
.
type
=
"
roadmap
"
}
binding
.
webview
.
callHandler
(
"changeMapType"
,
Gson
().
toJson
(
mutualBean
)
)
{
...
...
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