Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
supervise-front
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
5
Issues
5
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
牛晓林
supervise-front
Commits
fdefc12c
Commit
fdefc12c
authored
Aug 09, 2019
by
niuxiaolin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
latest ui 08/09/2019 17:15:01
parent
85e30543
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
70 additions
and
66 deletions
+70
-66
main.component.ts
src/app/main/main.component.ts
+56
-56
orgingetscript.js
src/assets/orgingetscript.js
+9
-9
styles.less
src/styles.less
+5
-1
No files found.
src/app/main/main.component.ts
View file @
fdefc12c
...
...
@@ -136,65 +136,65 @@ export class MainComponent implements OnInit {
}
});
this
.
setBound
();
this
.
dynamicScriptLoader
.
load
(
'drawing'
).
then
(
data
=>
{
// Script Loaded Successfully
drawingManager
.
addEventListener
(
'overlaycomplete'
,
e
=>
{
var
overlay
=
e
.
overlay
;
var
coordinates
=
[];
if
(
overlay
.
getPath
){
var
path
=
overlay
.
getPath
();
for
(
var
i
=
0
;
i
<
path
.
length
;
i
++
)
{
coordinates
.
push
([
path
[
i
].
lng
,
path
[
i
].
lat
]);
}
}
else
{
coordinates
.
push
(
overlay
.
getPosition
())
}
if
(
overlay
.
toString
()
==
'[object Polyline]'
)
{
if
(
this
.
type
==
CordType
.
PROJ
)
{
this
.
proj
.
course
=
this
.
currentCouseId
;
this
.
proj
.
coordinate
=
JSON
.
stringify
(
coordinates
);
this
.
modalService
.
open
(
'custom-modal-1'
);
}
else
if
(
this
.
type
==
CordType
.
COURSE
)
{
this
.
course
.
coordinate
=
JSON
.
stringify
(
coordinates
);
this
.
modalService
.
open
(
'custom-modal-2'
);
}
else
if
(
this
.
type
==
CordType
.
SECTION
)
{
this
.
section
.
project
=
this
.
currentProjId
;
this
.
section
.
coordinate
=
JSON
.
stringify
(
coordinates
);
this
.
modalService
.
open
(
'custom-modal-3'
);
}
}
else
if
(
overlay
.
toString
()
==
'[object Polygon]'
)
{
// geojsonStr = {
// "type": "Polygon",
// "coordinates": [coordinates]
// };
}
else
if
(
overlay
.
toString
()
==
"[object Marker]"
){
this
.
marker
.
coordinate
=
JSON
.
stringify
(
coordinates
[
0
]);
this
.
modalService
.
open
(
'marker'
);
}
// document.getElementById('result').innerHTML = "<div><span>左下角,右上角(经纬度):</span><button class='btn'>复制</button><p class='copyText'>" + sw.lng + "," + sw.lat + "," + ne.lng + "," + ne.lat + "</p></div>"
// + "<div><span>左下角,右上角(墨卡托坐标):</span><button class='btn'>复制</button><p class='copyText'>" + swMc.x + "," + swMc.y + "," + neMc.x + "," + neMc.y + "</p></div>"
// + "<div><span>坐标集(经纬度):</span><button class='btn'>复制</button><p class='copyText'>" + pathStr + "</p></div>"
// + "<div><span>坐标集(墨卡托坐标):</span><button class='btn'>复制</button><p class='copyText'>" + pathmcStr + "</p></div>"
// + "<div><span>geojson:</span><button class='btn'>复制</button><p class='copyText' style='white-space:nowrap;'>" + JSON.stringify(geojsonStr) + "</p></div>";
});
}).
catch
(
error
=>
console
.
log
(
error
));
this
.
route
.
queryParamMap
.
subscribe
(
queryParams
=>
{
this
.
debug
=
Boolean
(
queryParams
.
get
(
"debug"
))
if
(
this
.
debug
)
{
this
.
dynamicScriptLoader
.
load
(
'drawing'
).
then
(
data
=>
{
// Script Loaded Successfully
drawingManager
.
addEventListener
(
'overlaycomplete'
,
e
=>
{
var
overlay
=
e
.
overlay
;
var
coordinates
=
[];
if
(
overlay
.
getPath
){
var
path
=
overlay
.
getPath
();
for
(
var
i
=
0
;
i
<
path
.
length
;
i
++
)
{
coordinates
.
push
([
path
[
i
].
lng
,
path
[
i
].
lat
]);
}
}
else
{
coordinates
.
push
(
overlay
.
getPosition
())
}
if
(
overlay
.
toString
()
==
'[object Polyline]'
)
{
if
(
this
.
type
==
CordType
.
PROJ
)
{
this
.
proj
.
course
=
this
.
currentCouseId
;
this
.
proj
.
coordinate
=
JSON
.
stringify
(
coordinates
);
this
.
modalService
.
open
(
'custom-modal-1'
);
}
else
if
(
this
.
type
==
CordType
.
COURSE
)
{
this
.
course
.
coordinate
=
JSON
.
stringify
(
coordinates
);
this
.
modalService
.
open
(
'custom-modal-2'
);
}
else
if
(
this
.
type
==
CordType
.
SECTION
)
{
this
.
section
.
project
=
this
.
currentProjId
;
this
.
section
.
coordinate
=
JSON
.
stringify
(
coordinates
);
this
.
modalService
.
open
(
'custom-modal-3'
);
}
}
else
if
(
overlay
.
toString
()
==
'[object Polygon]'
)
{
// geojsonStr = {
// "type": "Polygon",
// "coordinates": [coordinates]
// };
}
else
if
(
overlay
.
toString
()
==
"[object Marker]"
){
this
.
marker
.
coordinate
=
JSON
.
stringify
(
coordinates
[
0
]);
this
.
modalService
.
open
(
'marker'
);
}
// document.getElementById('result').innerHTML = "<div><span>左下角,右上角(经纬度):</span><button class='btn'>复制</button><p class='copyText'>" + sw.lng + "," + sw.lat + "," + ne.lng + "," + ne.lat + "</p></div>"
// + "<div><span>左下角,右上角(墨卡托坐标):</span><button class='btn'>复制</button><p class='copyText'>" + swMc.x + "," + swMc.y + "," + neMc.x + "," + neMc.y + "</p></div>"
// + "<div><span>坐标集(经纬度):</span><button class='btn'>复制</button><p class='copyText'>" + pathStr + "</p></div>"
// + "<div><span>坐标集(墨卡托坐标):</span><button class='btn'>复制</button><p class='copyText'>" + pathmcStr + "</p></div>"
// + "<div><span>geojson:</span><button class='btn'>复制</button><p class='copyText' style='white-space:nowrap;'>" + JSON.stringify(geojsonStr) + "</p></div>";
});
}).
catch
(
error
=>
console
.
log
(
error
));
if
(
this
.
debug
){
var
node
=
document
.
getElementsByClassName
(
'BMapLib_Drawing'
)[
0
];
(
node
as
any
).
style
.
display
=
'block'
;
}
})
...
...
src/assets/orgingetscript.js
View file @
fdefc12c
...
...
@@ -11494,11 +11494,11 @@ function httpGetAsync(theUrl, callback)
window
.
onmousewheel
=
function
(
e
){
var
curZoom
=
map
.
getZoom
();
if
(
e
.
deltaY
>
0
){
map
.
setZoom
(
curZoom
-
1
);
}
else
{
map
.
setZoom
(
curZoom
+
1
);
}
}
\ No newline at end of file
// window.onmousewheel=function(e){
// var curZoom = map.getZoom();
// if(e.deltaY>0){
// map.setZoom(curZoom-1);
// }else{
// map.setZoom(curZoom+1);
// }
// }
\ No newline at end of file
src/styles.less
View file @
fdefc12c
...
...
@@ -266,7 +266,7 @@ body.jw-modal-open {
width: 4em;
line-break: strict;
white-space: initial;
margin-top:0.3em;
//
margin-top:0.3em;
}
legend{
...
...
@@ -280,3 +280,6 @@ legend{
font-size: 22px;
color:white;
}
.BMapLib_Drawing{
display: none;
}
\ No newline at end of file
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