Search code examples
javascriptopenlayersopenlayers-6

Redraw map on OpenLayers 6?


I'm trying to redraw the Vector Layer in OpenLayers (version 6.1.1, latest is 6.2.1) but any sort of documentation on it is OpenLayers 3. I've tried translating it myself, but either the redraw just isn't working properly or I'm writing the syntax incorrectly. Does anyone have any idea how to go about this?

I haven't been able to get the icons to even flicker to show that they're updating, never mind getting them to update as the database gets filled up. It's really important that I get the icons on my Vector Layer refreshing so anything and everything helps, thank you!


Solution

  • I think that refresh method of the source should do what you want. Give it a try.

    OL API - Vector Source refresh