Rename _ol_source_XYZ_ to XYZ
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import Map from '../src/ol/Map.js';
|
||||
import View from '../src/ol/View.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import _ol_source_XYZ_ from '../src/ol/source/XYZ.js';
|
||||
import XYZ from '../src/ol/source/XYZ.js';
|
||||
|
||||
var appId = 'kDm0Jq1K4Ak7Bwtn8uvk';
|
||||
var appCode = 'xnmvc4dKZrDfGlvQHXSvwQ';
|
||||
@@ -59,7 +59,7 @@ for (i = 0, ii = hereLayers.length; i < ii; ++i) {
|
||||
layers.push(new TileLayer({
|
||||
visible: false,
|
||||
preload: Infinity,
|
||||
source: new _ol_source_XYZ_({
|
||||
source: new XYZ({
|
||||
url: createUrl(urlTpl, layerDesc),
|
||||
attributions: 'Map Tiles © ' + new Date().getFullYear() + ' ' +
|
||||
'<a href="http://developer.here.com">HERE</a>'
|
||||
|
||||
@@ -9,7 +9,7 @@ import _ol_source_OSM_ from '../src/ol/source/OSM.js';
|
||||
import TileImage from '../src/ol/source/TileImage.js';
|
||||
import _ol_source_TileWMS_ from '../src/ol/source/TileWMS.js';
|
||||
import _ol_source_WMTS_ from '../src/ol/source/WMTS.js';
|
||||
import _ol_source_XYZ_ from '../src/ol/source/XYZ.js';
|
||||
import XYZ from '../src/ol/source/XYZ.js';
|
||||
import TileGrid from '../src/ol/tilegrid/TileGrid.js';
|
||||
import proj4 from 'proj4';
|
||||
|
||||
@@ -59,7 +59,7 @@ proj54009.setExtent([-18e6, -9e6, 18e6, 9e6]);
|
||||
var layers = {};
|
||||
|
||||
layers['bng'] = new TileLayer({
|
||||
source: new _ol_source_XYZ_({
|
||||
source: new XYZ({
|
||||
projection: 'EPSG:27700',
|
||||
url: 'https://tileserver.maptiler.com/miniscale/{z}/{x}/{y}.png',
|
||||
crossOrigin: '',
|
||||
@@ -117,7 +117,7 @@ fetch(url).then(function(response) {
|
||||
});
|
||||
|
||||
layers['grandcanyon'] = new TileLayer({
|
||||
source: new _ol_source_XYZ_({
|
||||
source: new XYZ({
|
||||
url: 'https://tileserver.maptiler.com/grandcanyon@2x/{z}/{x}/{y}.png',
|
||||
crossOrigin: '',
|
||||
tilePixelRatio: 2,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Map from '../src/ol/Map.js';
|
||||
import View from '../src/ol/View.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import _ol_source_XYZ_ from '../src/ol/source/XYZ.js';
|
||||
import XYZ from '../src/ol/source/XYZ.js';
|
||||
|
||||
var urls = [
|
||||
'https://{a-c}.tiles.mapbox.com/v3/mapbox.blue-marble-topo-jan/{z}/{x}/{y}.png',
|
||||
@@ -10,7 +10,7 @@ var urls = [
|
||||
'https://{a-c}.tiles.mapbox.com/v3/mapbox.blue-marble-topo-bathy-jul/{z}/{x}/{y}.png'
|
||||
];
|
||||
|
||||
var source = new _ol_source_XYZ_();
|
||||
var source = new XYZ();
|
||||
|
||||
var map = new Map({
|
||||
target: 'map',
|
||||
|
||||
@@ -5,7 +5,7 @@ import ImageLayer from '../src/ol/layer/Image.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import {fromLonLat} from '../src/ol/proj.js';
|
||||
import RasterSource from '../src/ol/source/Raster.js';
|
||||
import _ol_source_XYZ_ from '../src/ol/source/XYZ.js';
|
||||
import XYZ from '../src/ol/source/XYZ.js';
|
||||
|
||||
function flood(pixels, data) {
|
||||
var pixel = pixels[0];
|
||||
@@ -24,7 +24,7 @@ function flood(pixels, data) {
|
||||
}
|
||||
|
||||
var key = 'pk.eyJ1IjoidHNjaGF1YiIsImEiOiJjaW5zYW5lNHkxMTNmdWttM3JyOHZtMmNtIn0.CDIBD8H-G2Gf-cPkIuWtRg';
|
||||
var elevation = new _ol_source_XYZ_({
|
||||
var elevation = new XYZ({
|
||||
url: 'https://api.mapbox.com/v4/mapbox.terrain-rgb/{z}/{x}/{y}.pngraw?access_token=' + key,
|
||||
crossOrigin: 'anonymous',
|
||||
transition: 0
|
||||
@@ -39,7 +39,7 @@ var map = new Map({
|
||||
target: 'map',
|
||||
layers: [
|
||||
new TileLayer({
|
||||
source: new _ol_source_XYZ_({
|
||||
source: new XYZ({
|
||||
url: 'https://api.mapbox.com/styles/v1/tschaub/ciutc102t00c62js5fqd47kqw/tiles/256/{z}/{x}/{y}?access_token=' + key
|
||||
})
|
||||
}),
|
||||
|
||||
@@ -5,7 +5,7 @@ import ImageLayer from '../src/ol/layer/Image.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import _ol_source_OSM_ from '../src/ol/source/OSM.js';
|
||||
import RasterSource from '../src/ol/source/Raster.js';
|
||||
import _ol_source_XYZ_ from '../src/ol/source/XYZ.js';
|
||||
import XYZ from '../src/ol/source/XYZ.js';
|
||||
|
||||
|
||||
/**
|
||||
@@ -102,7 +102,7 @@ function shade(inputs, data) {
|
||||
return {data: shadeData, width: width, height: height};
|
||||
}
|
||||
|
||||
var elevation = new _ol_source_XYZ_({
|
||||
var elevation = new XYZ({
|
||||
url: 'https://{a-d}.tiles.mapbox.com/v3/aj.sf-dem/{z}/{x}/{y}.png',
|
||||
crossOrigin: 'anonymous',
|
||||
transition: 0
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import Map from '../src/ol/Map.js';
|
||||
import View from '../src/ol/View.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import _ol_source_XYZ_ from '../src/ol/source/XYZ.js';
|
||||
import XYZ from '../src/ol/source/XYZ.js';
|
||||
|
||||
var url = 'https://{a-c}.tiles.mapbox.com/v3/mapbox.world-bright/{z}/{x}/{y}.png';
|
||||
|
||||
var withTransition = new TileLayer({
|
||||
source: new _ol_source_XYZ_({url: url})
|
||||
source: new XYZ({url: url})
|
||||
});
|
||||
|
||||
var withoutTransition = new TileLayer({
|
||||
source: new _ol_source_XYZ_({url: url, transition: 0}),
|
||||
source: new XYZ({url: url, transition: 0}),
|
||||
visible: false
|
||||
});
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_loadingstrategy_ from '../src/ol/loadingstrategy.js';
|
||||
import {fromLonLat} from '../src/ol/proj.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_source_XYZ_ from '../src/ol/source/XYZ.js';
|
||||
import XYZ from '../src/ol/source/XYZ.js';
|
||||
import _ol_tilegrid_ from '../src/ol/tilegrid.js';
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ var vector = new VectorLayer({
|
||||
});
|
||||
|
||||
var raster = new TileLayer({
|
||||
source: new _ol_source_XYZ_({
|
||||
source: new XYZ({
|
||||
attributions: 'Tiles © <a href="https://services.arcgisonline.com/ArcGIS/' +
|
||||
'rest/services/World_Topo_Map/MapServer">ArcGIS</a>',
|
||||
url: 'https://server.arcgisonline.com/ArcGIS/rest/services/' +
|
||||
|
||||
@@ -6,7 +6,7 @@ import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import _ol_loadingstrategy_ from '../src/ol/loadingstrategy.js';
|
||||
import {fromLonLat} from '../src/ol/proj.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import _ol_source_XYZ_ from '../src/ol/source/XYZ.js';
|
||||
import XYZ from '../src/ol/source/XYZ.js';
|
||||
import _ol_style_Fill_ from '../src/ol/style/Fill.js';
|
||||
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
|
||||
import _ol_style_Style_ from '../src/ol/style/Style.js';
|
||||
@@ -96,7 +96,7 @@ var vector = new VectorLayer({
|
||||
});
|
||||
|
||||
var raster = new TileLayer({
|
||||
source: new _ol_source_XYZ_({
|
||||
source: new XYZ({
|
||||
attributions: 'Tiles © <a href="https://services.arcgisonline.com/ArcGIS/' +
|
||||
'rest/services/World_Topo_Map/MapServer">ArcGIS</a>',
|
||||
url: 'https://server.arcgisonline.com/ArcGIS/rest/services/' +
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Map from '../src/ol/Map.js';
|
||||
import View from '../src/ol/View.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import _ol_source_XYZ_ from '../src/ol/source/XYZ.js';
|
||||
import XYZ from '../src/ol/source/XYZ.js';
|
||||
|
||||
// The tile size supported by the ArcGIS tile service.
|
||||
var tileSize = 512;
|
||||
@@ -13,7 +13,7 @@ var map = new Map({
|
||||
target: 'map',
|
||||
layers: [
|
||||
new TileLayer({
|
||||
source: new _ol_source_XYZ_({
|
||||
source: new XYZ({
|
||||
attributions: 'Copyright:© 2013 ESRI, i-cubed, GeoEye',
|
||||
maxZoom: 16,
|
||||
projection: 'EPSG:4326',
|
||||
|
||||
@@ -2,14 +2,14 @@ import Map from '../src/ol/Map.js';
|
||||
import View from '../src/ol/View.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import {fromLonLat} from '../src/ol/proj.js';
|
||||
import _ol_source_XYZ_ from '../src/ol/source/XYZ.js';
|
||||
import XYZ from '../src/ol/source/XYZ.js';
|
||||
|
||||
|
||||
var map = new Map({
|
||||
target: 'map',
|
||||
layers: [
|
||||
new TileLayer({
|
||||
source: new _ol_source_XYZ_({
|
||||
source: new XYZ({
|
||||
attributions: 'Tiles © <a href="https://services.arcgisonline.com/ArcGIS/' +
|
||||
'rest/services/World_Topo_Map/MapServer">ArcGIS</a>',
|
||||
url: 'https://server.arcgisonline.com/ArcGIS/rest/services/' +
|
||||
|
||||
@@ -3,7 +3,7 @@ import View from '../src/ol/View.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import {transform, transformExtent} from '../src/ol/proj.js';
|
||||
import _ol_source_OSM_ from '../src/ol/source/OSM.js';
|
||||
import _ol_source_XYZ_ from '../src/ol/source/XYZ.js';
|
||||
import XYZ from '../src/ol/source/XYZ.js';
|
||||
|
||||
var mapMinZoom = 1;
|
||||
var mapMaxZoom = 15;
|
||||
@@ -17,7 +17,7 @@ var map = new Map({
|
||||
}),
|
||||
new TileLayer({
|
||||
extent: transformExtent(mapExtent, 'EPSG:4326', 'EPSG:3857'),
|
||||
source: new _ol_source_XYZ_({
|
||||
source: new XYZ({
|
||||
attributions: 'Tiles © USGS, rendered with ' +
|
||||
'<a href="http://www.maptiler.com/">MapTiler</a>',
|
||||
url: 'https://tileserver.maptiler.com/grandcanyon@2x/{z}/{x}/{y}.png',
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import Map from '../src/ol/Map.js';
|
||||
import View from '../src/ol/View.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import _ol_source_XYZ_ from '../src/ol/source/XYZ.js';
|
||||
import XYZ from '../src/ol/source/XYZ.js';
|
||||
|
||||
|
||||
var map = new Map({
|
||||
target: 'map',
|
||||
layers: [
|
||||
new TileLayer({
|
||||
source: new _ol_source_XYZ_({
|
||||
source: new XYZ({
|
||||
url: 'https://{a-c}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png' +
|
||||
'?apikey=0e6fc415256d4fbb9b5166a718591d71'
|
||||
})
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import {inherits} from '../index.js';
|
||||
import _ol_obj_ from '../obj.js';
|
||||
import SourceState from '../source/State.js';
|
||||
import _ol_source_XYZ_ from '../source/XYZ.js';
|
||||
import XYZ from '../source/XYZ.js';
|
||||
|
||||
/**
|
||||
* @classdesc
|
||||
@@ -41,7 +41,7 @@ var CartoDB = function(options) {
|
||||
*/
|
||||
this.templateCache_ = {};
|
||||
|
||||
_ol_source_XYZ_.call(this, {
|
||||
XYZ.call(this, {
|
||||
attributions: options.attributions,
|
||||
cacheSize: options.cacheSize,
|
||||
crossOrigin: options.crossOrigin,
|
||||
@@ -54,7 +54,7 @@ var CartoDB = function(options) {
|
||||
this.initializeMap_();
|
||||
};
|
||||
|
||||
inherits(CartoDB, _ol_source_XYZ_);
|
||||
inherits(CartoDB, XYZ);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @module ol/source/OSM
|
||||
*/
|
||||
import {inherits} from '../index.js';
|
||||
import _ol_source_XYZ_ from '../source/XYZ.js';
|
||||
import XYZ from '../source/XYZ.js';
|
||||
|
||||
/**
|
||||
* @classdesc
|
||||
@@ -30,7 +30,7 @@ var _ol_source_OSM_ = function(opt_options) {
|
||||
var url = options.url !== undefined ?
|
||||
options.url : 'https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png';
|
||||
|
||||
_ol_source_XYZ_.call(this, {
|
||||
XYZ.call(this, {
|
||||
attributions: attributions,
|
||||
cacheSize: options.cacheSize,
|
||||
crossOrigin: crossOrigin,
|
||||
@@ -44,7 +44,7 @@ var _ol_source_OSM_ = function(opt_options) {
|
||||
|
||||
};
|
||||
|
||||
inherits(_ol_source_OSM_, _ol_source_XYZ_);
|
||||
inherits(_ol_source_OSM_, XYZ);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
import {inherits} from '../index.js';
|
||||
import _ol_source_OSM_ from '../source/OSM.js';
|
||||
import _ol_source_XYZ_ from '../source/XYZ.js';
|
||||
import XYZ from '../source/XYZ.js';
|
||||
|
||||
/**
|
||||
* @classdesc
|
||||
@@ -25,7 +25,7 @@ var _ol_source_Stamen_ = function(options) {
|
||||
'https://stamen-tiles-{a-d}.a.ssl.fastly.net/' + options.layer +
|
||||
'/{z}/{x}/{y}.' + layerConfig.extension;
|
||||
|
||||
_ol_source_XYZ_.call(this, {
|
||||
XYZ.call(this, {
|
||||
attributions: _ol_source_Stamen_.ATTRIBUTIONS,
|
||||
cacheSize: options.cacheSize,
|
||||
crossOrigin: 'anonymous',
|
||||
@@ -39,7 +39,7 @@ var _ol_source_Stamen_ = function(options) {
|
||||
});
|
||||
};
|
||||
|
||||
inherits(_ol_source_Stamen_, _ol_source_XYZ_);
|
||||
inherits(_ol_source_Stamen_, XYZ);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -27,7 +27,7 @@ import _ol_tilegrid_ from '../tilegrid.js';
|
||||
* @param {olx.source.XYZOptions=} opt_options XYZ options.
|
||||
* @api
|
||||
*/
|
||||
var _ol_source_XYZ_ = function(opt_options) {
|
||||
var XYZ = function(opt_options) {
|
||||
var options = opt_options || {};
|
||||
var projection = options.projection !== undefined ?
|
||||
options.projection : 'EPSG:3857';
|
||||
@@ -59,5 +59,5 @@ var _ol_source_XYZ_ = function(opt_options) {
|
||||
|
||||
};
|
||||
|
||||
inherits(_ol_source_XYZ_, TileImage);
|
||||
export default _ol_source_XYZ_;
|
||||
inherits(XYZ, TileImage);
|
||||
export default XYZ;
|
||||
|
||||
@@ -2,7 +2,7 @@ import Map from '../../../../src/ol/Map.js';
|
||||
import View from '../../../../src/ol/View.js';
|
||||
import MultiPolygon from '../../../../src/ol/geom/MultiPolygon.js';
|
||||
import TileLayer from '../../../../src/ol/layer/Tile.js';
|
||||
import _ol_source_XYZ_ from '../../../../src/ol/source/XYZ.js';
|
||||
import XYZ from '../../../../src/ol/source/XYZ.js';
|
||||
import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js';
|
||||
import _ol_style_Style_ from '../../../../src/ol/style/Style.js';
|
||||
|
||||
@@ -55,7 +55,7 @@ describe('layer clipping', function() {
|
||||
|
||||
it('clips to all parts of the MultiPolygon', function(done) {
|
||||
|
||||
var source = new _ol_source_XYZ_({
|
||||
var source = new XYZ({
|
||||
url: 'rendering/ol/data/tiles/osm/{z}/{x}/{y}.png',
|
||||
transition: 0
|
||||
});
|
||||
|
||||
@@ -6,7 +6,7 @@ import TileLayer from '../../../../src/ol/layer/Tile.js';
|
||||
import _ol_obj_ from '../../../../src/ol/obj.js';
|
||||
import {transform} from '../../../../src/ol/proj.js';
|
||||
import TileImage from '../../../../src/ol/source/TileImage.js';
|
||||
import _ol_source_XYZ_ from '../../../../src/ol/source/XYZ.js';
|
||||
import XYZ from '../../../../src/ol/source/XYZ.js';
|
||||
import _ol_style_Circle_ from '../../../../src/ol/style/Circle.js';
|
||||
import _ol_style_Fill_ from '../../../../src/ol/style/Fill.js';
|
||||
import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js';
|
||||
@@ -73,7 +73,7 @@ describe('ol.rendering.layer.Tile', function() {
|
||||
describe('with tile transition', function() {
|
||||
it('renders correctly after the transition', function(done) {
|
||||
createMap('canvas');
|
||||
var source = new _ol_source_XYZ_({
|
||||
var source = new XYZ({
|
||||
url: 'rendering/ol/data/tiles/osm/{z}/{x}/{y}.png'
|
||||
});
|
||||
waitForTiles([source], {}, function() {
|
||||
@@ -89,7 +89,7 @@ describe('ol.rendering.layer.Tile', function() {
|
||||
var source;
|
||||
|
||||
beforeEach(function() {
|
||||
source = new _ol_source_XYZ_({
|
||||
source = new XYZ({
|
||||
url: 'rendering/ol/data/tiles/osm/{z}/{x}/{y}.png',
|
||||
transition: 0
|
||||
});
|
||||
@@ -117,11 +117,11 @@ describe('ol.rendering.layer.Tile', function() {
|
||||
var source1, source2;
|
||||
|
||||
beforeEach(function() {
|
||||
source1 = new _ol_source_XYZ_({
|
||||
source1 = new XYZ({
|
||||
url: 'rendering/ol/data/tiles/osm/{z}/{x}/{y}.png',
|
||||
transition: 0
|
||||
});
|
||||
source2 = new _ol_source_XYZ_({
|
||||
source2 = new XYZ({
|
||||
url: 'rendering/ol/data/tiles/stamen-labels/{z}/{x}/{y}.png',
|
||||
transition: 0
|
||||
});
|
||||
@@ -191,7 +191,7 @@ describe('ol.rendering.layer.Tile', function() {
|
||||
var source;
|
||||
|
||||
beforeEach(function() {
|
||||
source = new _ol_source_XYZ_({
|
||||
source = new XYZ({
|
||||
url: 'rendering/ol/data/tiles/osm/{z}/{x}/{y}.png',
|
||||
transition: 0
|
||||
});
|
||||
@@ -272,7 +272,7 @@ describe('ol.rendering.layer.Tile', function() {
|
||||
var source, onAddLayer;
|
||||
|
||||
beforeEach(function() {
|
||||
source = new _ol_source_XYZ_({
|
||||
source = new XYZ({
|
||||
url: 'rendering/ol/data/tiles/osm/{z}/{x}/{y}.png',
|
||||
transition: 0
|
||||
});
|
||||
|
||||
@@ -2,7 +2,7 @@ import TileState from '../../../../src/ol/TileState.js';
|
||||
import _ol_events_ from '../../../../src/ol/events.js';
|
||||
import {get as getProjection} from '../../../../src/ol/proj.js';
|
||||
import _ol_reproj_Tile_ from '../../../../src/ol/reproj/Tile.js';
|
||||
import _ol_source_XYZ_ from '../../../../src/ol/source/XYZ.js';
|
||||
import XYZ from '../../../../src/ol/source/XYZ.js';
|
||||
import _ol_tilegrid_ from '../../../../src/ol/tilegrid.js';
|
||||
import {register} from '../../../../src/ol/proj/proj4.js';
|
||||
|
||||
@@ -38,7 +38,7 @@ describe('ol.rendering.reproj.Tile', function() {
|
||||
|
||||
describe('single tile reprojections from EPSG:3857', function() {
|
||||
beforeEach(function() {
|
||||
source = new _ol_source_XYZ_({
|
||||
source = new XYZ({
|
||||
projection: 'EPSG:3857',
|
||||
url: 'rendering/ol/data/tiles/osm/{z}/{x}/{y}.png'
|
||||
});
|
||||
@@ -83,7 +83,7 @@ describe('ol.rendering.reproj.Tile', function() {
|
||||
|
||||
describe('stitching several tiles from EPSG:3857', function() {
|
||||
beforeEach(function() {
|
||||
source = new _ol_source_XYZ_({
|
||||
source = new XYZ({
|
||||
projection: 'EPSG:3857',
|
||||
url: 'rendering/ol/data/tiles/osm/{z}/{x}/{y}.png'
|
||||
});
|
||||
@@ -111,7 +111,7 @@ describe('ol.rendering.reproj.Tile', function() {
|
||||
|
||||
describe('tile projection from EPSG:4326', function() {
|
||||
beforeEach(function() {
|
||||
source = new _ol_source_XYZ_({
|
||||
source = new XYZ({
|
||||
projection: 'EPSG:4326',
|
||||
maxZoom: 0,
|
||||
url: 'rendering/ol/data/tiles/4326/{z}/{x}/{y}.png'
|
||||
@@ -132,7 +132,7 @@ describe('ol.rendering.reproj.Tile', function() {
|
||||
|
||||
describe('non-square source tiles', function() {
|
||||
beforeEach(function() {
|
||||
source = new _ol_source_XYZ_({
|
||||
source = new XYZ({
|
||||
projection: 'EPSG:3857',
|
||||
url: 'rendering/ol/data/tiles/osm-512x256/{z}/{x}/{y}.png',
|
||||
tileSize: [512, 256]
|
||||
@@ -153,7 +153,7 @@ describe('ol.rendering.reproj.Tile', function() {
|
||||
|
||||
describe('dateline wrapping', function() {
|
||||
beforeEach(function() {
|
||||
source = new _ol_source_XYZ_({
|
||||
source = new XYZ({
|
||||
projection: 'EPSG:4326',
|
||||
maxZoom: 0,
|
||||
url: 'rendering/ol/data/tiles/4326/{z}/{x}/{y}.png'
|
||||
|
||||
@@ -2,7 +2,7 @@ import Map from '../../../../src/ol/Map.js';
|
||||
import View from '../../../../src/ol/View.js';
|
||||
import ImageLayer from '../../../../src/ol/layer/Image.js';
|
||||
import RasterSource from '../../../../src/ol/source/Raster.js';
|
||||
import _ol_source_XYZ_ from '../../../../src/ol/source/XYZ.js';
|
||||
import XYZ from '../../../../src/ol/source/XYZ.js';
|
||||
|
||||
where('Uint8ClampedArray').describe('ol.rendering.source.Raster', function() {
|
||||
|
||||
@@ -50,7 +50,7 @@ where('Uint8ClampedArray').describe('ol.rendering.source.Raster', function() {
|
||||
it('renders the result of an operation', function(done) {
|
||||
createMap('canvas', 1);
|
||||
|
||||
var source = new _ol_source_XYZ_({
|
||||
var source = new XYZ({
|
||||
url: 'rendering/ol/data/tiles/osm/{z}/{x}/{y}.png',
|
||||
transition: 0
|
||||
});
|
||||
|
||||
@@ -14,7 +14,7 @@ import TileLayer from '../../../src/ol/layer/Tile.js';
|
||||
import VectorLayer from '../../../src/ol/layer/Vector.js';
|
||||
import _ol_renderer_canvas_IntermediateCanvas_ from '../../../src/ol/renderer/canvas/IntermediateCanvas.js';
|
||||
import VectorSource from '../../../src/ol/source/Vector.js';
|
||||
import _ol_source_XYZ_ from '../../../src/ol/source/XYZ.js';
|
||||
import XYZ from '../../../src/ol/source/XYZ.js';
|
||||
|
||||
describe('ol.Map', function() {
|
||||
|
||||
@@ -125,7 +125,7 @@ describe('ol.Map', function() {
|
||||
view: view,
|
||||
layers: [
|
||||
new TileLayer({
|
||||
source: new _ol_source_XYZ_({
|
||||
source: new XYZ({
|
||||
url: '#{x}/{y}/{z}'
|
||||
})
|
||||
})
|
||||
@@ -279,13 +279,13 @@ describe('ol.Map', function() {
|
||||
}),
|
||||
layers: [
|
||||
new TileLayer({
|
||||
source: new _ol_source_XYZ_()
|
||||
source: new XYZ()
|
||||
}),
|
||||
new TileLayer({
|
||||
source: new _ol_source_XYZ_()
|
||||
source: new XYZ()
|
||||
}),
|
||||
new TileLayer({
|
||||
source: new _ol_source_XYZ_()
|
||||
source: new XYZ()
|
||||
})
|
||||
]
|
||||
});
|
||||
|
||||
@@ -5,7 +5,7 @@ import {get as getProjection} from '../../../../../src/ol/proj.js';
|
||||
import _ol_renderer_Map_ from '../../../../../src/ol/renderer/Map.js';
|
||||
import CanvasTileLayerRenderer from '../../../../../src/ol/renderer/canvas/TileLayer.js';
|
||||
import _ol_source_TileWMS_ from '../../../../../src/ol/source/TileWMS.js';
|
||||
import _ol_source_XYZ_ from '../../../../../src/ol/source/XYZ.js';
|
||||
import XYZ from '../../../../../src/ol/source/XYZ.js';
|
||||
import _ol_transform_ from '../../../../../src/ol/transform.js';
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ describe('ol.renderer.canvas.TileLayer', function() {
|
||||
|
||||
it('uses correct draw scale when rotating (HiDPI)', function() {
|
||||
var layer = new TileLayer({
|
||||
source: new _ol_source_XYZ_({
|
||||
source: new XYZ({
|
||||
tileSize: 1
|
||||
})
|
||||
});
|
||||
|
||||
@@ -4,7 +4,7 @@ import View from '../../../../src/ol/View.js';
|
||||
import _ol_layer_Layer_ from '../../../../src/ol/layer/Layer.js';
|
||||
import TileLayer from '../../../../src/ol/layer/Tile.js';
|
||||
import _ol_renderer_Layer_ from '../../../../src/ol/renderer/Layer.js';
|
||||
import _ol_source_XYZ_ from '../../../../src/ol/source/XYZ.js';
|
||||
import XYZ from '../../../../src/ol/source/XYZ.js';
|
||||
import _ol_tilecoord_ from '../../../../src/ol/tilecoord.js';
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ describe('ol.renderer.Layer', function() {
|
||||
zoom: 0
|
||||
});
|
||||
|
||||
source = new _ol_source_XYZ_({
|
||||
source = new XYZ({
|
||||
url: '#{x}/{y}/{z}'
|
||||
});
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import CartoDB from '../../../../src/ol/source/CartoDB.js';
|
||||
import _ol_source_XYZ_ from '../../../../src/ol/source/XYZ.js';
|
||||
import XYZ from '../../../../src/ol/source/XYZ.js';
|
||||
|
||||
describe('ol.source.CartoDB', function() {
|
||||
|
||||
@@ -9,7 +9,7 @@ describe('ol.source.CartoDB', function() {
|
||||
account: 'documentation',
|
||||
config: {}
|
||||
});
|
||||
expect(source).to.be.a(_ol_source_XYZ_);
|
||||
expect(source).to.be.a(XYZ);
|
||||
expect(source).to.be.a(CartoDB);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -7,7 +7,7 @@ import _ol_source_ImageStatic_ from '../../../../src/ol/source/ImageStatic.js';
|
||||
import RasterSource from '../../../../src/ol/source/Raster.js';
|
||||
import Source from '../../../../src/ol/source/Source.js';
|
||||
import TileSource from '../../../../src/ol/source/Tile.js';
|
||||
import _ol_source_XYZ_ from '../../../../src/ol/source/XYZ.js';
|
||||
import XYZ from '../../../../src/ol/source/XYZ.js';
|
||||
|
||||
var red = 'data:image/gif;base64,R0lGODlhAQABAPAAAP8AAP///yH5BAAAAAAALAAAAAA' +
|
||||
'BAAEAAAICRAEAOw==';
|
||||
@@ -311,7 +311,7 @@ where('Uint8ClampedArray').describe('ol.source.Raster', function() {
|
||||
|
||||
it('is initiated on the underlying source', function(done) {
|
||||
|
||||
var source = new _ol_source_XYZ_({
|
||||
var source = new XYZ({
|
||||
url: 'spec/ol/data/osm-{z}-{x}-{y}.png'
|
||||
});
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import TileSource from '../../../../src/ol/source/Tile.js';
|
||||
import TileImage from '../../../../src/ol/source/TileImage.js';
|
||||
import _ol_source_UrlTile_ from '../../../../src/ol/source/UrlTile.js';
|
||||
import _ol_source_XYZ_ from '../../../../src/ol/source/XYZ.js';
|
||||
import XYZ from '../../../../src/ol/source/XYZ.js';
|
||||
import _ol_tilegrid_ from '../../../../src/ol/tilegrid.js';
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@ describe('ol.source.XYZ', function() {
|
||||
describe('constructor', function() {
|
||||
|
||||
it('can be constructed without options', function() {
|
||||
var source = new _ol_source_XYZ_();
|
||||
expect(source).to.be.an(_ol_source_XYZ_);
|
||||
var source = new XYZ();
|
||||
expect(source).to.be.an(XYZ);
|
||||
expect(source).to.be.an(TileImage);
|
||||
expect(source).to.be.an(_ol_source_UrlTile_);
|
||||
expect(source).to.be.an(TileSource);
|
||||
@@ -19,21 +19,21 @@ describe('ol.source.XYZ', function() {
|
||||
|
||||
it('can be constructed with a custom tile grid', function() {
|
||||
var tileGrid = _ol_tilegrid_.createXYZ();
|
||||
var tileSource = new _ol_source_XYZ_({
|
||||
var tileSource = new XYZ({
|
||||
tileGrid: tileGrid
|
||||
});
|
||||
expect(tileSource.getTileGrid()).to.be(tileGrid);
|
||||
});
|
||||
|
||||
it('can be constructed with a custom tile size', function() {
|
||||
var tileSource = new _ol_source_XYZ_({
|
||||
var tileSource = new XYZ({
|
||||
tileSize: 512
|
||||
});
|
||||
expect(tileSource.getTileGrid().getTileSize(0)).to.be(512);
|
||||
});
|
||||
|
||||
it('can be constructed with a custom min zoom', function() {
|
||||
var tileSource = new _ol_source_XYZ_({
|
||||
var tileSource = new XYZ({
|
||||
minZoom: 2
|
||||
});
|
||||
expect(tileSource.getTileGrid().getMinZoom()).to.be(2);
|
||||
@@ -46,7 +46,7 @@ describe('ol.source.XYZ', function() {
|
||||
var xyzTileSource, tileGrid;
|
||||
|
||||
beforeEach(function() {
|
||||
xyzTileSource = new _ol_source_XYZ_({
|
||||
xyzTileSource = new XYZ({
|
||||
maxZoom: 6,
|
||||
url: '{z}/{x}/{y}'
|
||||
});
|
||||
@@ -149,7 +149,7 @@ describe('ol.source.XYZ', function() {
|
||||
describe('using a "url" option', function() {
|
||||
beforeEach(function() {
|
||||
sourceOptions.url = url;
|
||||
source = new _ol_source_XYZ_(sourceOptions);
|
||||
source = new XYZ(sourceOptions);
|
||||
});
|
||||
|
||||
it('returns the XYZ URL', function() {
|
||||
@@ -162,7 +162,7 @@ describe('ol.source.XYZ', function() {
|
||||
describe('using a "urls" option', function() {
|
||||
beforeEach(function() {
|
||||
sourceOptions.urls = ['some_xyz_url1', 'some_xyz_url2'];
|
||||
source = new _ol_source_XYZ_(sourceOptions);
|
||||
source = new XYZ(sourceOptions);
|
||||
});
|
||||
|
||||
it('returns the XYZ URLs', function() {
|
||||
@@ -177,7 +177,7 @@ describe('ol.source.XYZ', function() {
|
||||
sourceOptions.tileUrlFunction = function() {
|
||||
return 'some_xyz_url';
|
||||
};
|
||||
source = new _ol_source_XYZ_(sourceOptions);
|
||||
source = new XYZ(sourceOptions);
|
||||
});
|
||||
|
||||
it('returns null', function() {
|
||||
|
||||
Reference in New Issue
Block a user