]> git.openstreetmap.org Git - rails.git/commitdiff
Fix loading of blank tiles on some browsers to use the asset pipeline
authorTom Hughes <tom@compton.nu>
Mon, 19 Dec 2011 17:54:46 +0000 (17:54 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 19 Dec 2011 17:56:00 +0000 (17:56 +0000)
app/assets/javascripts/openlayers.js.erb

index 206e7177f6906cee5ecbec0f9d4d66697e4ca100..f4964b8fb01b19b0fe50604de657adcd69030dc7 100644 (file)
@@ -59,3 +59,12 @@ OpenLayers.Util.modifyAlphaImageDiv = function(div, id, px, sz, imgURL,
                                                    position, border, sizing, 
                                                    opacity);
 };
+
+OpenLayers.Tile.Image.clear = function() {
+    if (this.imgDiv) {
+        this.hide();
+        if (OpenLayers.Tile.Image.useBlankTile) { 
+            this.imgDiv.src = "<%= asset_path 'img/blank.gif' %>";
+        }    
+    }
+};