Add setUrl function for GML layer. Thanks to a well done patch (with tests!)
from Ian Johnson. (Closes #1264) git-svn-id: http://svn.openlayers.org/trunk/openlayers@5776 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -97,7 +97,21 @@ OpenLayers.Layer.GML = OpenLayers.Class(OpenLayers.Layer.Vector, {
|
||||
this.loaded = true;
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Method: setUrl
|
||||
* Change the URL and reload the GML
|
||||
*
|
||||
* Parameters:
|
||||
* url - {String} URL of a GML file.
|
||||
*/
|
||||
setUrl:function(url) {
|
||||
this.url = url;
|
||||
this.destroyFeatures();
|
||||
this.loaded = false;
|
||||
this.events.triggerEvent("loadstart");
|
||||
this.loadGML();
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: requestSuccess
|
||||
|
||||
Reference in New Issue
Block a user