Rename _ol_source_XYZ_ to XYZ
This commit is contained in:
@@ -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