question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

VectorImageLayer with ClusterSource disappears after loading

See original GitHub issue

Describe 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:closed
  • Created 5 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
fredjcommented, Mar 14, 2019

@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.

1reaction
fredjcommented, Mar 14, 2019

The change in the pull request #9329 fixes the cluster example.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found