Comments (10)
@codeflyA Sorry, I cannot reproduce this. But since there are several thumbs-up on this, can anyone affected by this issue share a minimal reproduction repository?
from openlayers.
Never mind. Able to reproduce now.
from openlayers.
@codeflyA Does your project have a tsconfig.json
? I can only reproduce the issue in projects without a tsconfig.json
.
Does the issue go away when you add a tsconfig.json
? If you have one already, please share a minimal reproduction repository.
from openlayers.
@codeflyA #15831 should fix this. At least in the case that I could reproduce, it does.
from openlayers.
https://github.com/alok-runner/ol-15830
src/App.tsx:14:7 - error TS2322: Type 'VectorSource<Feature<Circle>>' is not assignable to type 'VectorSource<FeatureLike>'.
Types of property 'setLoader' are incompatible.
Type '(loader: FeatureLoader<Feature<Circle>>) => void' is not assignable to type '(loader: FeatureLoader<FeatureLike>) => void'.
Types of parameters 'loader' and 'loader' are incompatible.
Types of parameters 'arg4' and 'arg4' are incompatible.
Type '((arg0: Feature<Circle>[]) => void) | undefined' is not assignable to type '((arg0: FeatureLike[]) => void) | undefined'.
Type '(arg0: Feature<Circle>[]) => void' is not assignable to type '(arg0: FeatureLike[]) => void'.
Types of parameters 'arg0' and 'arg0' are incompatible.
Type 'FeatureLike[]' is not assignable to type 'Feature<Circle>[]'.
Type 'FeatureLike' is not assignable to type 'Feature<Circle>'.
Type 'Feature<Geometry>' is not assignable to type 'Feature<Circle>'.
14 source: new VectorSource({
~~~~~~
src/App.tsx:23:7 - error TS2322: Type 'Cluster' is not assignable to type 'VectorSource<FeatureLike>'.
Types of property 'setLoader' are incompatible.
Type '(loader: FeatureLoader<Feature<Geometry>>) => void' is not assignable to type '(loader: FeatureLoader<FeatureLike>) => void'.
Types of parameters 'loader' and 'loader' are incompatible.
Types of parameters 'arg4' and 'arg4' are incompatible.
Type '((arg0: Feature<Geometry>[]) => void) | undefined' is not assignable to type '((arg0: FeatureLike[]) => void) | undefined'.
Type '(arg0: Feature<Geometry>[]) => void' is not assignable to type '(arg0: FeatureLike[]) => void'.
Types of parameters 'arg0' and 'arg0' are incompatible.
Type 'FeatureLike[]' is not assignable to type 'Feature<Geometry>[]'.
Type 'FeatureLike' is not assignable to type 'Feature<Geometry>'.
Type 'RenderFeature' is missing the following properties from type 'Feature<Geometry>': on, once, un, geometryName_, and 39 more.
23 source: new Cluster({
~~~~~~
src/App.tsx:25:9 - error TS2322: Type 'VectorSource<Feature<Point>>' is not assignable to type 'VectorSource<Feature<Geometry>>'.
Types of property 'setLoader' are incompatible.
Type '(loader: FeatureLoader<Feature<Point>>) => void' is not assignable to type '(loader: FeatureLoader<Feature<Geometry>>) => void'.
Types of parameters 'loader' and 'loader' are incompatible.
Types of parameters 'arg4' and 'arg4' are incompatible.
Type '((arg0: Feature<Point>[]) => void) | undefined' is not assignable to type '((arg0: Feature<Geometry>[]) => void) | undefined'.
Type '(arg0: Feature<Point>[]) => void' is not assignable to type '(arg0: Feature<Geometry>[]) => void'.
Types of parameters 'arg0' and 'arg0' are incompatible.
Type 'Feature<Geometry>[]' is not assignable to type 'Feature<Point>[]'.
Type 'Feature<Geometry>' is not assignable to type 'Feature<Point>'.
25 source: new VectorSource({
~~~~~~
node_modules/ol/source/Cluster.d.ts:52:5
52 source?: VectorSource<Feature<import("../geom.js").Geometry>> | undefined;
~~~~~~
The expected type comes from property 'source' which is declared here on type 'Options'
from openlayers.
@alok-runner That's a different issue, because ol/source/Cluster
is affected here. But it's similar enough for me to attempt adding a fix in #15831.
from openlayers.
the issue happen when i has a tsconfig.json
this is a minimal reproduction repository
[email protected]:codeflyA/openlayerIssue.git
https://github.com/codeflyA/openlayerIssue
@ahocevar
from openlayers.
@codeflyA - Can you try your example with the latest ol@dev
version?
from openlayers.
issue fix in 9.2.1-dev.1715868460880 thanks
from openlayers.
You can get the fix in the [email protected]
release.
from openlayers.
Related Issues (20)
- Polygon area calculation is inaccurate with large coordinate values
- Can't run/compile angular/typescript application with OL > 9.0.0 HOT 7
- Google source not allowing to pass `apiOptions` in order to opt-in for new styles
- ol.VERSION not available in umd pkg
- when dragging map, it stuck HOT 4
- Color based on Feature in WebGLPoints Layer style expression not working HOT 3
- Previously working WebGLPointsLayer styles crash in 9.2.3 HOT 4
- Style expression updates HOT 1
- Nonexistent Road is being displayed on the map with an inappropriate title HOT 3
- WebGLPointsLayer styles crash in 9.2.4 related to 'icon-scale'
- Draw lines rendered with WebGL中使用stroke-pattern-offset属性
- After interpolate is set to true, there are still curved teeth when loading cogtif HOT 1
- Bug HOT 1
- Stroke and Fill style does not declutter when used with Circle style. HOT 7
- COG Data Problem on High Resolution HOT 1
- @mike-000 你好 我按照上述方法 添加了个 额外的 baiduG 的坐标系,并且在初始化 view的时候 使用的是BD09G, 现在遇到一个问题 我们在缩放或者移动地图的时候 会出现 空白区域,且我看了network下瓦片请求没有出现404或者异常的情况。但当我们将view下使用的坐标系改成 BD09 则不会有此问题 。我观察了 BD09与BD09G的差异 就在与 global 配置。 请问出现这种情况 有合适的解决方案嘛 ?
- SourceInfo parameters are applied to converted image (not source) when using `convertToRGB` in `GeoTIFF`
- the overlay dom z-index can not be bigger than a common dom outside openlayer HOT 1
- Feature collection disordered after having drawn a specifing number of features or vertices HOT 3
- VectorImage type declaration errors HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openlayers.