Add an interception point to allow image URLs to be rewritten
Make all attempts to get a URL for an image go through a single routine, OpenLayers.Util.getImageLocation, which is given the actual image name. This allows users to replace that routine with an enhanced version which can rewrite the full URL, for example to go through the rails asset pipeline when using OpenLayers with rails.
This commit is contained in:
@@ -119,7 +119,7 @@ OpenLayers.Control.PanZoom = OpenLayers.Class(OpenLayers.Control, {
|
||||
* image of the button, and has all the proper event handlers set.
|
||||
*/
|
||||
_addButton:function(id, img, xy, sz) {
|
||||
var imgLocation = OpenLayers.Util.getImagesLocation() + img;
|
||||
var imgLocation = OpenLayers.Util.getImageLocation(img);
|
||||
var btn = OpenLayers.Util.createAlphaImageDiv(
|
||||
this.id + "_" + id,
|
||||
xy, sz, imgLocation, "absolute");
|
||||
|
||||
Reference in New Issue
Block a user