updateWhileInteracting not working in VectorImageLayer
See original GitHub issueFeatures in VectorImageLayer
are not updated when interacting with the map (dragging, zooming etc…).
Steps to reproduce:
- create a feature and update its coordinate every interval.
- create a new
VectorSource
and add thefeature
to it. - create a new
VectorImageLayer
withupdateWhileInteracting: true
and add thevectorSource
to it - Open the application and start zooming and dragging the map.
- The feature will only update its coordinates when the map is not interacted with
Expected behavior
Like in VectorLayer
, I expect the feature to update even the map is been interacted with.
const source = new VectorSource({});
const layer = new VectorImageLayer({ // bug will not happen if using VectorLayer
source,
updateWhileInteracting: true,
updateWhileAnimating: true,
)};
map.addLayer(layer);
const feature = new Feature(new Point(randomLocation());
source.addFeature(feature);
setInterval(() => {
feature.getGeomtry().setCoordinates(randomLocation());
}, 500);
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:18 (9 by maintainers)
Top Results From Across the Web
ol/layer/Vector~VectorLayer - OpenLayers
The map will not manage this layer in its layers collection, and the layer will be rendered on top. ... updateWhileInteracting, boolean (defaults...
Read more >Vector layer visibility using min/maxResolution is not working ...
I want to change the vector layers' visibility at certain zoom levels, by using min/maxScale or min/maxResolution, but it doesn't seem to work....
Read more >OpenLayers v7.1.0 API - Class: BaseVectorLayer
The map will not manage this layer in its layers collection, and the layer will be rendered on top. ... updateWhileInteracting, boolean (defaults...
Read more >OpenLayers v6.1.1 API - Class: BaseVectorLayer
The bounding extent for layer rendering. The layer will not be rendered outside of this extent. ... updateWhileInteracting, boolean (defaults to false).
Read more >performance issue when adding vector layers to openLayers ...
I tried using vector image layer rather than vector layer, ... @IanTurton my problem is not with geoserver or the time it takes...
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
Well, I guess you need to set
updateWhileAnimating/Interacting
to true to have it update during a pan…It didn’t work for me… Could please edit my moving feature fiddle so I see what you mean exactly? The feature should continue changing its location every 500 ms even if the user is dragging the map.