Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
Z
zhxf_vue
Project
Project
Details
Activity
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
葛齐林
zhxf_vue
Commits
515634d7
Commit
515634d7
authored
May 12, 2021
by
xiexingan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
5dcc9ecb
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1527 additions
and
14 deletions
+1527
-14
index copy.vue
src/pages/ol/demo/index copy.vue
+1520
-0
index.vue
src/pages/ol/demo/index.vue
+7
-14
No files found.
src/pages/ol/demo/index copy.vue
0 → 100644
View file @
515634d7
This diff is collapsed.
Click to expand it.
src/pages/ol/demo/index.vue
View file @
515634d7
...
@@ -128,7 +128,6 @@ export default {
...
@@ -128,7 +128,6 @@ export default {
boxBean
:
{},
//防区对象
boxBean
:
{},
//防区对象
imgLayerList
:
[],
imgLayerList
:
[],
controlList
:
[],
controlList
:
[],
imgurl
:
''
,
transformationSta
:
1
,
transformationSta
:
1
,
isCollapse
:
true
,
isCollapse
:
true
,
dataList
:
[],
dataList
:
[],
...
@@ -223,16 +222,12 @@ export default {
...
@@ -223,16 +222,12 @@ export default {
},
},
methods
:
{
methods
:
{
// 初始化地图
// 初始化地图
initMap
(
url
)
{
initMap
()
{
this
.
clearLayer
()
this
.
resolutions
=
[]
this
.
resolutions
=
[]
this
.
imgLayerList
=
[]
this
.
controlList
=
[]
let
mapList
=
this
.
mapList
let
mapList
=
this
.
mapList
let
mapsrcList
=
[]
if
(
mapList
!=
null
&&
mapList
.
length
>
0
)
{
mapsrcList
=
mapList
.
map
((
e
)
=>
e
.
readPath
)
}
// console.log(mapsrcList,'111图片地址集合') //图片
this
.
imgurl
=
url
// 计算静态地图映射到地图上的范围
// 计算静态地图映射到地图上的范围
let
extent
=
[
-
1100
,
110
,
1460
,
820
]
let
extent
=
[
-
1100
,
110
,
1460
,
820
]
...
@@ -278,7 +273,7 @@ export default {
...
@@ -278,7 +273,7 @@ export default {
this
.
resolutions
.
push
(
resolutionItem
)
this
.
resolutions
.
push
(
resolutionItem
)
}
}
}
}
console
.
log
(
'imgLayerList'
,
this
.
imgLayerList
)
let
zoomControl
=
new
Zoom
({
let
zoomControl
=
new
Zoom
({
delta
:
0.2
,
delta
:
0.2
,
zoomInTipLabel
:
''
,
zoomInTipLabel
:
''
,
...
@@ -799,6 +794,7 @@ export default {
...
@@ -799,6 +794,7 @@ export default {
this
.
changeVectorLayer
(
this
.
list
)
this
.
changeVectorLayer
(
this
.
list
)
},
},
initStation
(
id
)
{
initStation
(
id
)
{
this
.
clearLayer
()
console
.
log
(
'22222222222222'
)
console
.
log
(
'22222222222222'
)
this
.
$http
({
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
`/liStation/getId/
${
id
}
`
),
url
:
this
.
$http
.
adornUrl
(
`/liStation/getId/
${
id
}
`
),
...
@@ -885,7 +881,6 @@ export default {
...
@@ -885,7 +881,6 @@ export default {
this
.
map
.
addControl
(
this
.
controlList
[
srcIndex
])
this
.
map
.
addControl
(
this
.
controlList
[
srcIndex
])
for
(
var
k
=
0
;
k
<
this
.
imgLayerList
.
length
;
k
++
)
{
for
(
var
k
=
0
;
k
<
this
.
imgLayerList
.
length
;
k
++
)
{
if
(
this
.
imgLayerList
[
k
].
values_
.
id
==
id
)
{
if
(
this
.
imgLayerList
[
k
].
values_
.
id
==
id
)
{
// that.imgurl=map.readPath
this
.
imgLayerList
[
k
].
setVisible
(
true
)
this
.
imgLayerList
[
k
].
setVisible
(
true
)
}
else
{
}
else
{
this
.
imgLayerList
[
k
].
setVisible
(
false
)
this
.
imgLayerList
[
k
].
setVisible
(
false
)
...
@@ -964,9 +959,7 @@ export default {
...
@@ -964,9 +959,7 @@ export default {
console
.
log
(
'选中节点的层级'
,
node
)
console
.
log
(
'选中节点的层级'
,
node
)
if
(
node
.
level
===
3
)
{
if
(
node
.
level
===
3
)
{
//切换根节点
//切换根节点
this
.
clearLayer
()
this
.
initStation
(
id
)
this
.
initStation
(
id
)
console
.
log
(
this
.
mapList
)
}
else
if
(
node
.
level
===
4
)
{
}
else
if
(
node
.
level
===
4
)
{
this
.
map
.
removeLayer
(
this
.
boxVectorLayer
)
this
.
map
.
removeLayer
(
this
.
boxVectorLayer
)
...
...
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