Fix Layer.Image typo in setUrl (See #985) reported by Linda on the mailing

list. Thanks for the review Tim.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@4355 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2007-09-17 22:49:25 +00:00
parent 91fab27e7d
commit cc78cf3a13
2 changed files with 4 additions and 2 deletions

View File

@@ -186,7 +186,7 @@ OpenLayers.Layer.Image = OpenLayers.Class(OpenLayers.Layer, {
*/
setUrl: function(newUrl) {
this.url = newUrl;
this.draw();
this.tile.draw();
},
/**

View File

@@ -39,7 +39,7 @@
}
function test_50_Layer_Image_tileTests (t) {
t.plan(6);
t.plan(7);
var map = new OpenLayers.Map('map');
layer = new OpenLayers.Layer.Image('Test Layer',
@@ -63,6 +63,8 @@
t.eq(layer.tile.imgDiv.src, "http://earthtrends.wri.org/images/maps/4_m_citylights_lg.gif", "URL is correct");
map.zoomIn();
t.eq(layer.tile.imgDiv.src, "http://earthtrends.wri.org/images/maps/4_m_citylights_lg.gif", "URL is correct");
layer.setUrl('http://labs.metacarta.com/wms/vmap0?LAYERS=basic&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fjpeg&SRS=EPSG%3A4326&BBOX=-180,-90,0,90&WIDTH=256&HEIGHT=256');
t.eq(layer.tile.imgDiv.src, "http://labs.metacarta.com/wms/vmap0?LAYERS=basic&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fjpeg&SRS=EPSG%3A4326&BBOX=-180,-90,0,90&WIDTH=256&HEIGHT=256", "URL is correct after setURL");
}
/******
*