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
432253ce
Commit
432253ce
authored
Apr 30, 2020
by
sunyuhua
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
a36cec83
8aaa888e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
road.jsp
src/main/webapp/WEB-INF/views/cmpt/road.jsp
+1
-1
road-new.js
src/main/webapp/static/js/road-new.js
+13
-2
No files found.
src/main/webapp/WEB-INF/views/cmpt/road.jsp
View file @
432253ce
...
@@ -97,7 +97,7 @@
...
@@ -97,7 +97,7 @@
</div>
</div>
<span
class=
"btn right upload"
>
载入路线
</span>
<span
class=
"btn right upload"
>
载入路线
</span>
<input
type=
"file"
style=
"display: none;"
onchange=
"uploadFile(this)"
>
<input
type=
"file"
id=
"route-file"
style=
"display: none;"
onchange=
"uploadFile(this)"
>
</div>
</div>
<div
id=
"map"
class=
"map"
></div>
<div
id=
"map"
class=
"map"
></div>
...
...
src/main/webapp/static/js/road-new.js
View file @
432253ce
var
layers
=
[];
$
(
document
).
ready
(
function
()
{
$
(
document
).
ready
(
function
()
{
$
(
'body'
).
on
(
'click'
,
'.addTempalte'
,
function
()
{
$
(
'body'
).
on
(
'click'
,
'.addTempalte'
,
function
()
{
$
(
this
).
parent
().
parent
().
find
(
'.equip-container'
).
append
(
"<div class=
\"
equip-item
\"
>
\n
"
+
$
(
this
).
parent
().
parent
().
find
(
'.equip-container'
).
append
(
"<div class=
\"
equip-item
\"
>
\n
"
+
...
@@ -127,8 +128,10 @@ function uploadFile(obj) {
...
@@ -127,8 +128,10 @@ function uploadFile(obj) {
$
(
'.equip-item[data-id='
+
dataId
+
']'
).
attr
(
'data-file-size'
,
logoFile
.
size
/
1024
);
$
(
'.equip-item[data-id='
+
dataId
+
']'
).
attr
(
'data-file-size'
,
logoFile
.
size
/
1024
);
$
(
'#gpsName'
).
text
(
logoFile
.
name
);
$
(
'#gpsName'
).
text
(
logoFile
.
name
);
saveRoad
(
dataId
,
logoFile
.
name
,
res
.
result
,
logoFile
.
size
/
1024
);
saveRoad
(
dataId
,
logoFile
.
name
,
res
.
result
,
logoFile
.
size
/
1024
);
clearLayers
()
loadGps
(
res
.
result
);
loadGps
(
res
.
result
);
// $('.equip-item[data-id='+dataId+']').find('.edit-new').trigger('click');
// $('.equip-item[data-id='+dataId+']').find('.edit-new').trigger('click');
$
(
'#route-file'
).
val
(
''
);
}
else
{
}
else
{
console
.
log
(
res
);
console
.
log
(
res
);
}
}
...
@@ -238,14 +241,22 @@ function createPath(pathObj) {
...
@@ -238,14 +241,22 @@ function createPath(pathObj) {
});
});
var
marker
=
L
.
marker
([
Number
(
e
.
latitude
),
Number
(
e
.
longitude
)]).
setIcon
(
myIcon1
);
var
marker
=
L
.
marker
([
Number
(
e
.
latitude
),
Number
(
e
.
longitude
)]).
setIcon
(
myIcon1
);
marker
.
addTo
(
map
.
instance
);
marker
.
addTo
(
map
.
instance
);
layers
.
push
(
marker
)
});
});
var
polyline
=
L
.
polyline
(
lineArr
,
{
stroke
:
true
,
fill
:
false
,
color
:
'red'
,
lineCap
:
'none'
,
weight
:
6
})
var
polyline
=
L
.
polyline
(
lineArr
,
{
stroke
:
true
,
fill
:
false
,
color
:
'red'
,
lineCap
:
'none'
,
weight
:
6
});
layers
.
push
(
polyline
);
polyline
.
addTo
(
map
.
instance
);
polyline
.
addTo
(
map
.
instance
);
map
.
instance
.
setView
(
center
);
map
.
instance
.
setView
(
center
);
map
.
instance
.
setZoom
(
12
);
map
.
instance
.
setZoom
(
12
);
}
}
function
clearLayers
()
{
layers
.
forEach
(
function
(
e
)
{
map
.
instance
.
removeLayer
(
e
)
});
layers
=
[];
}
function
getPath
(
roadId
)
{
function
getPath
(
roadId
)
{
$
.
ajax
({
$
.
ajax
({
url
:
'/gk/road/gps/'
+
roadId
,
url
:
'/gk/road/gps/'
+
roadId
,
...
...
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