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:
@@ -186,7 +186,7 @@ OpenLayers.Layer.Image = OpenLayers.Class(OpenLayers.Layer, {
|
|||||||
*/
|
*/
|
||||||
setUrl: function(newUrl) {
|
setUrl: function(newUrl) {
|
||||||
this.url = newUrl;
|
this.url = newUrl;
|
||||||
this.draw();
|
this.tile.draw();
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function test_50_Layer_Image_tileTests (t) {
|
function test_50_Layer_Image_tileTests (t) {
|
||||||
t.plan(6);
|
t.plan(7);
|
||||||
var map = new OpenLayers.Map('map');
|
var map = new OpenLayers.Map('map');
|
||||||
|
|
||||||
layer = new OpenLayers.Layer.Image('Test Layer',
|
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");
|
t.eq(layer.tile.imgDiv.src, "http://earthtrends.wri.org/images/maps/4_m_citylights_lg.gif", "URL is correct");
|
||||||
map.zoomIn();
|
map.zoomIn();
|
||||||
t.eq(layer.tile.imgDiv.src, "http://earthtrends.wri.org/images/maps/4_m_citylights_lg.gif", "URL is correct");
|
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");
|
||||||
}
|
}
|
||||||
/******
|
/******
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user