Skip to content

Commit

Permalink
Fix new OpenLayers types
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner authored and renovate[bot] committed Aug 26, 2024
1 parent 34f9d21 commit 4926b22
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
7 changes: 4 additions & 3 deletions src/lidar/Manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import olStyleStyle from 'ol/style/Style';
import {select as d3select} from 'd3';

import OlMap from 'ol/Map';
import OlFeature from 'ol/Feature';
import OlOverlay from 'ol/Overlay';
import OlLayerVector from 'ol/layer/Vector';
import OlSourceVector from 'ol/source/Vector';
Expand Down Expand Up @@ -88,13 +89,13 @@ export class LidarprofileManager {
/**
* The hovered point geometry (point) in D3 profile highlighted on the 2D map.
*/
lidarPointHighlight: OlLayerVector<OlSourceVector<OlGeomGeometry>>;
lidarPointHighlight: OlLayerVector<OlSourceVector<OlFeature<OlGeomGeometry>>>;

/**
* The profile footpring represented as a LineString represented
* with real mapunites stroke width.
*/
lidarBuffer: OlLayerVector<OlSourceVector<OlGeomGeometry>>;
lidarBuffer: OlLayerVector<OlSourceVector<OlFeature<OlGeomGeometry>>>;

/**
* The variable where all points of the profile are stored.
Expand Down Expand Up @@ -632,7 +633,7 @@ export class LidarprofileManager {
domainX[1],
);

const source: olSourceVector<OlGeomGeometry> = this.lidarBuffer.getSource();
const source: olSourceVector<OlFeature<OlGeomGeometry>> = this.lidarBuffer.getSource();
source.clear();
source.addFeature(clip.bufferGeom);
this.lidarBuffer.setStyle(clip.bufferStyle);
Expand Down
2 changes: 1 addition & 1 deletion src/lidar/Plot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ export default class {
);
}

source.addFeature(lidarPointFeature);
source.addFeature(lidarPointFeature); // eslint-disable-line @typescript-eslint/no-unsafe-call
} else {
source.clear();
svg.select('#highlightCircle').remove();
Expand Down
6 changes: 3 additions & 3 deletions src/map/FeatureOverlayMgr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ export class FeatureOverlayMgr {

groups_: MapFeatureOverlayGroup[];

source_: OlSourceVector<OlGeomGeometry>;
source_: OlSourceVector<OlFeature<OlGeomGeometry>>;

layer_: OlLayerVector<OlSourceVector<OlGeomGeometry>>;
layer_: OlLayerVector<OlSourceVector<OlFeature<OlGeomGeometry>>>;

constructor() {
this.featureUidToGroupIndex_ = {};
Expand Down Expand Up @@ -137,7 +137,7 @@ export class FeatureOverlayMgr {
/**
* @returns {olLayerVector<olSourceVector<OlGeomGeometry>>} The vector layer used internally.
*/
getLayer(): olLayerVector<olSourceVector<OlGeomGeometry>> {
getLayer(): olLayerVector<olSourceVector<OlFeature<OlGeomGeometry>>> {
return this.layer_;
}

Expand Down

0 comments on commit 4926b22

Please sign in to comment.