Skip to content

Commit 7ef7ec5

Browse files
committed
Fix new OpenLayers types
1 parent 1dfba02 commit 7ef7ec5

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

src/lidar/Manager.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ import olStyleStyle from 'ol/style/Style';
4747
import {select as d3select} from 'd3';
4848

4949
import OlMap from 'ol/Map';
50+
import OlFeature from 'ol/Feature';
5051
import OlOverlay from 'ol/Overlay';
5152
import OlLayerVector from 'ol/layer/Vector';
5253
import OlSourceVector from 'ol/source/Vector';
@@ -88,13 +89,13 @@ export class LidarprofileManager {
8889
/**
8990
* The hovered point geometry (point) in D3 profile highlighted on the 2D map.
9091
*/
91-
lidarPointHighlight: OlLayerVector<OlSourceVector<OlGeomGeometry>>;
92+
lidarPointHighlight: OlLayerVector<OlSourceVector<OlFeature<OlGeomGeometry>>>;
9293

9394
/**
9495
* The profile footpring represented as a LineString represented
9596
* with real mapunites stroke width.
9697
*/
97-
lidarBuffer: OlLayerVector<OlSourceVector<OlGeomGeometry>>;
98+
lidarBuffer: OlLayerVector<OlSourceVector<OlFeature<OlGeomGeometry>>>;
9899

99100
/**
100101
* The variable where all points of the profile are stored.
@@ -632,7 +633,7 @@ export class LidarprofileManager {
632633
domainX[1],
633634
);
634635

635-
const source: olSourceVector<OlGeomGeometry> = this.lidarBuffer.getSource();
636+
const source: olSourceVector<OlFeature<OlGeomGeometry>> = this.lidarBuffer.getSource();
636637
source.clear();
637638
source.addFeature(clip.bufferGeom);
638639
this.lidarBuffer.setStyle(clip.bufferStyle);

src/lidar/Plot.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ export default class {
515515
);
516516
}
517517

518-
source.addFeature(lidarPointFeature);
518+
source.addFeature(lidarPointFeature); // eslint-disable-line @typescript-eslint/no-unsafe-call
519519
} else {
520520
source.clear();
521521
svg.select('#highlightCircle').remove();

src/map/FeatureOverlayMgr.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ export class FeatureOverlayMgr {
6666

6767
groups_: MapFeatureOverlayGroup[];
6868

69-
source_: OlSourceVector<OlGeomGeometry>;
69+
source_: OlSourceVector<OlFeature<OlGeomGeometry>>;
7070

71-
layer_: OlLayerVector<OlSourceVector<OlGeomGeometry>>;
71+
layer_: OlLayerVector<OlSourceVector<OlFeature<OlGeomGeometry>>>;
7272

7373
constructor() {
7474
this.featureUidToGroupIndex_ = {};
@@ -137,7 +137,7 @@ export class FeatureOverlayMgr {
137137
/**
138138
* @returns {olLayerVector<olSourceVector<OlGeomGeometry>>} The vector layer used internally.
139139
*/
140-
getLayer(): olLayerVector<olSourceVector<OlGeomGeometry>> {
140+
getLayer(): olLayerVector<olSourceVector<OlFeature<OlGeomGeometry>>> {
141141
return this.layer_;
142142
}
143143

0 commit comments

Comments
 (0)