Rename _ol_source_XYZ_ to XYZ

This commit is contained in:
Tim Schaub
2018-01-08 13:56:25 -07:00
parent fe0d05900f
commit 8c0a06b56a
26 changed files with 79 additions and 79 deletions

View File

@@ -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);
});
});

View File

@@ -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'
});

View File

@@ -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() {