crossOrigin defaults to null

This commit is contained in:
Éric Lemoine
2013-03-20 19:24:32 +01:00
parent 7038ac0c81
commit 7949cdaa82
17 changed files with 18 additions and 8 deletions
-1
View File
@@ -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',
+2 -1
View File
@@ -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'
})
})
],
+2 -1
View File
@@ -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'
})
})
],
+2
View File
@@ -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(
'&copy; ' +
'<a href="http://www.geo.admin.ch/internet/geoportal/en/home.html">' +
+2
View File
@@ -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(
'&copy; ' +
'<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(
'&copy; ' +
'<a href="http://www.geo.admin.ch/internet/geoportal/en/home.html">' +
-1
View File
@@ -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)
})
-1
View File
@@ -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)
})
+1
View File
@@ -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({
-1
View File
@@ -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)
})
})