Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
E
energyai_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
葛齐林
energyai_vue
Commits
722c46df
Commit
722c46df
authored
Apr 09, 2021
by
co_dengxiongwen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
格式化
parent
c7596845
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
index.vue
src/pages/sys/point/index.vue
+11
-10
No files found.
src/pages/sys/point/index.vue
View file @
722c46df
...
...
@@ -252,12 +252,13 @@ export default {
this
.
changeVectorLayer
(
this
.
list
)
this
.
map
.
on
(
'click'
,
function
(
evt
)
{
let
feature
=
evt
.
map
.
forEachFeatureAtPixel
(
evt
.
pixel
,
function
(
feature
)
{
return
feature
})
this
.
map
.
on
(
'click'
,
function
(
evt
)
{
let
feature
=
evt
.
map
.
forEachFeatureAtPixel
(
evt
.
pixel
,
function
(
feature
)
{
return
feature
}
)
console
.
log
(
'***当前点击***'
,
feature
)
let
coordinate
=
evt
.
coordinate
//鼠标单击点的坐标
if
(
feature
)
{
...
...
@@ -400,7 +401,7 @@ export default {
let
bean
=
null
//画线开始事件
this
.
draw
.
on
(
'drawstart'
,
function
(
evt
)
{
this
.
draw
.
on
(
'drawstart'
,
function
(
evt
)
{
//获取坐标
let
coordinate
=
evt
.
target
.
sketchCoords_
[
0
]
//添加点
...
...
@@ -409,7 +410,7 @@ export default {
that
.
list
.
push
(
bean
)
})
//画线结束事件
this
.
draw
.
on
(
'drawend'
,
function
(
evt
)
{
this
.
draw
.
on
(
'drawend'
,
function
(
evt
)
{
//将draw绘制的线设置为透明色
evt
.
feature
.
setStyle
(
that
.
setLineNone
)
//获取坐标
...
...
@@ -592,7 +593,7 @@ export default {
//获取当前拖拽的feature对象,该feature没有id,
let
feature
=
e
.
mapBrowserEvent
.
map
.
forEachFeatureAtPixel
(
pixel
,
function
(
feature
)
{
function
(
feature
)
{
return
feature
}
)
...
...
@@ -1407,7 +1408,7 @@ export default {
},
clickMap
()
{
let
that
=
this
this
.
map
.
on
(
'click'
,
function
(
e
)
{
this
.
map
.
on
(
'click'
,
function
(
e
)
{
that
.
jing
=
parseFloat
(
e
.
coordinate
[
0
]).
toFixed
(
2
)
that
.
wei
=
parseFloat
(
e
.
coordinate
[
1
]).
toFixed
(
2
)
})
...
...
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