I'm migrating from leaflet map to openlayers. My map requires me to display about 12k markers right now and this amount could grow up to about 60k (most of markers are rotated by various angles).
In leaflet, after a lot of attempts I've achived this. I combined leaflet-canvas-markers
with my own cache implementation, so at last it's able to display 12k items without any visible glitches (on a relatively strong computer).
Now I'm trying to reimplement it with openlayers.
I see Icon
markers and RegularShape
display on a canvas already, it's cool, but performance is still below required, here is the codepen demo (just increase to 30k markers for example if your computer is too fast):
https://codepen.io/zxwild/pen/KKyRRKv
The question is: How to increase performance to display 15k-60k markers?
On my own implementation I use a hidden canvas, which contains all possible markers variants, and rotated variants are cached too.
So when I need to redraw a marker I just retrieve a required section from this canvas cache by X and Y and copy it to a map canvas, it's a very fast operation.