Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Projets-INFO4
19-20
8
app-pghm
Commits
74c31db3
Commit
74c31db3
authored
Aug 18, 2020
by
Thomas Frion
Browse files
[WIP] WS Close, but there is some errors with an unknown origin
parent
c23f8ab8
Changes
3
Hide whitespace changes
Inline
Side-by-side
GendLoc/src/app/operation-view/operation-view.component.ts
View file @
74c31db3
...
...
@@ -212,7 +212,13 @@ export class OperationViewComponent implements OnInit, OnDestroy {
public
ngOnDestroy
():
void
{
this
.
subscriptions
.
forEach
(
s
=>
{
s
.
unsubscribe
();
try
{
s
.
unsubscribe
();
}
catch
(
error
)
{
console
.
log
(
s
);
console
.
error
(
error
);
}
});
this
.
subscriptions
=
undefined
;
this
.
updopews
.
destroy
();
...
...
GendLoc/src/app/operation/services/operation.service.ts
View file @
74c31db3
...
...
@@ -148,7 +148,7 @@ export class OperationService implements OnDestroy{
public
ngOnDestroy
():
void
{
this
.
subscriptions
.
forEach
(
s
=>
{
s
.
unsubscribe
();
//
s.unsubscribe();
})
}
}
\ No newline at end of file
GendLoc/src/app/sms-component/sms-component.component.ts
View file @
74c31db3
...
...
@@ -62,9 +62,6 @@ export class SmsComponentComponent implements OnInit, OnDestroy {
(
this
.
mapSrv
.
map
as
L
.
Map
).
addLayer
(
this
.
positions
);
})
);
// this.subscriptions.push(
// this.mapSrv.mapZoomChanged.subscribe(this.updateLayerZoom.bind(this))
// );
}
ngOnInit
():
void
{
...
...
@@ -118,7 +115,7 @@ export class SmsComponentComponent implements OnInit, OnDestroy {
public
ngOnDestroy
()
:
void
{
this
.
subscriptions
.
forEach
(
s
=>
{
s
.
unsubscribe
();
s
.
unsubscribe
();
});
this
.
wss
.
forEach
(
ws
=>
{
ws
.
destroy
()});
...
...
@@ -155,25 +152,4 @@ export class SmsComponentComponent implements OnInit, OnDestroy {
}
}).
addTo
(
this
.
positions
);
}
private
updateLayerZoom
()
:
void
{
this
.
positions
.
clearLayers
();
this
.
results
.
forEach
(
e
=>
{
L
.
geoJSON
(
<
any
>
e
,
{
pointToLayer
:
(
feat
,
latLng
)
=>
{
let
radius
=
feat
.
properties
.
accuracy
;
radius
=
radius
<=
15
?
15
:
radius
;
radius
*=
this
.
oldzoom
;
if
((
this
.
mapSrv
.
map
as
L
.
Map
).
getZoom
()
>
this
.
oldzoom
){
radius
/=
3
;
}
else
{
radius
*=
2
;
}
this
.
oldzoom
=
(
this
.
mapSrv
.
map
as
L
.
Map
).
getZoom
()
return
L
.
circle
(
latLng
,
radius
,
{
color
:
"
#ff0000
"
,
weight
:
5
})
}
}).
addTo
(
this
.
positions
);
});
}
}
Write
Preview
Supports
Markdown
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