Transformed

This commit is contained in:
Tim Schaub
2017-12-11 16:29:33 -07:00
parent 1cdb6a66f0
commit 7f47883c48
737 changed files with 22216 additions and 21609 deletions
+18 -20
View File
@@ -1,10 +1,8 @@
goog.require('ol.source.Tile');
goog.require('ol.source.TileImage');
goog.require('ol.source.UrlTile');
goog.require('ol.source.XYZ');
goog.require('ol.tilegrid');
import _ol_source_Tile_ from '../../../../src/ol/source/Tile.js';
import _ol_source_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 _ol_tilegrid_ from '../../../../src/ol/tilegrid.js';
describe('ol.source.XYZ', function() {
@@ -12,30 +10,30 @@ 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);
expect(source).to.be.an(ol.source.TileImage);
expect(source).to.be.an(ol.source.UrlTile);
expect(source).to.be.an(ol.source.Tile);
var source = new _ol_source_XYZ_();
expect(source).to.be.an(_ol_source_XYZ_);
expect(source).to.be.an(_ol_source_TileImage_);
expect(source).to.be.an(_ol_source_UrlTile_);
expect(source).to.be.an(_ol_source_Tile_);
});
it('can be constructed with a custom tile grid', function() {
var tileGrid = ol.tilegrid.createXYZ();
var tileSource = new ol.source.XYZ({
var tileGrid = _ol_tilegrid_.createXYZ();
var tileSource = new _ol_source_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 _ol_source_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 _ol_source_XYZ_({
minZoom: 2
});
expect(tileSource.getTileGrid().getMinZoom()).to.be(2);
@@ -48,7 +46,7 @@ describe('ol.source.XYZ', function() {
var xyzTileSource, tileGrid;
beforeEach(function() {
xyzTileSource = new ol.source.XYZ({
xyzTileSource = new _ol_source_XYZ_({
maxZoom: 6,
url: '{z}/{x}/{y}'
});
@@ -151,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 _ol_source_XYZ_(sourceOptions);
});
it('returns the XYZ URL', function() {
@@ -164,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 _ol_source_XYZ_(sourceOptions);
});
it('returns the XYZ URLs', function() {
@@ -179,7 +177,7 @@ describe('ol.source.XYZ', function() {
sourceOptions.tileUrlFunction = function() {
return 'some_xyz_url';
};
source = new ol.source.XYZ(sourceOptions);
source = new _ol_source_XYZ_(sourceOptions);
});
it('returns null', function() {