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
com.akaver.sportmap
SportMap-aurelia
Commits
bc67da58
Commit
bc67da58
authored
May 24, 2020
by
Andres Käver
Browse files
clear map on gpssession change
parent
c4c89202
Pipeline
#837
passed with stages
in 1 minute and 20 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/services/base-service.ts
View file @
bc67da58
...
...
@@ -37,7 +37,7 @@ export class BaseService<TEntity> {
// happy case
if
(
response
.
ok
)
{
const
data
=
(
await
response
.
json
())
as
TEntity
[];
console
.
log
(
data
);
//
console.log(data);
return
{
statusCode
:
response
.
status
,
data
:
data
...
...
@@ -68,7 +68,7 @@ export class BaseService<TEntity> {
// happy case
if
(
response
.
ok
)
{
const
data
=
(
await
response
.
json
())
as
TEntity
;
console
.
log
(
data
);
//
console.log(data);
return
{
statusCode
:
response
.
status
,
data
:
data
...
...
src/services/culture-service.ts
View file @
bc67da58
...
...
@@ -21,7 +21,7 @@ export class CultureService extends BaseService<ICulture> {
// happy case
if
(
response
.
ok
)
{
const
data
=
(
await
response
.
json
())
as
ICulture
[];
console
.
log
(
data
);
//
console.log(data);
return
{
statusCode
:
response
.
status
,
data
:
data
...
...
src/services/gpslocation-service.ts
View file @
bc67da58
...
...
@@ -22,7 +22,7 @@ export class GpsLocationService extends BaseService<IGpsLocation> {
// happy case
if
(
response
.
ok
)
{
const
data
=
(
await
response
.
json
())
as
IGpsLocation
[];
console
.
log
(
data
);
//
console.log(data);
return
{
statusCode
:
response
.
status
,
data
:
data
...
...
src/utils/utils-leaflet.ts
View file @
bc67da58
...
...
@@ -75,7 +75,7 @@ export function getColorCodedPolylines(locations: IGpsLocation[], minPace: numbe
}
console
.
log
(
result
);
//
console.log(result);
return
result
;
}
...
...
src/views/home/index.ts
View file @
bc67da58
...
...
@@ -189,7 +189,24 @@ export class HomeIndex {
}
}
clearMap
():
void
{
for
(
const
i
in
(
this
.
map
as
any
).
_layers
)
{
// clear paths and icons
if
((
this
.
map
as
any
).
_layers
[
i
].
_path
!=
undefined
||
(
this
.
map
as
any
).
_layers
[
i
].
_icon
!=
undefined
)
{
try
{
this
.
map
.
removeLayer
((
this
.
map
as
any
).
_layers
[
i
]);
}
catch
(
e
)
{
log
.
error
(
"
problem with
"
+
e
+
(
this
.
map
as
any
).
_layers
[
i
]);
}
}
else
{
log
.
debug
((
this
.
map
as
any
).
_layers
[
i
]);
}
}
}
visualizeSession
():
void
{
this
.
clearMap
();
const
iconWp
=
L
.
icon
({
iconUrl
:
'
/marker-icon-wp.png
'
,
...
...
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