Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gk
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
micro_app
gk
Commits
af108c86
Commit
af108c86
authored
Apr 30, 2020
by
yangshuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自动提交代码
parent
e168bcd1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
29 deletions
+41
-29
KmlParserUtil.java
...m/dlbridge/jadp/plugins/cmpt/utils/gps/KmlParserUtil.java
+36
-24
AutoScoreController.java
...m/dlbridge/jadp/plugins/cmpt/web/AutoScoreController.java
+1
-1
menu.jsp
src/main/webapp/WEB-INF/views/common/menu.jsp
+1
-1
road-new.js
src/main/webapp/static/js/road-new.js
+3
-3
No files found.
src/main/java/com/dlbridge/jadp/plugins/cmpt/utils/gps/KmlParserUtil.java
View file @
af108c86
...
@@ -30,25 +30,13 @@ public class KmlParserUtil {
...
@@ -30,25 +30,13 @@ public class KmlParserUtil {
@SuppressWarnings
(
"rawtypes"
)
@SuppressWarnings
(
"rawtypes"
)
Node
name
=
doc
.
selectSingleNode
(
"//default:name"
);
Node
name
=
doc
.
selectSingleNode
(
"//default:name"
);
route
.
setName
(
name
.
getText
().
trim
());
route
.
setName
(
name
.
getText
().
trim
());
@SuppressWarnings
(
"rawtypes"
)
List
<
Node
>
selectNodes
=
doc
.
selectNodes
(
"//default:Placemark//default:LineString/default:coordinates"
);
List
<
Node
>
LineStringNodeList
=
doc
.
selectNodes
(
"//default:Placemark//default:LineString/default:coordinates"
);
List
<
Node
>
placeMark
;
List
<
Node
>
placeMark
;
if
(
null
!=
LineStringNodeList
&&
LineStringNodeList
.
size
()
>
0
)
{
if
(
null
!=
selectNodes
&&
selectNodes
.
size
()
>
0
)
{
@SuppressWarnings
(
"rawtypes"
)
placeMark
=
doc
.
selectNodes
(
"//default:Folder/default:Placemark"
);
List
<
Node
>
tempMark
=
doc
.
selectNodes
(
"//default:Folder/default:Placemark"
);
for
(
Node
node
:
selectNodes
)
{
placeMark
=
tempMark
;
}
else
{
@SuppressWarnings
(
"rawtypes"
)
List
<
Node
>
tempNodeList
=
doc
.
selectNodes
(
"//default:Folder/default:Placemark/gx:Track/gx:coord"
);
LineStringNodeList
=
tempNodeList
;
@SuppressWarnings
(
"rawtypes"
)
List
<
Node
>
tempMark
=
doc
.
selectNodes
(
"//default:Folder/default:Folder/default:Placemark"
);
placeMark
=
tempMark
;
}
for
(
Node
node
:
LineStringNodeList
)
{
String
lineString
=
node
.
getText
();
String
lineString
=
node
.
getText
();
String
[]
array
=
lineString
.
split
(
"
"
);
String
[]
array
=
lineString
.
split
(
"\n
"
);
TracePoint
tracePoint
;
TracePoint
tracePoint
;
for
(
String
string
:
array
)
{
for
(
String
string
:
array
)
{
if
(
string
.
trim
().
length
()
==
0
)
{
if
(
string
.
trim
().
length
()
==
0
)
{
...
@@ -66,6 +54,30 @@ public class KmlParserUtil {
...
@@ -66,6 +54,30 @@ public class KmlParserUtil {
route
.
getTracePoint
().
add
(
tracePoint
);
route
.
getTracePoint
().
add
(
tracePoint
);
}
}
}
}
}
else
{
List
<
Node
>
nodeList
=
doc
.
selectNodes
(
"//default:Folder/default:Placemark/gx:Track/gx:coord"
);
placeMark
=
doc
.
selectNodes
(
"//default:Folder/default:Placemark"
);
for
(
Node
node
:
nodeList
)
{
String
lineString
=
node
.
getText
();
String
[]
array
=
lineString
.
split
(
" "
);
TracePoint
tracePoint
;
if
(
array
.
length
==
0
)
{
continue
;
}
tracePoint
=
new
TracePoint
();
tracePoint
.
setLongitude
(
Double
.
parseDouble
(
array
[
0
].
trim
()));
tracePoint
.
setLatitude
(
Double
.
parseDouble
(
array
[
1
].
trim
()));
if
(
array
.
length
>=
3
)
{
tracePoint
.
setAltitude
(
Float
.
parseFloat
(
array
[
2
].
trim
()));
}
else
{
tracePoint
.
setAltitude
(
0
);
}
route
.
getTracePoint
().
add
(
tracePoint
);
}
}
@SuppressWarnings
(
"rawtypes"
)
@SuppressWarnings
(
"rawtypes"
)
Iterator
it
=
placeMark
.
iterator
();
Iterator
it
=
placeMark
.
iterator
();
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/web/AutoScoreController.java
View file @
af108c86
...
@@ -34,7 +34,7 @@ import java.util.stream.Collectors;
...
@@ -34,7 +34,7 @@ import java.util.stream.Collectors;
@Controller
@Controller
@Log4j2
@Log4j2
@RequestMapping
(
"gk/auto
score
"
)
@RequestMapping
(
"gk/auto"
)
@ApiIgnore
@ApiIgnore
public
class
AutoScoreController
{
public
class
AutoScoreController
{
...
...
src/main/webapp/WEB-INF/views/common/menu.jsp
View file @
af108c86
...
@@ -149,7 +149,7 @@
...
@@ -149,7 +149,7 @@
</a>
</a>
</li>
</li>
<li
class=
"auto menu-item"
>
<li
class=
"auto menu-item"
>
<a
href=
"/gk/auto
score
/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<a
href=
"/gk/auto/index/${cmpt.cmptId}?uId=${uId}&cId=${cId}×tamp=${timestamp}&sign=${sign}"
>
<span
class=
"menuico left-arrow"
></span>
<span
class=
"menuico left-arrow"
></span>
<span
class=
"menu-txt"
>
自助打卡
</span>
<span
class=
"menu-txt"
>
自助打卡
</span>
</a>
</a>
...
...
src/main/webapp/static/js/road-new.js
View file @
af108c86
...
@@ -90,7 +90,7 @@ $(document).ready(function () {
...
@@ -90,7 +90,7 @@ $(document).ready(function () {
type
:
'post'
,
type
:
'post'
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
if
(
data
.
status
)
{
if
(
data
.
status
)
{
parent
.
attr
(
'data-id'
,
data
.
content
.
roadId
);
//
parent.attr('data-id', data.content.roadId);
$
(
'.map-container'
).
css
(
'transform'
,
'none'
);
$
(
'.map-container'
).
css
(
'transform'
,
'none'
);
$
(
'.map-container'
).
attr
(
'data-id'
,
data
.
content
.
roadId
);
$
(
'.map-container'
).
attr
(
'data-id'
,
data
.
content
.
roadId
);
$
(
'.force'
).
hide
();
$
(
'.force'
).
hide
();
...
@@ -163,7 +163,7 @@ function saveRoad(id, fileName, fileUrl, fileSize) {
...
@@ -163,7 +163,7 @@ function saveRoad(id, fileName, fileUrl, fileSize) {
type
:
'post'
,
type
:
'post'
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
if
(
data
.
status
)
{
if
(
data
.
status
)
{
parent
.
attr
(
'data-id'
,
data
.
content
.
roadId
);
//
parent.attr('data-id', data.content.roadId);
$
(
'.map-container'
).
css
(
'transform'
,
'none'
);
$
(
'.map-container'
).
css
(
'transform'
,
'none'
);
$
(
'.map-container'
).
attr
(
'data-id'
,
data
.
content
.
roadId
);
$
(
'.map-container'
).
attr
(
'data-id'
,
data
.
content
.
roadId
);
$
(
'.force'
).
hide
();
$
(
'.force'
).
hide
();
...
@@ -220,7 +220,7 @@ var map = {
...
@@ -220,7 +220,7 @@ var map = {
function
createPath
(
pathObj
)
{
function
createPath
(
pathObj
)
{
var
lineArr
=
new
Array
();
//经纬度坐标数组
var
lineArr
=
new
Array
();
//经纬度坐标数组
var
center
=
[];
var
center
=
[
39.911836
,
116.399095
];
var
points
=
JSON
.
parse
(
pathObj
.
points
);
var
points
=
JSON
.
parse
(
pathObj
.
points
);
var
mid
=
Math
.
ceil
(
points
.
tracePoint
.
length
/
2
);
var
mid
=
Math
.
ceil
(
points
.
tracePoint
.
length
/
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