VectorImageLayer with ClusterSource disappears after loading
See original GitHub issueDescribe the bug I’m using version 6.0.0-beta.3 in my Angular app and have the following map:
this.clusterSource = new ClusterSource({
distance: 10,
source: this.broSource,
geometryFunction: feature => new geom.Point(extent.getCenter(feature.getGeometry().getExtent()))
});
this.clusterLayer = new VectorImageLayer({
source: this.clusterSource,
style: new style.Style({
image: new style.Circle({
radius: 10,
stroke: new style.Stroke({
color: '#fff'
}),
fill: new style.Fill({
color: '#3399CC'
})
}),
text: new style.Text({
text: '3',
fill: new style.Fill({
color: '#fff'
})
})
})
});
this.map = new Map({
target: 'map-canvas',
layers: [this.clusterLayer],
view: this.view,
interactions: interaction.defaults({mouseWheelZoom: false})
});
When the cluster layer is loaded, the features in the layer can be briefly seen, after which they disappear again.
I’ve noticed the same behaviour when I use a VectorLayer instead of a VectorImageLayer,
A javascript version (5.3.0) with the exact same clustered layer is working correctly.
Expected behavior For the cluster layer to remain visible.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Openlayers 3 - how to keep features from disappear when ...
Vector has a property called renderBuffer . This property will prevent the icons from disappearing if you set this to the pixel value...
Read more >On zoom change, features getting disappear in openlayers
Set OpenLayers.Renderer.SVG.prototype.MAX_PIXEL = Number.MAX_VALUE in a script tag after loading OpenLayers.js. But be warned that this may freeze older ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jippeholwerda The fix is now merged into master and will be available in the next (beta) release. I’m closing this issue, if your problem still persist after using the new upcoming version please open a new issue.
The change in the pull request #9329 fixes the cluster example.