fix for Layer.GML has some problems with load events r=tschaub (Closes #1747)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@9050 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2009-03-14 17:06:46 +00:00
parent 2a8015775b
commit 8df8106a51
+1 -2
View File
@@ -91,7 +91,6 @@ OpenLayers.Layer.GML = OpenLayers.Class(OpenLayers.Layer.Vector, {
// loaded after the GML is paited. // loaded after the GML is paited.
// See http://trac.openlayers.org/ticket/404 // See http://trac.openlayers.org/ticket/404
if(this.visibility && !this.loaded){ if(this.visibility && !this.loaded){
this.events.triggerEvent("loadstart");
this.loadGML(); this.loadGML();
} }
}, },
@@ -101,6 +100,7 @@ OpenLayers.Layer.GML = OpenLayers.Class(OpenLayers.Layer.Vector, {
*/ */
loadGML: function() { loadGML: function() {
if (!this.loaded) { if (!this.loaded) {
this.events.triggerEvent("loadstart");
OpenLayers.Request.GET({ OpenLayers.Request.GET({
url: this.url, url: this.url,
success: this.requestSuccess, success: this.requestSuccess,
@@ -122,7 +122,6 @@ OpenLayers.Layer.GML = OpenLayers.Class(OpenLayers.Layer.Vector, {
this.url = url; this.url = url;
this.destroyFeatures(); this.destroyFeatures();
this.loaded = false; this.loaded = false;
this.events.triggerEvent("loadstart");
this.loadGML(); this.loadGML();
}, },