Skip to content

Commit

Permalink
OpenLayers 8.2.0 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
mmomtchev committed Nov 16, 2023
1 parent 249141b commit 9bb2deb
Show file tree
Hide file tree
Showing 14 changed files with 41 additions and 34 deletions.
1 change: 1 addition & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
- '7.5.1'
- '8.0.0'
- '8.1.0'
- '8.2.0'

steps:
- run: echo "::add-mask::${{ secrets.STADIA_MAPS_API_KEY }}"
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

#

- Support OpenLayers 8.2.0

# [2.1.0] 2023-09-13

- Support OpenLayers 8.0.0 and 8.1.0
Expand Down
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,16 @@ _React_ is supported from version 16.8.0.

---

| rlayers | Unit-tested _OpenLayers_ versions | Unit-tested _React_ versions |
| ---------------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------- |
| 1.0 (_obsolete_) | 6.0 | 16.8, 16.14, 17.0.2 |
| 1.1 (_obsolete_) | 6.6, 6.7, 6.8, 6.9 | 16.8, 16.14, 17.0.2 |
| 1.2 (_obsolete_) | 6.6, 6.7, 6.8, 6.9 | 16.8, 16.14, 17.0.2 |
| 1.3 (_obsolete_) | 6.10, 6.11, 6.12, 6.13, 6.14, 6.14.1 | 16.8, 16.14, 17.0.2, 18.0.0 |
| 1.4 (_obsolete_) | 6.10, 6.11, 6.12, 6.13, 6.14, 6.14.1, 6.15, 6.15.1, 7.0.0, 7.1.0, 7.2.0, 7.2.2, 7.3.0 | 16.8, 16.14, 17.0.2, 18.0.0, 18.1.0, 18.2.0 |
| 1.5 (_obsolete_) | 6.10, 6.11, 6.12, 6.13, 6.14, 6.14.1, 6.15, 6.15.1, 7.0.0, 7.1.0, 7.2.0, 7.2.2, 7.3.0, 7.4.0 | 16.8, 16.14, 17.0.2, 18.0.0, 18.1.0, 18.2.0 |
| 2.0 `(@latest)` | 6.10, 6.11, 6.12, 6.13, 6.14, 6.14.1, 6.15, 6.15.1, 7.0.0, 7.1.0, 7.2.0, 7.2.2, 7.3.0, 7.4.0, 7.5.1, 8.0.0, 8.1.0 | 16.8, 16.14, 17.0.2, 18.0.0, 18.1.0, 18.2.0 |
| rlayers | Unit-tested _OpenLayers_ versions | Unit-tested _React_ versions |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------- |
| 1.0 (_obsolete_) | 6.0 | 16.8, 16.14, 17.0.2 |
| 1.1 (_obsolete_) | 6.6, 6.7, 6.8, 6.9 | 16.8, 16.14, 17.0.2 |
| 1.2 (_obsolete_) | 6.6, 6.7, 6.8, 6.9 | 16.8, 16.14, 17.0.2 |
| 1.3 (_obsolete_) | 6.10, 6.11, 6.12, 6.13, 6.14, 6.14.1 | 16.8, 16.14, 17.0.2, 18.0.0 |
| 1.4 (_obsolete_) | 6.10, 6.11, 6.12, 6.13, 6.14, 6.14.1, 6.15, 6.15.1, 7.0.0, 7.1.0, 7.2.0, 7.2.2, 7.3.0 | 16.8, 16.14, 17.0.2, 18.0.0, 18.1.0, 18.2.0 |
| 1.5 (_obsolete_) | 6.10, 6.11, 6.12, 6.13, 6.14, 6.14.1, 6.15, 6.15.1, 7.0.0, 7.1.0, 7.2.0, 7.2.2, 7.3.0, 7.4.0 | 16.8, 16.14, 17.0.2, 18.0.0, 18.1.0, 18.2.0 |
| 2.0 | 6.10, 6.11, 6.12, 6.13, 6.14, 6.14.1, 6.15, 6.15.1, 7.0.0, 7.1.0, 7.2.0, 7.2.2, 7.3.0, 7.4.0, 7.5.1 | 16.8, 16.14, 17.0.2, 18.0.0, 18.1.0, 18.2.0 |
| 2.1 `(@latest)` | 6.10, 6.11, 6.12, 6.13, 6.14, 6.14.1, 6.15, 6.15.1, 7.0.0, 7.1.0, 7.2.0, 7.2.2, 7.3.0, 7.4.0, 7.5.1, 8.0.0, 8.1.0, 8.2.0 | 16.8, 16.14, 17.0.2, 18.0.0, 18.1.0, 18.2.0 |

---

Expand Down
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = {
}
]
},
transformIgnorePatterns: ['/node_modules/(?!(ol|txml|geotiff|quick-lru))'],
transformIgnorePatterns: ['/node_modules/(?!(ol|txml|geotiff|quick-lru|color-))'],
moduleNameMapper: {
'^rlayers$': '<rootDir>/src',
'^rlayers/(.*)$': '<rootDir>/src/$1',
Expand Down
2 changes: 1 addition & 1 deletion jest.standalone.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = {
}
]
},
transformIgnorePatterns: ['/node_modules/(?!(ol|txml|geotiff|quick-lru))'],
transformIgnorePatterns: ['/node_modules/(?!(ol|txml|geotiff|quick-lru|color-))'],
moduleNameMapper: {
'\\.(css|less)$': '<rootDir>/test/css.js',
'^txml/txml$': '<rootDir>/node_modules/txml/dist/txml'
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"lru-cache": "^7.10.0"
},
"peerDependencies": {
"ol": ">=6.10.0 <=8.1.0",
"ol": ">=6.10.0 <=8.2.0",
"react": ">=16.8",
"react-dom": ">=16.8"
},
Expand Down Expand Up @@ -130,7 +130,7 @@
"jest-environment-jsdom": "^29.4.3",
"markdown-loader": "^8.0.0",
"null-loader": "^4.0.1",
"ol": "^8.1.0",
"ol": "^8.2.0",
"ol-mbtiles": "^2.0.2",
"prettier": "2.8.8",
"prism-themes": "^1.6.0",
Expand Down
4 changes: 2 additions & 2 deletions src/RFeature.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export interface RFeatureProps extends PropsWithChildren<unknown> {

type FeatureRef = {
feature: Feature<Geometry>;
layer: BaseVectorLayer<SourceVector<Geometry>, CanvasVectorLayerRenderer>;
layer: BaseVectorLayer<SourceVector<Feature<Geometry>>, CanvasVectorLayerRenderer>;

Check failure on line 68 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.14.1)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 68 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.14.1)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 68 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (8.1.0)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 68 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (8.1.0)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 68 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.15)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 68 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (8.0.0)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 68 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.15)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 68 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (8.0.0)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 68 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.13)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 68 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.13)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 68 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (7.4.0)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 68 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (7.4.0)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 68 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.11)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 68 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.15.1)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 68 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.15.1)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 68 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.12)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 68 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.14)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 68 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.14)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 68 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (7.1.0)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 68 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (7.1.0)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 68 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (7.2.2)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 68 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (7.2.2)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 68 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (7.5.1)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 68 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (7.5.1)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 68 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (7.3.0)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 68 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (7.3.0)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 68 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (7.2.0)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 68 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (7.2.0)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 68 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.10)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 68 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (7.0.0)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 68 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (7.0.0)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.
};

/**
Expand Down Expand Up @@ -155,7 +155,7 @@ export default class RFeature extends RlayersBase<RFeatureProps, Record<string,
e.pixel,
(
f: Feature<Geometry>,
l: BaseVectorLayer<SourceVector<Geometry>, CanvasVectorLayerRenderer>
l: BaseVectorLayer<SourceVector<Feature<Geometry>>, CanvasVectorLayerRenderer>

Check failure on line 158 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.14.1)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 158 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.14.1)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 158 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (8.1.0)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 158 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (8.1.0)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 158 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.15)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 158 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (8.0.0)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 158 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.15)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 158 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (8.0.0)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 158 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.13)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 158 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.13)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 158 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (7.4.0)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 158 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (7.4.0)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 158 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.11)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 158 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.15.1)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 158 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.15.1)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 158 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.12)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 158 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.14)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 158 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.14)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 158 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (7.1.0)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 158 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (7.1.0)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 158 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (7.2.2)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 158 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (7.2.2)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 158 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (7.5.1)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 158 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (7.5.1)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 158 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (7.3.0)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 158 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (7.3.0)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 158 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (7.2.0)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 158 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (7.2.0)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 158 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.10)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 158 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (7.0.0)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 158 in src/RFeature.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (7.0.0)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.
) => triggered.push({feature: f, layer: l}) && false,
{
hitTolerance: RFeature.hitTolerance,
Expand Down
4 changes: 2 additions & 2 deletions src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ export interface RContextType {
/** The current vector layer */
// eslint-disable-next-line @typescript-eslint/no-explicit-any
readonly vectorlayer?: BaseVector<
SourceVector<Geometry>,
SourceVector<Feature<Geometry>>,

Check failure on line 39 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (6.14.1)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 39 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (6.14.1)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 39 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (8.1.0)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 39 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (8.1.0)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 39 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (6.15)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 39 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (6.15)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 39 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (8.0.0)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 39 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (8.0.0)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 39 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (6.13)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 39 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (6.13)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 39 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (7.4.0)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 39 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (7.4.0)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 39 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (6.11)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 39 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (6.15.1)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 39 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (6.15.1)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 39 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (6.12)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 39 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (6.14)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 39 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (6.14)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 39 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (7.1.0)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 39 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (7.1.0)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 39 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (7.2.2)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 39 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (7.2.2)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 39 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (7.5.1)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 39 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (7.5.1)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 39 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (7.3.0)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 39 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (7.3.0)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 39 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (7.2.0)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 39 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (7.2.0)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 39 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (6.10)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 39 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (7.0.0)

Type 'VectorSource<Feature<Geometry>>' does not satisfy the constraint 'VectorTile | VectorSource<Geometry>'.

Check failure on line 39 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (7.0.0)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.
| CanvasVectorLayerRenderer
| CanvasVectorTileLayerRenderer
| CanvasVectorImageLayerRenderer
| WebGLPointsLayerRenderer
>;
readonly vectorsource?: SourceVector<Geometry>;
readonly vectorsource?: SourceVector<Feature<Geometry>>;

Check failure on line 45 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (6.14.1)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 45 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (8.1.0)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 45 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (6.15)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 45 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (8.0.0)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 45 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (6.13)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 45 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (7.4.0)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 45 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (6.11)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 45 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (6.15.1)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 45 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (6.12)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 45 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (6.14)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 45 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (7.1.0)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 45 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (7.2.2)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 45 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (7.5.1)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 45 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (7.3.0)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 45 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (7.2.0)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 45 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (6.10)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.

Check failure on line 45 in src/context.ts

View workflow job for this annotation

GitHub Actions / ol-versions (7.0.0)

Type 'Feature<Geometry>' does not satisfy the constraint 'Geometry'.
readonly vectortilelayer?: VectorTile;
/** The current RFeature */
readonly feature?: Feature<Geometry>;
Expand Down
13 changes: 7 additions & 6 deletions src/layer/RLayerBaseVector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import CanvasVectorImageLayerRenderer from 'ol/renderer/canvas/VectorImageLayer'
import WebGLPointsLayerRenderer from 'ol/renderer/webgl/PointsLayer';
import {Vector as SourceVector} from 'ol/source';
import FeatureFormat from 'ol/format/Feature';
import {FeatureLike} from 'ol/Feature';
import {FeatureLoader, FeatureUrlFunction} from 'ol/featureloader';
import Geometry from 'ol/geom/Geometry';
import BaseObject from 'ol/Object';
Expand Down Expand Up @@ -68,14 +69,14 @@ export interface RLayerBaseVectorProps extends RLayerProps {
*/
onAddFeature?: (
this: RLayerBaseVector<RLayerBaseVectorProps>,
e: VectorSourceEvent<Geometry>
e: VectorSourceEvent<FeatureLike>

Check failure on line 72 in src/layer/RLayerBaseVector.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.11)

Type 'FeatureLike' does not satisfy the constraint 'Geometry'.

Check failure on line 72 in src/layer/RLayerBaseVector.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.12)

Type 'FeatureLike' does not satisfy the constraint 'Geometry'.

Check failure on line 72 in src/layer/RLayerBaseVector.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.10)

Type 'FeatureLike' does not satisfy the constraint 'Geometry'.
) => boolean | void;
/**
* Called upon initiating the request for new features
*/
onFeaturesLoadStart?: (
this: RLayerBaseVector<RLayerBaseVectorProps>,
e: VectorSourceEvent<Geometry>
e: VectorSourceEvent<FeatureLike>

Check failure on line 79 in src/layer/RLayerBaseVector.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.11)

Type 'FeatureLike' does not satisfy the constraint 'Geometry'.

Check failure on line 79 in src/layer/RLayerBaseVector.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.12)

Type 'FeatureLike' does not satisfy the constraint 'Geometry'.

Check failure on line 79 in src/layer/RLayerBaseVector.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.10)

Type 'FeatureLike' does not satisfy the constraint 'Geometry'.
) => boolean | void;
/**
* Called when the external features have been loaded from `url`
Expand All @@ -86,14 +87,14 @@ export interface RLayerBaseVectorProps extends RLayerProps {
*/
onFeaturesLoadEnd?: (
this: RLayerBaseVector<RLayerBaseVectorProps>,
e: VectorSourceEvent<Geometry>
e: VectorSourceEvent<FeatureLike>

Check failure on line 90 in src/layer/RLayerBaseVector.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.11)

Type 'FeatureLike' does not satisfy the constraint 'Geometry'.

Check failure on line 90 in src/layer/RLayerBaseVector.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.12)

Type 'FeatureLike' does not satisfy the constraint 'Geometry'.

Check failure on line 90 in src/layer/RLayerBaseVector.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.10)

Type 'FeatureLike' does not satisfy the constraint 'Geometry'.
) => boolean | void;
/**
* Called on failure while loading features
*/
onFeaturesLoadError?: (
this: RLayerBaseVector<RLayerBaseVectorProps>,
e: VectorSourceEvent<Geometry>
e: VectorSourceEvent<FeatureLike>

Check failure on line 97 in src/layer/RLayerBaseVector.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.11)

Type 'FeatureLike' does not satisfy the constraint 'Geometry'.

Check failure on line 97 in src/layer/RLayerBaseVector.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.12)

Type 'FeatureLike' does not satisfy the constraint 'Geometry'.

Check failure on line 97 in src/layer/RLayerBaseVector.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.10)

Type 'FeatureLike' does not satisfy the constraint 'Geometry'.
) => boolean | void;
/** onPointerMove handler for all loaded features */
onPointerMove?: (
Expand Down Expand Up @@ -124,13 +125,13 @@ export interface RLayerBaseVectorProps extends RLayerProps {
*/
export default class RLayerBaseVector<P extends RLayerBaseVectorProps> extends RLayer<P> {
ol: BaseVector<
SourceVector<Geometry>,
SourceVector<Feature<Geometry>>,
| CanvasVectorLayerRenderer
| CanvasVectorTileLayerRenderer
| CanvasVectorImageLayerRenderer
| WebGLPointsLayerRenderer
>;
source: SourceVector<Geometry>;
source: SourceVector<FeatureLike>;

constructor(props: Readonly<P>, context?: React.Context<RContextType>) {
super(props, context);
Expand Down
2 changes: 1 addition & 1 deletion src/layer/RLayerCluster.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export interface RLayerClusterProps extends RLayerBaseVectorProps {
export default class RLayerCluster extends RLayerBaseVector<RLayerClusterProps> {
ol: LayerVector<SourceCluster>;
source: SourceCluster;
cluster: SourceVector<Geometry>;
cluster: SourceVector<Feature<Geometry>>;

protected createSource(props: Readonly<RLayerClusterProps>): BaseObject[] {
this.cluster = new SourceVector({
Expand Down
2 changes: 1 addition & 1 deletion src/layer/RLayerHeatmap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export interface RLayerHeatmapProps extends RLayerBaseVectorProps {
*/
export default class RLayerHeatmap extends RLayerBaseVector<RLayerHeatmapProps> {
ol: LayerHeatmap;
source: SourceVector<Point>;
source: SourceVector<Feature<Point>>;

protected createSource(props: Readonly<RLayerHeatmapProps>): BaseObject[] {
this.source = new SourceVector({
Expand Down
6 changes: 3 additions & 3 deletions src/layer/RLayerVector.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import {Map as Map} from 'ol';
import {Feature, Map as Map} from 'ol';
import {Vector as LayerVector} from 'ol/layer';
import {Vector as SourceVector} from 'ol/source';
import Geometry from 'ol/geom/Geometry';
Expand All @@ -20,8 +20,8 @@ import debug from '../debug';
* Provides a vector layer context for JSX-declared `RFeature`s
*/
export default class RLayerVector extends RLayerBaseVector<RLayerBaseVectorProps> {
ol: LayerVector<SourceVector<Geometry>>;
source: SourceVector<Geometry>;
ol: LayerVector<SourceVector<Feature<Geometry>>>;
source: SourceVector<Feature<Geometry>>;

protected createSource(props: Readonly<RLayerBaseVectorProps>): BaseObject[] {
this.source = new SourceVector({
Expand Down
8 changes: 4 additions & 4 deletions src/layer/RLayerVectorImage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import {Map as Map} from 'ol';
import {Feature, Map as Map} from 'ol';
import {VectorImage as LayerVectorImage} from 'ol/layer';
import {Vector as SourceVector} from 'ol/source';
import Geometry from 'ol/geom/Geometry';
Expand All @@ -20,11 +20,11 @@ import debug from '../debug';
* Provides a vector layer context for JSX-declared `RFeature`s
*/
export default class RLayerVectorImage extends RLayerBaseVector<RLayerBaseVectorProps> {
ol: LayerVectorImage<SourceVector<Geometry>>;
source: SourceVector<Geometry>;
ol: LayerVectorImage<SourceVector<Feature<Geometry>>>;
source: SourceVector<Feature<Geometry>>;

protected createSource(props: Readonly<RLayerBaseVectorProps>): BaseObject[] {
this.source = new SourceVector({
this.source = new SourceVector<Feature<Geometry>>({
features: this.props.features,
url: this.props.url,
format: this.props.format,
Expand Down
4 changes: 2 additions & 2 deletions test/RVectorLayer.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import {fireEvent, render} from '@testing-library/react';

import {GeoJSON} from 'ol/format';
import {Feature} from 'ol';
import {Point} from 'ol/geom';
import {Geometry, Point} from 'ol/geom';
import {RFeature, RLayerVector, RContext, RMap, RLayerVectorImage} from 'rlayers';
import * as common from './common';

const parser = new GeoJSON({featureProjection: 'EPSG:3857'});
const geojsonFeatures = JSON.parse(fs.readFileSync('examples/data/departements.geo.json', 'utf-8'));
const features = parser.readFeatures(geojsonFeatures);
const features = parser.readFeatures(geojsonFeatures) as Feature<Geometry>[];

describe('<RLayerVector>', () => {
it('should create and remove a vector layer', async () => {
Expand Down

0 comments on commit 9bb2deb

Please sign in to comment.