Allow OpenStreetMap.js to work with an unpatched OpenLayers
authorTom Hughes <tom@compton.nu>
Sat, 31 Dec 2011 00:25:04 +0000 (00:25 +0000)
committerTom Hughes <tom@compton.nu>
Sat, 31 Dec 2011 00:25:04 +0000 (00:25 +0000)
app/assets/javascripts/openlayers.js.erb
vendor/assets/openlayers/OpenStreetMap.js

index 70633d0ce2dbca348b76ec25b3d8cb00811ca35d..c428da0147dd73fe535f73f7631d1605d3a47e3d 100644 (file)
@@ -28,6 +28,8 @@ OpenLayers.Util.imageURLs = {
     "zoom-world-mini.png": "<%= asset_path 'img/zoom-world-mini.png' %>"
 };
 
+OpenLayers.Util.OSM.MISSING_TILE_URL = "<%= asset_path 'img/404.png' %>";
+
 OpenLayers.Util.origGetImageLocation = OpenLayers.Util.getImageLocation;
 
 OpenLayers.Util.getImageLocation = function(image) {
index 3b79d4117abb8ac539941a7e70f751e5201f5345..20588e2a05978a36fd3d46ca2b84b87feeb9692e 100644 (file)
@@ -7,7 +7,7 @@ OpenLayers.Util.OSM = {};
  * Constant: MISSING_TILE_URL
  * {String} URL of image to display for missing tiles
  */
-OpenLayers.Util.OSM.MISSING_TILE_URL = OpenLayers.Util.getImageLocation("404.png");
+OpenLayers.Util.OSM.MISSING_TILE_URL = OpenLayers.Util.getImagesLocation() + "404.png";
 
 /**
  * Property: originalOnImageLoadError