I've got a Vector layer in OL 2.8, defined using the BBOX strategy and WFS protocol. Nine times out of ten when I go back and forth between two zoom levels, the loadend event is fired for the layer. Sometimes it's not. In the past, I think this issue might have had something to do with caching and was resolved by added a random uniqueName value to the WFS request using the mergeNewParams method. But that was when I was using a WFS layer, not a Vector layers with a WFS protocol, as I'm doing now. Below is some sample code. Any ideas?<br>
<br>var layer = new OpenLayers.Layer.Vector("WFS", {<br> strategies: [new OpenLayers.Strategy.BBOX({ratio: 1, invalidBounds: function(){return true;}})],<br> protocol: new OpenLayers.Protocol.WFS({<br> url: "<a href="http://localhost:8080/geoserver-wfs/ows">http://localhost:8080/geoserver-wfs/ows</a>",<br>
geometryName: "GEOMETRY",<br> featurePrefix: "prefix",<br> featureType: "featureType"<br> })<br>});<br><br>layer.events.on({'loadend' : function(e) {<br> alert("finished loading"); //Not always shown<br>
}});<br><br>Thanks.<br>