[OpenLayers-Commits] r1779 - trunk/openlayers/lib/OpenLayers/Layer/WMS

commits at openlayers.org commits at openlayers.org
Wed Nov 8 11:42:57 EST 2006


Author: euzuro
Date: 2006-11-08 11:42:56 -0500 (Wed, 08 Nov 2006)
New Revision: 1779

Modified:
   trunk/openlayers/lib/OpenLayers/Layer/WMS/Untiled.js
Log:
applying patch from #387 - if map has changed size, destroy old tile, make a new one

Modified: trunk/openlayers/lib/OpenLayers/Layer/WMS/Untiled.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Layer/WMS/Untiled.js	2006-11-08 16:01:39 UTC (rev 1778)
+++ trunk/openlayers/lib/OpenLayers/Layer/WMS/Untiled.js	2006-11-08 16:42:56 UTC (rev 1779)
@@ -150,6 +150,11 @@
             var ul = new OpenLayers.LonLat(tileBounds.left, tileBounds.top);
             var pos = this.map.getLayerPxFromLonLat(ul);
 
+            if ( this.tile && !this.tile.size.equals(tileSize)) {
+                this.tile.destroy();
+                this.tile = null;
+            }
+
             if (!this.tile) {
                 this.tile = new OpenLayers.Tile.Image(this, pos, tileBounds, 
                                                      url, tileSize);



More information about the Commits mailing list