Rename _ol_tilegrid_TileGrid_ to TileGrid
This commit is contained in:
@@ -6,7 +6,7 @@ import _ol_proj_Projection_ from '../../../../src/ol/proj/Projection.js';
|
||||
import Source from '../../../../src/ol/source/Source.js';
|
||||
import _ol_source_Tile_ from '../../../../src/ol/source/Tile.js';
|
||||
import _ol_tilecoord_ from '../../../../src/ol/tilecoord.js';
|
||||
import _ol_tilegrid_TileGrid_ from '../../../../src/ol/tilegrid/TileGrid.js';
|
||||
import TileGrid from '../../../../src/ol/tilegrid/TileGrid.js';
|
||||
|
||||
|
||||
/**
|
||||
@@ -19,7 +19,7 @@ import _ol_tilegrid_TileGrid_ from '../../../../src/ol/tilegrid/TileGrid.js';
|
||||
* tile state.
|
||||
*/
|
||||
var MockTile = function(tileStates) {
|
||||
var tileGrid = new _ol_tilegrid_TileGrid_({
|
||||
var tileGrid = new TileGrid({
|
||||
resolutions: [360 / 256, 180 / 256, 90 / 256, 45 / 256],
|
||||
origin: [-180, -180],
|
||||
tileSize: 256
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {get as getProjection, transformExtent, fromLonLat} from '../../../../src/ol/proj.js';
|
||||
import _ol_source_Tile_ from '../../../../src/ol/source/Tile.js';
|
||||
import _ol_source_TileUTFGrid_ from '../../../../src/ol/source/TileUTFGrid.js';
|
||||
import _ol_tilegrid_TileGrid_ from '../../../../src/ol/tilegrid/TileGrid.js';
|
||||
import TileGrid from '../../../../src/ol/tilegrid/TileGrid.js';
|
||||
|
||||
|
||||
describe('ol.source.TileUTFGrid', function() {
|
||||
@@ -66,7 +66,7 @@ describe('ol.source.TileUTFGrid', function() {
|
||||
|
||||
source.on('change', function(event) {
|
||||
if (source.getState() === 'ready') {
|
||||
expect(source.tileGrid).to.be.an(_ol_tilegrid_TileGrid_);
|
||||
expect(source.tileGrid).to.be.an(TileGrid);
|
||||
done();
|
||||
}
|
||||
});
|
||||
@@ -101,7 +101,7 @@ describe('ol.source.TileUTFGrid', function() {
|
||||
|
||||
var tileGrid = source.getTileGrid();
|
||||
expect(tileGrid).to.not.be(null);
|
||||
expect(tileGrid).to.be.an(_ol_tilegrid_TileGrid_);
|
||||
expect(tileGrid).to.be.an(TileGrid);
|
||||
});
|
||||
|
||||
it('sets up a tilegrid with expected extent', function() {
|
||||
|
||||
@@ -2,7 +2,7 @@ import ImageTile from '../../../../src/ol/ImageTile.js';
|
||||
import {get as getProjection} from '../../../../src/ol/proj.js';
|
||||
import _ol_source_TileWMS_ from '../../../../src/ol/source/TileWMS.js';
|
||||
import _ol_tilegrid_ from '../../../../src/ol/tilegrid.js';
|
||||
import _ol_tilegrid_TileGrid_ from '../../../../src/ol/tilegrid/TileGrid.js';
|
||||
import TileGrid from '../../../../src/ol/tilegrid/TileGrid.js';
|
||||
|
||||
|
||||
describe('ol.source.TileWMS', function() {
|
||||
@@ -182,7 +182,7 @@ describe('ol.source.TileWMS', function() {
|
||||
});
|
||||
|
||||
it('works with non-square tiles', function() {
|
||||
options.tileGrid = new _ol_tilegrid_TileGrid_({
|
||||
options.tileGrid = new TileGrid({
|
||||
tileSize: [640, 320],
|
||||
resolutions: [1.40625, 0.703125, 0.3515625, 0.17578125],
|
||||
origin: [-180, -90]
|
||||
|
||||
@@ -7,7 +7,7 @@ import _ol_layer_VectorTile_ from '../../../../src/ol/layer/VectorTile.js';
|
||||
import {get as getProjection} from '../../../../src/ol/proj.js';
|
||||
import _ol_source_VectorTile_ from '../../../../src/ol/source/VectorTile.js';
|
||||
import _ol_tilegrid_ from '../../../../src/ol/tilegrid.js';
|
||||
import _ol_tilegrid_TileGrid_ from '../../../../src/ol/tilegrid/TileGrid.js';
|
||||
import TileGrid from '../../../../src/ol/tilegrid/TileGrid.js';
|
||||
|
||||
describe('ol.source.VectorTile', function() {
|
||||
|
||||
@@ -97,7 +97,7 @@ describe('ol.source.VectorTile', function() {
|
||||
var extent = [665584.2026596286, 7033250.839875697, 667162.0221431496, 7035280.378636755];
|
||||
|
||||
source = new _ol_source_VectorTile_({
|
||||
tileGrid: new _ol_tilegrid_TileGrid_({
|
||||
tileGrid: new TileGrid({
|
||||
origin: [218128, 6126002],
|
||||
resolutions: [4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1, 0.5]
|
||||
}),
|
||||
|
||||
@@ -2,7 +2,7 @@ import {DEFAULT_TILE_SIZE} from '../../../../src/ol/tilegrid/common.js';
|
||||
import _ol_events_ from '../../../../src/ol/events.js';
|
||||
import _ol_proj_Projection_ from '../../../../src/ol/proj/Projection.js';
|
||||
import _ol_source_Zoomify_ from '../../../../src/ol/source/Zoomify.js';
|
||||
import _ol_tilegrid_TileGrid_ from '../../../../src/ol/tilegrid/TileGrid.js';
|
||||
import TileGrid from '../../../../src/ol/tilegrid/TileGrid.js';
|
||||
|
||||
|
||||
describe('ol.source.Zoomify', function() {
|
||||
@@ -125,7 +125,7 @@ describe('ol.source.Zoomify', function() {
|
||||
var sources = [getZoomifySource(), getIIPSource()];
|
||||
for (var i = 0; i < sources.length; i++) {
|
||||
var tileGrid = sources[i].getTileGrid();
|
||||
expect(tileGrid).to.be.a(_ol_tilegrid_TileGrid_);
|
||||
expect(tileGrid).to.be.a(TileGrid);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import _ol_tilecoord_ from '../../../src/ol/tilecoord.js';
|
||||
import _ol_tilegrid_TileGrid_ from '../../../src/ol/tilegrid/TileGrid.js';
|
||||
import TileGrid from '../../../src/ol/tilegrid/TileGrid.js';
|
||||
|
||||
|
||||
describe('ol.TileCoord', function() {
|
||||
@@ -50,7 +50,7 @@ describe('ol.TileCoord', function() {
|
||||
describe('withinExtentAndZ', function() {
|
||||
|
||||
it('restricts by z', function() {
|
||||
var tileGrid = new _ol_tilegrid_TileGrid_({
|
||||
var tileGrid = new TileGrid({
|
||||
extent: [10, 20, 30, 40],
|
||||
tileSize: 10,
|
||||
resolutions: [2, 1],
|
||||
@@ -62,7 +62,7 @@ describe('ol.TileCoord', function() {
|
||||
});
|
||||
|
||||
it('restricts by extent when extent defines tile ranges', function() {
|
||||
var tileGrid = new _ol_tilegrid_TileGrid_({
|
||||
var tileGrid = new TileGrid({
|
||||
extent: [10, 20, 30, 40],
|
||||
sizes: [[3, -3]],
|
||||
tileSize: 10,
|
||||
@@ -74,7 +74,7 @@ describe('ol.TileCoord', function() {
|
||||
});
|
||||
|
||||
it('restricts by extent when sizes define tile ranges', function() {
|
||||
var tileGrid = new _ol_tilegrid_TileGrid_({
|
||||
var tileGrid = new TileGrid({
|
||||
origin: [10, 20],
|
||||
sizes: [[3, 3]],
|
||||
tileSize: 10,
|
||||
@@ -89,7 +89,7 @@ describe('ol.TileCoord', function() {
|
||||
});
|
||||
|
||||
it('restricts by extent when sizes (neg y) define tile ranges', function() {
|
||||
var tileGrid = new _ol_tilegrid_TileGrid_({
|
||||
var tileGrid = new TileGrid({
|
||||
origin: [10, 40],
|
||||
sizes: [[3, -3]],
|
||||
tileSize: 10,
|
||||
@@ -104,7 +104,7 @@ describe('ol.TileCoord', function() {
|
||||
});
|
||||
|
||||
it('does not restrict by extent with no extent or sizes', function() {
|
||||
var tileGrid = new _ol_tilegrid_TileGrid_({
|
||||
var tileGrid = new TileGrid({
|
||||
origin: [10, 20],
|
||||
tileSize: 10,
|
||||
resolutions: [1]
|
||||
|
||||
@@ -5,7 +5,7 @@ import {get as getProjection, METERS_PER_UNIT} from '../../../../src/ol/proj.js'
|
||||
import _ol_proj_EPSG3857_ from '../../../../src/ol/proj/EPSG3857.js';
|
||||
import _ol_proj_Projection_ from '../../../../src/ol/proj/Projection.js';
|
||||
import _ol_tilegrid_ from '../../../../src/ol/tilegrid.js';
|
||||
import _ol_tilegrid_TileGrid_ from '../../../../src/ol/tilegrid/TileGrid.js';
|
||||
import TileGrid from '../../../../src/ol/tilegrid/TileGrid.js';
|
||||
|
||||
|
||||
describe('ol.tilegrid.TileGrid', function() {
|
||||
@@ -22,7 +22,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
describe('create valid', function() {
|
||||
it('does not throw an exception', function() {
|
||||
expect(function() {
|
||||
return new _ol_tilegrid_TileGrid_({
|
||||
return new TileGrid({
|
||||
resolutions: resolutions,
|
||||
origin: origin,
|
||||
tileSize: tileSize
|
||||
@@ -34,7 +34,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
describe('create with duplicate resolutions', function() {
|
||||
it('throws an exception', function() {
|
||||
expect(function() {
|
||||
return new _ol_tilegrid_TileGrid_({
|
||||
return new TileGrid({
|
||||
resolutions: [100, 50, 50, 25, 10],
|
||||
origin: origin,
|
||||
tileSize: tileSize
|
||||
@@ -47,7 +47,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
it('throws an exception', function() {
|
||||
var resolutions = [100, 25, 50, 10];
|
||||
expect(function() {
|
||||
return new _ol_tilegrid_TileGrid_({
|
||||
return new TileGrid({
|
||||
resolutions: resolutions,
|
||||
origin: origin,
|
||||
tileSize: tileSize
|
||||
@@ -59,7 +59,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
describe('create with multiple origins', function() {
|
||||
it('does not throw an exception', function() {
|
||||
expect(function() {
|
||||
return new _ol_tilegrid_TileGrid_({
|
||||
return new TileGrid({
|
||||
resolutions: [100, 50, 25, 10],
|
||||
origins: [origin, origin, origin, origin],
|
||||
tileSize: tileSize
|
||||
@@ -71,7 +71,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
describe('create with both origin and multiple origins', function() {
|
||||
it('throws an exception', function() {
|
||||
expect(function() {
|
||||
return new _ol_tilegrid_TileGrid_({
|
||||
return new TileGrid({
|
||||
resolutions: [100, 50, 25, 10],
|
||||
origins: [origin, origin, origin, origin],
|
||||
origin: origin,
|
||||
@@ -84,7 +84,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
describe('create with too few origins', function() {
|
||||
it('throws an exception', function() {
|
||||
expect(function() {
|
||||
return new _ol_tilegrid_TileGrid_({
|
||||
return new TileGrid({
|
||||
resolutions: [100, 50, 25, 10],
|
||||
origins: [origin, origin, origin],
|
||||
tileSize: tileSize
|
||||
@@ -96,7 +96,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
describe('create with too many origins', function() {
|
||||
it('throws an exception', function() {
|
||||
expect(function() {
|
||||
return new _ol_tilegrid_TileGrid_({
|
||||
return new TileGrid({
|
||||
resolutions: [100, 50, 25, 10],
|
||||
origins: [origin, origin, origin, origin, origin],
|
||||
tileSize: tileSize
|
||||
@@ -108,7 +108,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
describe('create with multiple tileSizes', function() {
|
||||
it('does not throw an exception', function() {
|
||||
expect(function() {
|
||||
return new _ol_tilegrid_TileGrid_({
|
||||
return new TileGrid({
|
||||
resolutions: [100, 50, 25, 10],
|
||||
tileSizes: [tileSize, tileSize, tileSize, tileSize],
|
||||
origin: origin
|
||||
@@ -120,7 +120,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
describe('create with both tileSize and multiple tileSizes', function() {
|
||||
it('throws an exception', function() {
|
||||
expect(function() {
|
||||
return new _ol_tilegrid_TileGrid_({
|
||||
return new TileGrid({
|
||||
resolutions: [100, 50, 25, 10],
|
||||
tileSizes: [tileSize, tileSize, tileSize, tileSize],
|
||||
tileSize: tileSize,
|
||||
@@ -133,7 +133,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
describe('create with too few tileSizes', function() {
|
||||
it('throws an exception', function() {
|
||||
expect(function() {
|
||||
return new _ol_tilegrid_TileGrid_({
|
||||
return new TileGrid({
|
||||
resolutions: [100, 50, 25, 10],
|
||||
tileSizes: [tileSize, tileSize, tileSize],
|
||||
origin: origin
|
||||
@@ -145,7 +145,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
describe('create with too many tileSizes', function() {
|
||||
it('throws an exception', function() {
|
||||
expect(function() {
|
||||
return new _ol_tilegrid_TileGrid_({
|
||||
return new TileGrid({
|
||||
resolutions: [100, 50, 25, 10],
|
||||
tileSizes: [tileSize, tileSize, tileSize, tileSize, tileSize],
|
||||
origin: origin
|
||||
@@ -157,7 +157,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
describe('create with origin', function() {
|
||||
var tileGrid;
|
||||
beforeEach(function() {
|
||||
tileGrid = new _ol_tilegrid_TileGrid_({
|
||||
tileGrid = new TileGrid({
|
||||
origin: [10, 20],
|
||||
tileSize: 10,
|
||||
resolutions: [1]
|
||||
@@ -180,7 +180,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
describe('create with extent', function() {
|
||||
var tileGrid;
|
||||
beforeEach(function() {
|
||||
tileGrid = new _ol_tilegrid_TileGrid_({
|
||||
tileGrid = new TileGrid({
|
||||
extent: [10, 20, 30, 40],
|
||||
tileSize: 10,
|
||||
resolutions: [1]
|
||||
@@ -203,7 +203,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
describe('create with extent and sizes', function() {
|
||||
var tileGrid;
|
||||
beforeEach(function() {
|
||||
tileGrid = new _ol_tilegrid_TileGrid_({
|
||||
tileGrid = new TileGrid({
|
||||
extent: [10, 20, 30, 40],
|
||||
sizes: [[3, -3]],
|
||||
tileSize: 10,
|
||||
@@ -227,7 +227,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
describe('create with top-left origin and sizes', function() {
|
||||
var tileGrid;
|
||||
beforeEach(function() {
|
||||
tileGrid = new _ol_tilegrid_TileGrid_({
|
||||
tileGrid = new TileGrid({
|
||||
origin: [10, 40],
|
||||
sizes: [[3, -3]],
|
||||
tileSize: 10,
|
||||
@@ -245,7 +245,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
describe('create with bottom-left origin and sizes', function() {
|
||||
var tileGrid;
|
||||
beforeEach(function() {
|
||||
tileGrid = new _ol_tilegrid_TileGrid_({
|
||||
tileGrid = new TileGrid({
|
||||
origin: [10, 10],
|
||||
sizes: [[3, 3]],
|
||||
tileSize: 10,
|
||||
@@ -262,7 +262,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
|
||||
describe('create with extent and origin', function() {
|
||||
it('uses both origin and extent', function() {
|
||||
var tileGrid = new _ol_tilegrid_TileGrid_({
|
||||
var tileGrid = new TileGrid({
|
||||
origin: [0, 0],
|
||||
extent: [10, 20, 30, 40],
|
||||
tileSize: 10,
|
||||
@@ -277,7 +277,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
it('allows creation of tile grid from extent', function() {
|
||||
var extent = _ol_extent_.createOrUpdate(-100, -100, 100, 100);
|
||||
var grid = _ol_tilegrid_.createForExtent(extent);
|
||||
expect(grid).to.be.a(_ol_tilegrid_TileGrid_);
|
||||
expect(grid).to.be.a(TileGrid);
|
||||
|
||||
var resolutions = grid.getResolutions();
|
||||
expect(resolutions.length).to.be(DEFAULT_MAX_ZOOM + 1);
|
||||
@@ -287,7 +287,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
|
||||
describe('#zoomFactor_', function() {
|
||||
it('is set for a consistent zoom factor', function() {
|
||||
var grid = new _ol_tilegrid_TileGrid_({
|
||||
var grid = new TileGrid({
|
||||
resolutions: [10, 5, 2.5, 1.25],
|
||||
origin: origin,
|
||||
tileSize: tileSize
|
||||
@@ -296,7 +296,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
});
|
||||
|
||||
it('is not set for an inconsistent zoom factor', function() {
|
||||
var grid = new _ol_tilegrid_TileGrid_({
|
||||
var grid = new TileGrid({
|
||||
resolutions: [10, 5, 3, 1.25],
|
||||
origin: origin,
|
||||
tileSize: tileSize
|
||||
@@ -310,7 +310,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
it('allows easier creation of a tile grid', function() {
|
||||
var projection = getProjection('EPSG:3857');
|
||||
var grid = _ol_tilegrid_.createForProjection(projection);
|
||||
expect(grid).to.be.a(_ol_tilegrid_TileGrid_);
|
||||
expect(grid).to.be.a(TileGrid);
|
||||
|
||||
var resolutions = grid.getResolutions();
|
||||
expect(resolutions.length).to.be(DEFAULT_MAX_ZOOM + 1);
|
||||
@@ -319,7 +319,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
it('accepts a number of zoom levels', function() {
|
||||
var projection = getProjection('EPSG:3857');
|
||||
var grid = _ol_tilegrid_.createForProjection(projection, 18);
|
||||
expect(grid).to.be.a(_ol_tilegrid_TileGrid_);
|
||||
expect(grid).to.be.a(TileGrid);
|
||||
|
||||
var resolutions = grid.getResolutions();
|
||||
expect(resolutions.length).to.be(19);
|
||||
@@ -328,7 +328,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
it('accepts a big number of zoom levels', function() {
|
||||
var projection = getProjection('EPSG:3857');
|
||||
var grid = _ol_tilegrid_.createForProjection(projection, 23);
|
||||
expect(grid).to.be.a(_ol_tilegrid_TileGrid_);
|
||||
expect(grid).to.be.a(TileGrid);
|
||||
|
||||
var resolutions = grid.getResolutions();
|
||||
expect(resolutions.length).to.be(24);
|
||||
@@ -421,7 +421,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
it('gets the default tile grid for a projection', function() {
|
||||
var projection = getProjection('EPSG:3857');
|
||||
var grid = _ol_tilegrid_.getForProjection(projection);
|
||||
expect(grid).to.be.a(_ol_tilegrid_TileGrid_);
|
||||
expect(grid).to.be.a(TileGrid);
|
||||
|
||||
var resolutions = grid.getResolutions();
|
||||
expect(resolutions.length).to.be(DEFAULT_MAX_ZOOM + 1);
|
||||
@@ -586,7 +586,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
describe('Y North, X East', function() {
|
||||
it('returns the expected TileCoord', function() {
|
||||
origin = [0, 0];
|
||||
var tileGrid = new _ol_tilegrid_TileGrid_({
|
||||
var tileGrid = new TileGrid({
|
||||
resolutions: resolutions,
|
||||
origin: origin,
|
||||
tileSize: tileSize
|
||||
@@ -618,7 +618,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
describe('Y South, X East', function() {
|
||||
it('returns the expected TileCoord', function() {
|
||||
origin = [0, 100000];
|
||||
var tileGrid = new _ol_tilegrid_TileGrid_({
|
||||
var tileGrid = new TileGrid({
|
||||
resolutions: resolutions,
|
||||
origin: origin,
|
||||
tileSize: tileSize
|
||||
@@ -651,7 +651,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
describe('getTileCoordForCoordAndResolution', function() {
|
||||
it('returns the expected TileCoord', function() {
|
||||
var tileSize = 256;
|
||||
var tileGrid = new _ol_tilegrid_TileGrid_({
|
||||
var tileGrid = new TileGrid({
|
||||
resolutions: [10],
|
||||
origin: origin,
|
||||
tileSize: tileSize
|
||||
@@ -728,7 +728,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
|
||||
describe('getTileCoordForXYAndResolution_', function() {
|
||||
it('returns higher tile coord for intersections by default', function() {
|
||||
var tileGrid = new _ol_tilegrid_TileGrid_({
|
||||
var tileGrid = new TileGrid({
|
||||
resolutions: resolutions,
|
||||
origin: origin,
|
||||
tileSize: tileSize
|
||||
@@ -753,7 +753,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
});
|
||||
|
||||
it('handles alt intersection policy', function() {
|
||||
var tileGrid = new _ol_tilegrid_TileGrid_({
|
||||
var tileGrid = new TileGrid({
|
||||
resolutions: resolutions,
|
||||
origin: origin,
|
||||
tileSize: tileSize
|
||||
@@ -781,7 +781,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
|
||||
describe('getTileCoordCenter', function() {
|
||||
it('returns the expected center', function() {
|
||||
var tileGrid = new _ol_tilegrid_TileGrid_({
|
||||
var tileGrid = new TileGrid({
|
||||
resolutions: resolutions,
|
||||
origin: origin,
|
||||
tileSize: tileSize
|
||||
@@ -804,7 +804,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
|
||||
describe('getTileCoordExtent', function() {
|
||||
it('returns the expected extend', function() {
|
||||
var tileGrid = new _ol_tilegrid_TileGrid_({
|
||||
var tileGrid = new TileGrid({
|
||||
resolutions: resolutions,
|
||||
origin: origin,
|
||||
tileSize: tileSize
|
||||
@@ -833,7 +833,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
|
||||
describe('getTileRangeForExtentAndZ', function() {
|
||||
it('returns the expected TileRange', function() {
|
||||
var tileGrid = new _ol_tilegrid_TileGrid_({
|
||||
var tileGrid = new TileGrid({
|
||||
resolutions: resolutions,
|
||||
origin: origin,
|
||||
tileSize: tileSize
|
||||
@@ -873,7 +873,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
var origin = [0, 0];
|
||||
|
||||
it('works with one tile size as number', function() {
|
||||
var tileGrid = new _ol_tilegrid_TileGrid_({
|
||||
var tileGrid = new TileGrid({
|
||||
tileSize: 256,
|
||||
resolutions: resolutions,
|
||||
origin: origin
|
||||
@@ -883,7 +883,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
});
|
||||
|
||||
it('works with one tile size as array', function() {
|
||||
var tileGrid = new _ol_tilegrid_TileGrid_({
|
||||
var tileGrid = new TileGrid({
|
||||
tileSize: [512, 256],
|
||||
resolutions: resolutions,
|
||||
origin: origin
|
||||
@@ -893,7 +893,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
});
|
||||
|
||||
it('works with multiple tile sizes as number', function() {
|
||||
var tileGrid = new _ol_tilegrid_TileGrid_({
|
||||
var tileGrid = new TileGrid({
|
||||
tileSizes: [256, 256, 256, 512],
|
||||
resolutions: resolutions,
|
||||
origin: origin
|
||||
@@ -903,7 +903,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
});
|
||||
|
||||
it('works with multiple tile sizes as array', function() {
|
||||
var tileGrid = new _ol_tilegrid_TileGrid_({
|
||||
var tileGrid = new TileGrid({
|
||||
tileSizes: [[512, 256], [512, 256], [512, 256], [640, 320]],
|
||||
resolutions: resolutions,
|
||||
origin: origin
|
||||
@@ -932,7 +932,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
|
||||
describe('forEachTileCoordParentTileRange', function() {
|
||||
it('iterates as expected', function() {
|
||||
var tileGrid = new _ol_tilegrid_TileGrid_({
|
||||
var tileGrid = new TileGrid({
|
||||
resolutions: resolutions,
|
||||
origin: origin,
|
||||
tileSize: tileSize
|
||||
@@ -972,7 +972,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
|
||||
describe('getZForResolution (exact)', function() {
|
||||
it('returns the expected z value', function() {
|
||||
var tileGrid = new _ol_tilegrid_TileGrid_({
|
||||
var tileGrid = new TileGrid({
|
||||
resolutions: resolutions,
|
||||
origin: origin,
|
||||
tileSize: tileSize
|
||||
@@ -987,7 +987,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
|
||||
describe('getZForResolution (approximate)', function() {
|
||||
it('returns the expected z value', function() {
|
||||
var tileGrid = new _ol_tilegrid_TileGrid_({
|
||||
var tileGrid = new TileGrid({
|
||||
resolutions: resolutions,
|
||||
origin: origin,
|
||||
tileSize: tileSize
|
||||
@@ -1011,7 +1011,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
|
||||
describe('getZForResolution (lower)', function() {
|
||||
it('returns the expected z value', function() {
|
||||
var tileGrid = new _ol_tilegrid_TileGrid_({
|
||||
var tileGrid = new TileGrid({
|
||||
resolutions: resolutions,
|
||||
origin: origin,
|
||||
tileSize: tileSize
|
||||
@@ -1035,7 +1035,7 @@ describe('ol.tilegrid.TileGrid', function() {
|
||||
|
||||
describe('getZForResolution (higher)', function() {
|
||||
it('returns the expected z value', function() {
|
||||
var tileGrid = new _ol_tilegrid_TileGrid_({
|
||||
var tileGrid = new TileGrid({
|
||||
resolutions: resolutions,
|
||||
origin: origin,
|
||||
tileSize: tileSize
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {expandUrl, createFromTemplate, createFromTemplates, createFromTileUrlFunctions} from '../../../src/ol/tileurlfunction.js';
|
||||
import _ol_tilecoord_ from '../../../src/ol/tilecoord.js';
|
||||
import _ol_tilegrid_ from '../../../src/ol/tilegrid.js';
|
||||
import _ol_tilegrid_TileGrid_ from '../../../src/ol/tilegrid/TileGrid.js';
|
||||
import TileGrid from '../../../src/ol/tilegrid/TileGrid.js';
|
||||
|
||||
describe('ol.TileUrlFunction', function() {
|
||||
|
||||
@@ -60,7 +60,7 @@ describe('ol.TileUrlFunction', function() {
|
||||
expect(tileUrl([3, 2, -3])).to.eql('3/2/5');
|
||||
});
|
||||
it('returns correct value for {-y} with custom tile grids', function() {
|
||||
var customTileGrid = new _ol_tilegrid_TileGrid_({
|
||||
var customTileGrid = new TileGrid({
|
||||
extent: [-180, -90, 180, 90],
|
||||
origin: [-180, -90],
|
||||
resolutions: [360 / 256, 360 / 512, 360 / 1024, 360 / 2048]
|
||||
|
||||
@@ -5,7 +5,7 @@ import _ol_events_ from '../../../src/ol/events.js';
|
||||
import GeoJSON from '../../../src/ol/format/GeoJSON.js';
|
||||
import {get as getProjection} from '../../../src/ol/proj.js';
|
||||
import _ol_tilegrid_ from '../../../src/ol/tilegrid.js';
|
||||
import _ol_tilegrid_TileGrid_ from '../../../src/ol/tilegrid/TileGrid.js';
|
||||
import TileGrid from '../../../src/ol/tilegrid/TileGrid.js';
|
||||
|
||||
|
||||
describe('ol.VectorImageTile', function() {
|
||||
@@ -94,7 +94,7 @@ describe('ol.VectorImageTile', function() {
|
||||
it('only loads tiles within the source tileGrid\'s extent', function() {
|
||||
var format = new GeoJSON();
|
||||
var url = 'spec/ol/data/point.json';
|
||||
var tileGrid = new _ol_tilegrid_TileGrid_({
|
||||
var tileGrid = new TileGrid({
|
||||
resolutions: [0.02197265625, 0.010986328125, 0.0054931640625],
|
||||
origin: [-180, 90],
|
||||
extent: [-88, 35, -87, 36]
|
||||
|
||||
Reference in New Issue
Block a user