Ticket #2504 (closed bug: fixed)

Opened 3 years ago

Last modified 3 years ago

vector layers: loadstart event eventually triggered without loadend

Reported by: fvanderbiest Owned by: tschaub
Priority: major Milestone: 2.9 Release
Component: Strategy.BBOX Version: SVN
Keywords: Cc:
State: Complete

Description

I was playing with the loadingPanel Addin Control, and I found out that a vector layer with a BBOX strategy was the culprit for not minimizing the control when I zoom in quickly so that several zoom levels are passed at once.

What happens in this case? The strategy's triggerRead method is called several times in a short while. This method first aborts the protocol, and then triggers the "loadstart" event. This means that loadstart events are triggered without their loadend counterparts. Hence the always maximized control.

To fix this, I suggest adding an "abort" event to the protocol (which does not have any event for now - cf  http://trac.openlayers.org/ticket/1767). The loadingPanel control would listen to this event for vector layers and call the decreaseCounter method.

Attachments

openlayers_loadend_r10095_ticket2504_A0.diff Download (0.8 KB) - added by fvanderbiest 3 years ago.
Eric suggests to trigger the loadend event when calling protocol.abort(). Tests pass with FF3.

Change History

Changed 3 years ago by fvanderbiest

Eric suggests to trigger the loadend event when calling protocol.abort(). Tests pass with FF3.

Changed 3 years ago by fvanderbiest

  • owner set to tschaub
  • priority changed from minor to major
  • state changed from Needs Discussion to Review
  • component changed from general to Strategy.BBOX
  • type changed from feature to bug

Changed 3 years ago by bartvde

Francois, do you see a problem in triggering loadend on abort? If so, could that be a solution instead of introducing another event?

Changed 3 years ago by bartvde

Ok, Eric had the same suggestion as what I was thinking.

Changed 3 years ago by bartvde

  • status changed from new to closed
  • state changed from Review to Complete
  • resolution set to fixed

(In [10100]) bbox strategy should call loadend when aborting, p=fvanderbiest, r=me (closes #2504)

Note: See TracTickets for help on using tickets.