Use XHR by default to load TileJSON in ol.source.TileJSON
This commit is contained in:
@@ -158,7 +158,7 @@ var map = new ol.Map({
|
||||
layers: [
|
||||
new ol.layer.Tile({
|
||||
source: new ol.source.TileJSON({
|
||||
url: 'http://api.tiles.mapbox.com/v3/mapbox.geography-class.jsonp'
|
||||
url: 'http://api.tiles.mapbox.com/v3/mapbox.geography-class.json'
|
||||
})
|
||||
}),
|
||||
new ol.layer.Vector({
|
||||
|
||||
@@ -40,7 +40,7 @@ var vectorLayer = new ol.layer.Vector({
|
||||
|
||||
var rasterLayer = new ol.layer.Tile({
|
||||
source: new ol.source.TileJSON({
|
||||
url: 'http://api.tiles.mapbox.com/v3/mapbox.geography-class.jsonp',
|
||||
url: 'http://api.tiles.mapbox.com/v3/mapbox.geography-class.json',
|
||||
crossOrigin: ''
|
||||
})
|
||||
});
|
||||
|
||||
@@ -19,7 +19,7 @@ var extents = {
|
||||
var base = new ol.layer.Tile({
|
||||
source: new ol.source.TileJSON({
|
||||
url: 'http://api.tiles.mapbox.com/v3/' +
|
||||
'mapbox.world-black.jsonp',
|
||||
'mapbox.world-black.json',
|
||||
crossOrigin: 'anonymous'
|
||||
})
|
||||
});
|
||||
@@ -28,7 +28,7 @@ var overlay = new ol.layer.Tile({
|
||||
extent: extents.northwest,
|
||||
source: new ol.source.TileJSON({
|
||||
url: 'http://api.tiles.mapbox.com/v3/' +
|
||||
'mapbox.world-glass.jsonp',
|
||||
'mapbox.world-glass.json',
|
||||
crossOrigin: 'anonymous'
|
||||
})
|
||||
});
|
||||
|
||||
@@ -15,14 +15,14 @@ var map = new ol.Map({
|
||||
new ol.layer.Tile({
|
||||
source: new ol.source.TileJSON({
|
||||
url: 'http://api.tiles.mapbox.com/v3/' +
|
||||
'mapbox.20110804-hoa-foodinsecurity-3month.jsonp',
|
||||
'mapbox.20110804-hoa-foodinsecurity-3month.json',
|
||||
crossOrigin: 'anonymous'
|
||||
})
|
||||
}),
|
||||
new ol.layer.Tile({
|
||||
source: new ol.source.TileJSON({
|
||||
url: 'http://api.tiles.mapbox.com/v3/' +
|
||||
'mapbox.world-borders-light.jsonp',
|
||||
'mapbox.world-borders-light.json',
|
||||
crossOrigin: 'anonymous'
|
||||
})
|
||||
})
|
||||
|
||||
@@ -19,7 +19,7 @@ var map = new ol.Map({
|
||||
new ol.layer.Tile({
|
||||
source: new ol.source.TileJSON({
|
||||
url: 'http://api.tiles.mapbox.com/v3/' +
|
||||
'mapbox.natural-earth-hypso-bathy.jsonp',
|
||||
'mapbox.natural-earth-hypso-bathy.json',
|
||||
crossOrigin: 'anonymous'
|
||||
}),
|
||||
minResolution: 2000,
|
||||
|
||||
@@ -46,7 +46,7 @@ var map = new ol.Map({
|
||||
new ol.layer.Tile({
|
||||
source: new ol.source.TileJSON({
|
||||
url: 'http://api.tiles.mapbox.com/v3/' +
|
||||
'mapbox.natural-earth-hypso-bathy.jsonp',
|
||||
'mapbox.natural-earth-hypso-bathy.json',
|
||||
crossOrigin: 'anonymous'
|
||||
})
|
||||
})
|
||||
|
||||
@@ -13,7 +13,7 @@ var map = new ol.Map({
|
||||
}),
|
||||
new ol.layer.Tile({
|
||||
source: new ol.source.TileJSON({
|
||||
url: 'http://api.tiles.mapbox.com/v3/mapbox.va-quake-aug.jsonp',
|
||||
url: 'http://api.tiles.mapbox.com/v3/mapbox.va-quake-aug.json',
|
||||
crossOrigin: 'anonymous'
|
||||
})
|
||||
})
|
||||
|
||||
@@ -79,7 +79,7 @@ Progress.prototype.hide = function() {
|
||||
var progress = new Progress(document.getElementById('progress'));
|
||||
|
||||
var source = new ol.source.TileJSON({
|
||||
url: 'http://api.tiles.mapbox.com/v3/mapbox.world-bright.jsonp',
|
||||
url: 'http://api.tiles.mapbox.com/v3/mapbox.world-bright.json',
|
||||
crossOrigin: 'anonymous'
|
||||
});
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ var map = new ol.Map({
|
||||
layers: [
|
||||
new ol.layer.Tile({
|
||||
source: new ol.source.TileJSON({
|
||||
url: 'http://api.tiles.mapbox.com/v3/mapbox.geography-class.jsonp',
|
||||
url: 'http://api.tiles.mapbox.com/v3/mapbox.geography-class.json',
|
||||
crossOrigin: 'anonymous'
|
||||
})
|
||||
})
|
||||
|
||||
@@ -12,7 +12,7 @@ goog.require('ol.style.Style');
|
||||
|
||||
var raster = new ol.layer.Tile({
|
||||
source: new ol.source.TileJSON({
|
||||
url: 'http://api.tiles.mapbox.com/v3/mapbox.world-dark.jsonp'
|
||||
url: 'http://api.tiles.mapbox.com/v3/mapbox.world-dark.json'
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user