Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DA-Platform
Overview
Overview
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
文档服务地址:
http://47.92.0.57:3000/
周报索引地址:
http://47.92.0.57:3000/s/NruNXRYmV
Open sidebar
Berlin
DA-Platform
Commits
0e79b9d3
Commit
0e79b9d3
authored
Aug 14, 2020
by
李梓桢
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
layer
parent
c9074c8c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
70 additions
and
7 deletions
+70
-7
layerAnnotation.vue
...-front/src/components/imageAnnotation/layerAnnotation.vue
+24
-5
layerShow.vue
...atform-front/src/components/imageAnnotation/layerShow.vue
+46
-2
textAnnotation.cpython-37.pyc
DAPlatform/views/__pycache__/textAnnotation.cpython-37.pyc
+0
-0
uploadDownload.cpython-37.pyc
DAPlatform/views/__pycache__/uploadDownload.cpython-37.pyc
+0
-0
No files found.
DAPlatform-front/src/components/imageAnnotation/layerAnnotation.vue
View file @
0e79b9d3
...
@@ -306,7 +306,7 @@
...
@@ -306,7 +306,7 @@
// 双击显示详细信息
// 双击显示详细信息
markInfo
(
index
)
{
markInfo
(
index
)
{
// 改变中心位置
// 改变中心位置
this
.
jumpByPosition
(
this
.
landmarkData
[
index
].
X
,
this
.
landmarkData
[
index
].
Y
)
this
.
setCenter
(
'mark'
,
this
.
landmarkData
[
index
]
)
this
.
isMark
=
true
this
.
isMark
=
true
this
.
labelNow
=
index
this
.
labelNow
=
index
...
@@ -317,7 +317,9 @@
...
@@ -317,7 +317,9 @@
},
},
areaInfo
(
index
)
{
areaInfo
(
index
)
{
this
.
findCenter
(
this
.
layerData
[
index
].
pointList
)
// 改变中心位置
this
.
setCenter
(
'polygon'
,
this
.
layerData
[
index
].
pointList
)
this
.
isMark
=
false
this
.
isMark
=
false
this
.
labelNow
=
index
this
.
labelNow
=
index
this
.
isInfo
=
true
this
.
isInfo
=
true
...
@@ -366,7 +368,7 @@
...
@@ -366,7 +368,7 @@
this
.
map
.
add
(
polygon
)
this
.
map
.
add
(
polygon
)
})
})
},
},
// 计算多边形几何中心
// 计算多边形几何中心
, 没有使用的函数
findCenter
(
pointList
){
findCenter
(
pointList
){
var
minX
=
1000
var
minX
=
1000
var
minY
=
1000
var
minY
=
1000
...
@@ -424,8 +426,25 @@
...
@@ -424,8 +426,25 @@
this
.
map
.
add
(
polygon
)
this
.
map
.
add
(
polygon
)
})
})
},
},
setCenter
()
{
setCenter
(
type
,
pointList
)
{
this
.
map
.
setCenter
([
this
.
centerY
,
this
.
centerX
])
if
(
type
==
'mark'
)
{
var
tmp
=
new
AMap
.
Marker
({
position
:
new
AMap
.
LngLat
(
pointList
.
X
,
pointList
.
Y
),
// 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
title
:
'tmp'
});
}
else
if
(
type
==
'polygon'
)
{
var
path
=
[]
pointList
.
forEach
(
e
=>
{
path
.
push
(
new
AMap
.
LngLat
(
e
.
X
,
e
.
Y
))
})
var
tmp
=
new
AMap
.
Polygon
({
path
:
path
,
fillColor
:
'#fff'
,
// 多边形填充颜色
borderWeight
:
2
,
// 线条宽度,默认为 1
strokeColor
:
'red'
,
// 线条颜色
})
}
this
.
map
.
setFitView
(
tmp
)
},
},
/**
/**
* 还原数据中的地标、标注区域
* 还原数据中的地标、标注区域
...
...
DAPlatform-front/src/components/imageAnnotation/layerShow.vue
View file @
0e79b9d3
...
@@ -315,6 +315,9 @@
...
@@ -315,6 +315,9 @@
},
},
// 双击显示详细信息
// 双击显示详细信息
markInfo
(
index
)
{
markInfo
(
index
)
{
// 改变中心位置
this
.
setCenter
(
'mark'
,
this
.
landmarkData
[
index
])
this
.
isMark
=
true
this
.
isMark
=
true
this
.
labelNow
=
index
this
.
labelNow
=
index
this
.
isInfo
=
true
this
.
isInfo
=
true
...
@@ -323,7 +326,11 @@
...
@@ -323,7 +326,11 @@
this
.
labelPosition
=
'X:'
+
this
.
landmarkData
[
index
].
X
+
'
\
nY:'
+
this
.
landmarkData
[
index
].
Y
this
.
labelPosition
=
'X:'
+
this
.
landmarkData
[
index
].
X
+
'
\
nY:'
+
this
.
landmarkData
[
index
].
Y
},
},
areaInfo
(
index
)
{
areaInfo
(
index
)
{
// 改变中心位置
this
.
setCenter
(
'polygon'
,
this
.
layerData
[
index
].
pointList
)
this
.
isMark
=
false
this
.
isMark
=
false
this
.
labelNow
=
index
this
.
labelNow
=
index
this
.
isInfo
=
true
this
.
isInfo
=
true
...
@@ -372,6 +379,26 @@
...
@@ -372,6 +379,26 @@
this
.
map
.
add
(
polygon
)
this
.
map
.
add
(
polygon
)
})
})
},
},
// 计算多边形几何中心,没有使用的函数
findCenter
(
pointList
){
var
minX
=
1000
var
minY
=
1000
var
maxX
=
-
1000
var
maxY
=
-
1000
pointList
.
forEach
((
element
,
i
)
=>
{
if
(
element
.
X
<
minX
)
minX
=
element
.
X
if
(
element
.
X
>
maxX
)
maxX
=
element
.
X
if
(
element
.
Y
<
minY
)
minY
=
element
.
Y
if
(
element
.
Y
>
maxY
)
maxY
=
element
.
Y
})
let
midX
=
(
minX
+
maxX
)
/
2
let
midY
=
(
minY
+
maxY
)
/
2
this
.
jumpByPosition
(
midX
,
midY
)
},
markEnter
(
index
)
{
markEnter
(
index
)
{
//还原地标
//还原地标
this
.
map
.
clearMap
()
this
.
map
.
clearMap
()
...
@@ -409,8 +436,25 @@
...
@@ -409,8 +436,25 @@
this
.
map
.
add
(
polygon
)
this
.
map
.
add
(
polygon
)
})
})
},
},
setCenter
()
{
setCenter
(
type
,
pointList
)
{
this
.
map
.
setCenter
([
this
.
centerY
,
this
.
centerX
])
if
(
type
==
'mark'
)
{
var
tmp
=
new
AMap
.
Marker
({
position
:
new
AMap
.
LngLat
(
pointList
.
X
,
pointList
.
Y
),
// 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
title
:
'tmp'
});
}
else
if
(
type
==
'polygon'
)
{
var
path
=
[]
pointList
.
forEach
(
e
=>
{
path
.
push
(
new
AMap
.
LngLat
(
e
.
X
,
e
.
Y
))
})
var
tmp
=
new
AMap
.
Polygon
({
path
:
path
,
fillColor
:
'#fff'
,
// 多边形填充颜色
borderWeight
:
2
,
// 线条宽度,默认为 1
strokeColor
:
'red'
,
// 线条颜色
})
}
this
.
map
.
setFitView
(
tmp
)
},
},
/**
/**
* 还原数据中的地标、标注区域
* 还原数据中的地标、标注区域
...
...
DAPlatform/views/__pycache__/textAnnotation.cpython-37.pyc
View file @
0e79b9d3
No preview for this file type
DAPlatform/views/__pycache__/uploadDownload.cpython-37.pyc
View file @
0e79b9d3
No preview for this file type
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