New crossOriginKeyword property.
Set to 'anonymous' for Layer.OSM and Layer.Bing, and not used by default for other layers.
This commit is contained in:
@@ -107,6 +107,9 @@ OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, {
|
||||
|
||||
var newArgs = [name, null, options];
|
||||
OpenLayers.Layer.XYZ.prototype.initialize.apply(this, newArgs);
|
||||
this.tileOptions = OpenLayers.Util.extend({
|
||||
crossOriginKeyword: 'anonymous'
|
||||
}, this.options.tileOptions);
|
||||
this.loadMetadata();
|
||||
},
|
||||
|
||||
|
||||
@@ -73,6 +73,12 @@ OpenLayers.Layer.OSM = OpenLayers.Class(OpenLayers.Layer.XYZ, {
|
||||
* layer option can be set in this object (e.g.
|
||||
* <OpenLayers.Layer.Grid.buffer>).
|
||||
*/
|
||||
initialize: function(name, url, options) {
|
||||
OpenLayers.Layer.XYZ.prototype.initialize.apply(this, arguments);
|
||||
this.tileOptions = OpenLayers.Util.extend({
|
||||
crossOriginKeyword: 'anonymous'
|
||||
}, this.options && this.options.tileOptions);
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: clone
|
||||
|
||||
Reference in New Issue
Block a user