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:
@@ -231,7 +231,7 @@ OpenLayers.Marker = OpenLayers.Class({
|
||||
* {<OpenLayers.Icon>} A default OpenLayers.Icon to use for a marker
|
||||
*/
|
||||
OpenLayers.Marker.defaultIcon = function() {
|
||||
var url = OpenLayers.Util.getImagesLocation() + "marker.png";
|
||||
var url = OpenLayers.Util.getImageLocation("marker.png");
|
||||
var size = new OpenLayers.Size(21, 25);
|
||||
var calculateOffset = function(size) {
|
||||
return new OpenLayers.Pixel(-(size.w/2), -size.h);
|
||||
|
||||
Reference in New Issue
Block a user