diff --git a/src/app/modules/map/ol/lib/navigation/layer-bearing-line.component.ts b/src/app/modules/map/ol/lib/navigation/layer-bearing-line.component.ts index 67a4c593..d99ed9d0 100644 --- a/src/app/modules/map/ol/lib/navigation/layer-bearing-line.component.ts +++ b/src/app/modules/map/ol/lib/navigation/layer-bearing-line.component.ts @@ -237,7 +237,7 @@ export class BearingLineComponent implements OnInit, OnDestroy, OnChanges { // update feature labels updateLabel(f?: Feature) { if (!f && this.source) { - f = this.source.getFeatureById('d.base'); + f = (this.source.getFeatureById('d.base') as Feature); } const s: StyleLike = f.getStyle(); if (!s) { diff --git a/src/app/modules/map/ol/lib/resources/layer-sktarget-tracks.component.ts b/src/app/modules/map/ol/lib/resources/layer-sktarget-tracks.component.ts index 7fa8e18c..4a628c05 100644 --- a/src/app/modules/map/ol/lib/resources/layer-sktarget-tracks.component.ts +++ b/src/app/modules/map/ol/lib/resources/layer-sktarget-tracks.component.ts @@ -164,7 +164,7 @@ export class SKTargetTracksLayerComponent if (this.tracks.has(w)) { const target = this.tracks.get(w); // ** target ** - let f = this.source.getFeatureById('track-' + w); + let f = (this.source.getFeatureById('track-' + w) as Feature); if (f) { // exists so update it f.setGeometry(new MultiLineString(this.parseCoordinates(target))); @@ -191,7 +191,7 @@ export class SKTargetTracksLayerComponent return; } ids.forEach((w) => { - const f = this.source.getFeatureById('track-' + w); + const f = (this.source.getFeatureById('track-' + w) as Feature); if (f) { this.source.removeFeature(f); } diff --git a/src/app/modules/map/ol/lib/resources/layer-sktargets.component.ts b/src/app/modules/map/ol/lib/resources/layer-sktargets.component.ts index 09788c01..6a2e247e 100644 --- a/src/app/modules/map/ol/lib/resources/layer-sktargets.component.ts +++ b/src/app/modules/map/ol/lib/resources/layer-sktargets.component.ts @@ -182,7 +182,7 @@ export class SKTargetsLayerComponent implements OnInit, OnDestroy, OnChanges { if (this.targets.has(w)) { const target = this.targets.get(w); // ** target ** - let f = this.source.getFeatureById(w); + let f = (this.source.getFeatureById(w) as Feature); if (f) { // exists so update it if (target.position) { @@ -221,7 +221,7 @@ export class SKTargetsLayerComponent implements OnInit, OnDestroy, OnChanges { if (this.targetType && w.indexOf(this.targetType) !== 0) { return; } - const f = this.source.getFeatureById(w); + const f = (this.source.getFeatureById(w) as Feature); if (f) { this.source.removeFeature(f); } diff --git a/src/app/modules/map/ol/lib/resources/layer-skvessels.component.ts b/src/app/modules/map/ol/lib/resources/layer-skvessels.component.ts index 832248c9..c137b3e1 100644 --- a/src/app/modules/map/ol/lib/resources/layer-skvessels.component.ts +++ b/src/app/modules/map/ol/lib/resources/layer-skvessels.component.ts @@ -234,7 +234,7 @@ export class SKVesselsLayerComponent implements OnInit, OnDestroy, OnChanges { if (this.targets.has(w)) { const target = this.targets.get(w); // ** target ** - let f = this.source.getFeatureById('ais-' + w); + let f = (this.source.getFeatureById('ais-' + w) as Feature); if (f) { // exists so update it if (this.okToRender(w) && target.position) { @@ -287,7 +287,7 @@ export class SKVesselsLayerComponent implements OnInit, OnDestroy, OnChanges { return; } - let wf = this.source.getFeatureById('wind-' + id); + let wf = (this.source.getFeatureById('wind-' + id) as Feature); if (!this.okToRender(id, true) || !target.position) { if (wf) { this.source.removeFeature(wf); @@ -326,11 +326,11 @@ export class SKVesselsLayerComponent implements OnInit, OnDestroy, OnChanges { return; } ids.forEach((w) => { - let f = this.source.getFeatureById('ais-' + w); + let f = (this.source.getFeatureById('ais-' + w) as Feature); if (f) { this.source.removeFeature(f); } - f = this.source.getFeatureById('wind-' + w); + f = (this.source.getFeatureById('wind-' + w) as Feature); if (f) { this.source.removeFeature(f); } diff --git a/src/app/modules/map/ol/lib/vessel/layer-vessel-trail.component.ts b/src/app/modules/map/ol/lib/vessel/layer-vessel-trail.component.ts index 1eb968ed..d818e27c 100644 --- a/src/app/modules/map/ol/lib/vessel/layer-vessel-trail.component.ts +++ b/src/app/modules/map/ol/lib/vessel/layer-vessel-trail.component.ts @@ -138,7 +138,7 @@ export class VesselTrailComponent implements OnInit, OnDestroy, OnChanges { this.trailLocal.setStyle(this.buildStyle('local')); } else { //update feature - this.trailLocal = this.source.getFeatureById('trail.self.local'); + this.trailLocal = (this.source.getFeatureById('trail.self.local') as Feature); if (this.localTrail && Array.isArray(this.localTrail)) { const g: Geometry = this.trailLocal.getGeometry(); (g as LineString).setCoordinates(c); @@ -160,7 +160,7 @@ export class VesselTrailComponent implements OnInit, OnDestroy, OnChanges { this.trailServer.setStyle(this.buildStyle('server')); } else { //update feature - this.trailServer = this.source.getFeatureById('trail.self.server'); + this.trailServer = (this.source.getFeatureById('trail.self.server') as Feature); if (this.serverTrail && Array.isArray(this.serverTrail)) { const g: Geometry = this.trailServer.getGeometry(); (g as MultiLineString).setCoordinates(ca);