From: Tom Hughes Date: Sat, 31 Dec 2011 00:25:04 +0000 (+0000) Subject: Allow OpenStreetMap.js to work with an unpatched OpenLayers X-Git-Tag: live~5889 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/ae9131bc8e8aadd76b2ed7939be142e649d25653 Allow OpenStreetMap.js to work with an unpatched OpenLayers --- diff --git a/app/assets/javascripts/openlayers.js.erb b/app/assets/javascripts/openlayers.js.erb index 70633d0ce..c428da014 100644 --- a/app/assets/javascripts/openlayers.js.erb +++ b/app/assets/javascripts/openlayers.js.erb @@ -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) { diff --git a/vendor/assets/openlayers/OpenStreetMap.js b/vendor/assets/openlayers/OpenStreetMap.js index 3b79d4117..20588e2a0 100644 --- a/vendor/assets/openlayers/OpenStreetMap.js +++ b/vendor/assets/openlayers/OpenStreetMap.js @@ -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