Changeset 5776
- Timestamp:
- 01/16/08 12:07:20 (11 months ago)
- Files:
-
- trunk/openlayers/doc/authors.txt (modified) (1 diff)
- trunk/openlayers/lib/OpenLayers/Layer/GML.js (modified) (1 diff)
- trunk/openlayers/tests/Layer/test_GML.html (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/openlayers/doc/authors.txt
r5415 r5776 11 11 Pierre Giraud 12 12 Andreas Hocevar 13 Ian Johnson 13 14 Eric Lemoine 14 15 Philip Lindsay trunk/openlayers/lib/OpenLayers/Layer/GML.js
r5614 r5776 98 98 } 99 99 }, 100 100 101 /** 102 * Method: setUrl 103 * Change the URL and reload the GML 104 * 105 * Parameters: 106 * url - {String} URL of a GML file. 107 */ 108 setUrl:function(url) { 109 this.url = url; 110 this.destroyFeatures(); 111 this.loaded = false; 112 this.events.triggerEvent("loadstart"); 113 this.loadGML(); 114 }, 101 115 102 116 /** trunk/openlayers/tests/Layer/test_GML.html
r4252 r5776 7 7 8 8 var gml = "./owls.xml"; 9 var gml2 = "./mice.xml"; 9 10 10 11 // if this test is running online, different rules apply … … 41 42 42 43 } 44 function test_GML_setUrl(t) { 45 t.plan(2); 46 var layer = new OpenLayers.Layer.GML(name, gml); 47 var map = new OpenLayers.Map("map"); 48 map.addLayer(layer); 49 t.eq(layer.url, gml, "layer has correct original url"); 50 layer.setUrl(gml2); 51 t.eq(layer.url, gml2, "layer has correctly changed url"); 52 } 43 53 </script> 44 54 </head>
