I am rendering about 27000 Markers in different layers on a mapview. Everything works fine on fast devices.

I have a problem on older devices (like the iPad3). When i hide one layer and set another layer to visible = true, it takes several seconds for the change to take affect on the mapview. The mapview is frozen in this time and any user interaction is delayed until the cluster layer has finished rendering. It would be better for me to show a loading popup and wait until the view has finally finished rendering.

Is there any event which gets fired after the rendering on the mapview has finished and how can I connect to it?

1 Answer 1


I found another question (register event "loadend" on layer) with one answer which lead me to the right event:

vectorLayer.on('postcompose', function(event) {
    if (vectorLayer.getVisible()) {

The method doSomething(); is now called when the corresponding vector layer was completely rendered on the Canvas.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.