crossOrigin defaults to null
This commit is contained in:
@@ -13,7 +13,6 @@ var layers = [
|
||||
new ol.layer.TileLayer({
|
||||
source: new ol.source.TiledWMS({
|
||||
url: 'http://vmap0.tiles.osgeo.org/wms/vmap0',
|
||||
crossOrigin: null,
|
||||
params: {
|
||||
'VERSION': '1.1.1',
|
||||
'LAYERS': 'basic',
|
||||
|
||||
@@ -15,7 +15,8 @@ var map = new ol.Map({
|
||||
}),
|
||||
new ol.layer.TileLayer({
|
||||
source: new ol.source.TileJSON({
|
||||
uri: 'http://api.tiles.mapbox.com/v3/mapbox.va-quake-aug.jsonp'
|
||||
uri: 'http://api.tiles.mapbox.com/v3/mapbox.va-quake-aug.jsonp',
|
||||
crossOrigin: 'anonymous'
|
||||
})
|
||||
})
|
||||
],
|
||||
|
||||
@@ -10,7 +10,8 @@ var map = new ol.Map({
|
||||
layers: [
|
||||
new ol.layer.TileLayer({
|
||||
source: new ol.source.TileJSON({
|
||||
uri: 'http://api.tiles.mapbox.com/v3/mapbox.geography-class.jsonp'
|
||||
uri: 'http://api.tiles.mapbox.com/v3/mapbox.geography-class.jsonp',
|
||||
crossOrigin: 'anonymous'
|
||||
})
|
||||
})
|
||||
],
|
||||
|
||||
@@ -22,6 +22,7 @@ var layers = [
|
||||
new ol.layer.TileLayer({
|
||||
source: new ol.source.TiledWMS({
|
||||
url: 'http://wms.geo.admin.ch/',
|
||||
crossOrigin: 'anonymous',
|
||||
attributions: [new ol.Attribution(
|
||||
'© ' +
|
||||
'<a href="http://www.geo.admin.ch/internet/geoportal/en/home.html">' +
|
||||
@@ -36,6 +37,7 @@ var layers = [
|
||||
new ol.layer.TileLayer({
|
||||
source: new ol.source.TiledWMS({
|
||||
url: 'http://wms.geo.admin.ch/',
|
||||
crossOrigin: 'anonymous',
|
||||
attributions: [new ol.Attribution(
|
||||
'© ' +
|
||||
'<a href="http://www.geo.admin.ch/internet/geoportal/en/home.html">' +
|
||||
|
||||
@@ -19,6 +19,7 @@ var layers = [
|
||||
new ol.layer.ImageLayer({
|
||||
source: new ol.source.SingleImageWMS({
|
||||
url: 'http://wms.geo.admin.ch/',
|
||||
crossOrigin: 'anonymous',
|
||||
attributions: [new ol.Attribution(
|
||||
'© ' +
|
||||
'<a href="http://www.geo.admin.ch/internet/geoportal/en/home.html">' +
|
||||
@@ -33,6 +34,7 @@ var layers = [
|
||||
new ol.layer.ImageLayer({
|
||||
source: new ol.source.SingleImageWMS({
|
||||
url: 'http://wms.geo.admin.ch/',
|
||||
crossOrigin: 'anonymous',
|
||||
attributions: [new ol.Attribution(
|
||||
'© ' +
|
||||
'<a href="http://www.geo.admin.ch/internet/geoportal/en/home.html">' +
|
||||
|
||||
@@ -16,7 +16,6 @@ var layers = [
|
||||
new ol.layer.ImageLayer({
|
||||
source: new ol.source.SingleImageWMS({
|
||||
url: 'http://demo.opengeo.org/geoserver/wms',
|
||||
crossOrigin: null,
|
||||
params: {'LAYERS': 'topp:states'},
|
||||
extent: new ol.Extent(-13884991, 2870341, -7455066, 6338219)
|
||||
})
|
||||
|
||||
@@ -15,7 +15,6 @@ var layers = [
|
||||
new ol.layer.TileLayer({
|
||||
source: new ol.source.TiledWMS({
|
||||
url: 'http://demo.opengeo.org/geoserver/wms',
|
||||
crossOrigin: null,
|
||||
params: {'LAYERS': 'topp:states', 'TILED': true},
|
||||
extent: new ol.Extent(-13884991, 2870341, -7455066, 6338219)
|
||||
})
|
||||
|
||||
@@ -28,6 +28,7 @@ xhr.onload = function() {
|
||||
capabilities = parser.read(xhr.responseXML);
|
||||
var wmtsOptions = ol.source.WMTS.optionsFromCapabilities(
|
||||
capabilities, 'ch.swisstopo.pixelkarte-farbe');
|
||||
wmtsOptions.crossOrigin = 'anonymous';
|
||||
map = new ol.Map({
|
||||
layers: [
|
||||
new ol.layer.TileLayer({
|
||||
|
||||
@@ -40,7 +40,6 @@ var map = new ol.Map({
|
||||
matrixIds: matrixIds
|
||||
}),
|
||||
style: '_null',
|
||||
crossOrigin: null, // FIXME: this should be the default
|
||||
extent: new ol.Extent(-13682835, 5204068, -13667473, 5221690)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -154,6 +154,7 @@
|
||||
@exportObjectLiteralProperty ol.source.StaticImageOptions.url string|undefined
|
||||
|
||||
@exportObjectLiteral ol.source.TileJSONOptions
|
||||
@exportObjectLiteralProperty ol.source.TileJSONOptions.crossOrigin null|string|undefined
|
||||
@exportObjectLiteralProperty ol.source.TileJSONOptions.uri string
|
||||
|
||||
@exportObjectLiteral ol.source.TiledWMSOptions
|
||||
|
||||
@@ -23,6 +23,7 @@ goog.require('ol.tilegrid.XYZ');
|
||||
ol.source.BingMaps = function(bingMapsOptions) {
|
||||
|
||||
goog.base(this, {
|
||||
crossOrigin: 'anonymous',
|
||||
opaque: true,
|
||||
projection: ol.projection.get('EPSG:3857')
|
||||
});
|
||||
|
||||
@@ -53,7 +53,7 @@ ol.source.ImageSource = function(options) {
|
||||
* @type {?string}
|
||||
*/
|
||||
this.crossOrigin_ =
|
||||
goog.isDef(options.crossOrigin) ? options.crossOrigin : 'anonymous';
|
||||
goog.isDef(options.crossOrigin) ? options.crossOrigin : null;
|
||||
|
||||
/**
|
||||
* @private
|
||||
|
||||
@@ -55,7 +55,7 @@ ol.source.ImageTileSource = function(options) {
|
||||
* @type {?string}
|
||||
*/
|
||||
this.crossOrigin_ =
|
||||
goog.isDef(options.crossOrigin) ? options.crossOrigin : 'anonymous';
|
||||
goog.isDef(options.crossOrigin) ? options.crossOrigin : null;
|
||||
|
||||
/**
|
||||
* @private
|
||||
|
||||
@@ -26,6 +26,7 @@ ol.source.MapQuestOSM = function() {
|
||||
|
||||
goog.base(this, {
|
||||
attributions: attributions,
|
||||
crossOrigin: 'anonymous',
|
||||
opaque: true,
|
||||
maxZoom: 28,
|
||||
url: 'http://otile{1-4}.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.jpg'
|
||||
@@ -54,6 +55,7 @@ ol.source.MapQuestOpenAerial = function() {
|
||||
|
||||
goog.base(this, {
|
||||
attributions: attributions,
|
||||
crossOrigin: 'anonymous',
|
||||
maxZoom: 18,
|
||||
opaque: true,
|
||||
url: 'http://oatile{1-4}.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg'
|
||||
|
||||
@@ -18,6 +18,7 @@ ol.source.OpenStreetMap = function() {
|
||||
|
||||
goog.base(this, {
|
||||
attributions: [attribution],
|
||||
crossOrigin: 'anonymous',
|
||||
opaque: true,
|
||||
maxZoom: 18,
|
||||
url: 'http://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png'
|
||||
|
||||
@@ -106,6 +106,7 @@ ol.source.Stamen = function(options) {
|
||||
|
||||
goog.base(this, {
|
||||
attributions: ol.source.STAMEN_ATTRIBUTIONS,
|
||||
crossOrigin: 'anonymous',
|
||||
maxZoom: providerConfig.maxZoom,
|
||||
// FIXME uncomment the following when tilegrid supports minZoom
|
||||
//minZoom: providerConfig.minZoom,
|
||||
|
||||
@@ -46,6 +46,7 @@ goog.exportSymbol('grid', grid);
|
||||
ol.source.TileJSON = function(tileJsonOptions) {
|
||||
|
||||
goog.base(this, {
|
||||
crossOrigin: tileJsonOptions.crossOrigin,
|
||||
projection: ol.projection.get('EPSG:3857')
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user