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
76a4f07b
Commit
76a4f07b
authored
Aug 06, 2019
by
niuxiaolin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
latest ui 08/06/2019 19:16:14
parent
e768663a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
8 deletions
+22
-8
default.service.ts
src/app/api/api/default.service.ts
+13
-7
mapv.js
src/assets/mapv.js
+9
-1
No files found.
src/app/api/api/default.service.ts
View file @
76a4f07b
...
@@ -36,6 +36,7 @@ import { Scetion } from '../model/scetion';
...
@@ -36,6 +36,7 @@ import { Scetion } from '../model/scetion';
import
{
BASE_PATH
,
COLLECTION_FORMATS
}
from
'../variables'
;
import
{
BASE_PATH
,
COLLECTION_FORMATS
}
from
'../variables'
;
import
{
Configuration
}
from
'../configuration'
;
import
{
Configuration
}
from
'../configuration'
;
import
{
Observable
}
from
'rxjs'
;
import
{
Observable
}
from
'rxjs'
;
import
{
environment
}
from
'src/environments/environment'
;
//import {environment} from '../../../environments';
//import {environment} from '../../../environments';
@
Injectable
()
@
Injectable
()
...
@@ -48,13 +49,18 @@ export class DefaultService {
...
@@ -48,13 +49,18 @@ export class DefaultService {
public
configuration
=
new
Configuration
();
public
configuration
=
new
Configuration
();
constructor
(
protected
httpClient
:
HttpClient
,
@
Optional
()@
Inject
(
BASE_PATH
)
basePath
:
string
,
@
Optional
()
configuration
:
Configuration
)
{
constructor
(
protected
httpClient
:
HttpClient
,
@
Optional
()@
Inject
(
BASE_PATH
)
basePath
:
string
,
@
Optional
()
configuration
:
Configuration
)
{
if
(
basePath
)
{
if
(
environment
.
production
){
this
.
basePath
=
basePath
;
this
.
basePath
=
"/"
;
}
}
else
{
if
(
configuration
)
{
this
.
basePath
=
"https://localhost:443"
;
this
.
configuration
=
configuration
;
}
this
.
basePath
=
basePath
||
configuration
.
basePath
||
this
.
basePath
;
// if (basePath) {
}
// this.basePath = basePath;
// }
// if (configuration) {
// this.configuration = configuration;
// this.basePath = basePath || configuration.basePath || this.basePath;
// }
}
}
/**
/**
...
...
src/assets/mapv.js
View file @
76a4f07b
...
@@ -489,6 +489,14 @@
...
@@ -489,6 +489,14 @@
}
}
var
index
=
1
;
var
index
=
1
;
var
step
=
0.5
;
var
step
=
0.5
;
var
currency
=
1
;
if
(
map
.
getZoom
()
>=
10
){
step
=
2
;
currency
=
1.4
;
}
else
{
step
=
0.5
;
currency
=
.
5
;
}
var
current
=
Object
.
assign
({},
points
[
0
]);
var
current
=
Object
.
assign
({},
points
[
0
]);
var
movStart
=
Object
.
assign
({},
points
[
0
]);
var
movStart
=
Object
.
assign
({},
points
[
0
]);
var
next
=
points
[
index
];
var
next
=
points
[
index
];
...
@@ -550,7 +558,7 @@
...
@@ -550,7 +558,7 @@
next
=
points
[
index
];
next
=
points
[
index
];
}
}
// console.log(Math.sqrt(Math.pow((current.x - next.x), 2) + Math.pow((current.y - next.y), 2)))
// console.log(Math.sqrt(Math.pow((current.x - next.x), 2) + Math.pow((current.y - next.y), 2)))
if
(
Math
.
sqrt
(
Math
.
pow
((
current
.
x
-
next
.
x
),
2
)
+
Math
.
pow
((
current
.
y
-
next
.
y
),
2
))
>
1
)
{
if
(
Math
.
sqrt
(
Math
.
pow
((
current
.
x
-
next
.
x
),
2
)
+
Math
.
pow
((
current
.
y
-
next
.
y
),
2
))
>
currency
)
{
drawLine
(
movStart
,
current
);
drawLine
(
movStart
,
current
);
current
.
x
+=
getStep
(
movStart
,
next
).
stepx
;
current
.
x
+=
getStep
(
movStart
,
next
).
stepx
;
current
.
y
+=
getStep
(
movStart
,
next
).
stepy
;
current
.
y
+=
getStep
(
movStart
,
next
).
stepy
;
...
...
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