]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/openlayers.js.erb
Patch OpenLayers to make URL rewriting easier
[rails.git] / app / assets / javascripts / openlayers.js.erb
index 6a027d59be6d1684449b4761fa6fc111b1132577..9b55a1225953d86af549f9a384915523e68638e1 100644 (file)
@@ -28,12 +28,8 @@ OpenLayers.Util.imageURLs = {
     "img/zoom-world-mini.png": "<%= asset_path 'img/zoom-world-mini.png' %>"
 };
 
     "img/zoom-world-mini.png": "<%= asset_path 'img/zoom-world-mini.png' %>"
 };
 
-OpenLayers.Util.origCreateImage = OpenLayers.Util.createImage;
+OpenLayers.Util.origGetImageLocation = OpenLayers.Util.getImageLocation;
 
 
-OpenLayers.Util.createImage = function(id, px, sz, imgURL, position, border,
-                                       opacity, delayDisplay) {
-    imgURL = OpenLayers.Util.imageURLs[imgURL] || imgURL;
-
-    return OpenLayers.Util.origCreateImage(id, px, sz, imgURL, position,
-                                           border, opacity, delayDisplay);
+OpenLayers.Util.getImageLocation = function(image) {
+    return OpenLayers.Util.imageURLs[image] || OpenLayers.Util.origGetImageLocation(image);
 };
 };