"GeoRSS layer triggers loadstart event twice", from Bart. Includes tests.
(Closes #1580) git-svn-id: http://svn.openlayers.org/trunk/openlayers@7387 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -121,7 +121,6 @@ OpenLayers.Layer.GeoRSS = OpenLayers.Class(OpenLayers.Layer.Markers, {
|
||||
moveTo:function(bounds, zoomChanged, minor) {
|
||||
OpenLayers.Layer.Markers.prototype.moveTo.apply(this, arguments);
|
||||
if(this.visibility && !this.loaded){
|
||||
this.events.triggerEvent("loadstart");
|
||||
this.loadRSS();
|
||||
}
|
||||
},
|
||||
|
||||
@@ -75,6 +75,18 @@
|
||||
|
||||
});;
|
||||
}
|
||||
function test_Layer_GeoRSS_load_events (t) {
|
||||
t.plan( 1 );
|
||||
layer = new OpenLayers.Layer.GeoRSS('Test Layer', georss_txt);
|
||||
var map = new OpenLayers.Map('map');
|
||||
var baseLayer = new OpenLayers.Layer.WMS("Test Layer",
|
||||
"http://octo.metacarta.com/cgi-bin/mapserv?",
|
||||
{map: "/mapdata/vmap_wms.map", layers: "basic"});
|
||||
map.addLayer(baseLayer);
|
||||
map.addLayer(layer);
|
||||
layer.events.register("loadstart", t, function() { this.ok(true, "loadstart event triggered once (#1580)") });
|
||||
map.setCenter(new OpenLayers.LonLat(0,0),0);
|
||||
}
|
||||
function test_Layer_GeoRSS_events (t) {
|
||||
t.plan( 4 );
|
||||
layer = new OpenLayers.Layer.GeoRSS('Test Layer', georss_txt);
|
||||
|
||||
Reference in New Issue
Block a user