From 68a6c62f0b9880b98e54e09cf0daa99d6c42f2d5 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Fri, 10 Feb 2012 18:03:22 +0100 Subject: [PATCH] Documenting tileOptions defaults. --- lib/OpenLayers/Layer/Bing.js | 10 ++++++++++ lib/OpenLayers/Layer/OSM.js | 19 +++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/lib/OpenLayers/Layer/Bing.js b/lib/OpenLayers/Layer/Bing.js index 703c2b5e43..f593551ef7 100644 --- a/lib/OpenLayers/Layer/Bing.js +++ b/lib/OpenLayers/Layer/Bing.js @@ -74,6 +74,16 @@ OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, { */ metadataParams: null, + /** APIProperty: tileOptions + * {Object} optional configuration options for instances + * created by this Layer. Default is + * + * (code) + * {crossOriginKeyword: 'anonymous'} + * (end) + */ + tileOptions: null, + /** * Constructor: OpenLayers.Layer.Bing * Create a new Bing layer. diff --git a/lib/OpenLayers/Layer/OSM.js b/lib/OpenLayers/Layer/OSM.js index 69f411756b..04e7b04454 100644 --- a/lib/OpenLayers/Layer/OSM.js +++ b/lib/OpenLayers/Layer/OSM.js @@ -63,6 +63,25 @@ OpenLayers.Layer.OSM = OpenLayers.Class(OpenLayers.Layer.XYZ, { */ wrapDateLine: true, + /** APIProperty: tileOptions + * {Object} optional configuration options for instances + * created by this Layer. Default is + * + * (code) + * {crossOriginKeyword: 'anonymous'} + * (end) + * + * When using OSM tilesets other than the default ones, it may be + * necessary to set this to + * + * (code) + * {crossOriginKeyword: null} + * (end) + * + * if the server does not send Access-Control-Allow-Origin headers. + */ + tileOptions: null, + /** * Constructor: OpenLayers.Layer.OSM *