Rename _ol_source_VectorTile_ to VectorTileSource
This commit is contained in:
@@ -7,7 +7,7 @@ import VectorLayer from '../../../../src/ol/layer/Vector.js';
|
||||
import _ol_layer_VectorTile_ from '../../../../src/ol/layer/VectorTile.js';
|
||||
import _ol_obj_ from '../../../../src/ol/obj.js';
|
||||
import VectorSource from '../../../../src/ol/source/Vector.js';
|
||||
import _ol_source_VectorTile_ from '../../../../src/ol/source/VectorTile.js';
|
||||
import VectorTileSource from '../../../../src/ol/source/VectorTile.js';
|
||||
import _ol_style_Circle_ from '../../../../src/ol/style/Circle.js';
|
||||
import _ol_style_Fill_ from '../../../../src/ol/style/Fill.js';
|
||||
import _ol_style_Style_ from '../../../../src/ol/style/Style.js';
|
||||
@@ -69,7 +69,7 @@ describe('ol.rendering.layer.VectorTile', function() {
|
||||
var source;
|
||||
|
||||
beforeEach(function() {
|
||||
source = new _ol_source_VectorTile_({
|
||||
source = new VectorTileSource({
|
||||
format: new MVT(),
|
||||
tileGrid: _ol_tilegrid_.createXYZ(),
|
||||
url: 'rendering/ol/data/tiles/mvt/{z}-{x}-{y}.vector.pbf',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import _ol_layer_VectorTile_ from '../../../../src/ol/layer/VectorTile.js';
|
||||
import _ol_source_VectorTile_ from '../../../../src/ol/source/VectorTile.js';
|
||||
import VectorTileSource from '../../../../src/ol/source/VectorTile.js';
|
||||
|
||||
|
||||
describe('ol.layer.VectorTile', function() {
|
||||
@@ -10,7 +10,7 @@ describe('ol.layer.VectorTile', function() {
|
||||
|
||||
beforeEach(function() {
|
||||
layer = new _ol_layer_VectorTile_({
|
||||
source: new _ol_source_VectorTile_({})
|
||||
source: new VectorTileSource({})
|
||||
});
|
||||
});
|
||||
|
||||
@@ -40,18 +40,18 @@ describe('ol.layer.VectorTile', function() {
|
||||
it('works with options', function() {
|
||||
var layer = new _ol_layer_VectorTile_({
|
||||
renderMode: 'vector',
|
||||
source: new _ol_source_VectorTile_({})
|
||||
source: new VectorTileSource({})
|
||||
});
|
||||
expect(layer.getRenderMode()).to.be('vector');
|
||||
layer = new _ol_layer_VectorTile_({
|
||||
renderMode: 'image',
|
||||
source: new _ol_source_VectorTile_({})
|
||||
source: new VectorTileSource({})
|
||||
});
|
||||
expect(layer.getRenderMode()).to.be('image');
|
||||
expect(function() {
|
||||
layer = new _ol_layer_VectorTile_({
|
||||
renderMode: 'foo',
|
||||
source: new _ol_source_VectorTile_({})
|
||||
source: new VectorTileSource({})
|
||||
});
|
||||
}).to.throwException();
|
||||
});
|
||||
|
||||
@@ -15,7 +15,7 @@ import _ol_proj_Projection_ from '../../../../../src/ol/proj/Projection.js';
|
||||
import _ol_render_canvas_ from '../../../../../src/ol/render/canvas.js';
|
||||
import _ol_render_Feature_ from '../../../../../src/ol/render/Feature.js';
|
||||
import CanvasVectorTileLayerRenderer from '../../../../../src/ol/renderer/canvas/VectorTileLayer.js';
|
||||
import _ol_source_VectorTile_ from '../../../../../src/ol/source/VectorTile.js';
|
||||
import VectorTileSource from '../../../../../src/ol/source/VectorTile.js';
|
||||
import _ol_style_Style_ from '../../../../../src/ol/style/Style.js';
|
||||
import _ol_style_Text_ from '../../../../../src/ol/style/Text.js';
|
||||
import _ol_tilegrid_ from '../../../../../src/ol/tilegrid.js';
|
||||
@@ -67,13 +67,13 @@ describe('ol.renderer.canvas.VectorTileLayer', function() {
|
||||
tileCallback(this);
|
||||
};
|
||||
inherits(TileClass, VectorTile);
|
||||
source = new _ol_source_VectorTile_({
|
||||
source = new VectorTileSource({
|
||||
format: new MVT(),
|
||||
tileClass: TileClass,
|
||||
tileGrid: _ol_tilegrid_.createXYZ()
|
||||
});
|
||||
source.getTile = function() {
|
||||
var tile = _ol_source_VectorTile_.prototype.getTile.apply(source, arguments);
|
||||
var tile = VectorTileSource.prototype.getTile.apply(source, arguments);
|
||||
tile.setState(TileState.LOADED);
|
||||
return tile;
|
||||
};
|
||||
@@ -240,7 +240,7 @@ describe('ol.renderer.canvas.VectorTileLayer', function() {
|
||||
describe('#prepareFrame', function() {
|
||||
it('re-renders when layer changed', function() {
|
||||
var layer = new _ol_layer_VectorTile_({
|
||||
source: new _ol_source_VectorTile_({
|
||||
source: new VectorTileSource({
|
||||
tileGrid: _ol_tilegrid_.createXYZ(),
|
||||
transition: 0
|
||||
})
|
||||
@@ -309,7 +309,7 @@ describe('ol.renderer.canvas.VectorTileLayer', function() {
|
||||
beforeEach(function() {
|
||||
replayGroup = {};
|
||||
layer = new _ol_layer_VectorTile_({
|
||||
source: new _ol_source_VectorTile_({
|
||||
source: new VectorTileSource({
|
||||
tileClass: TileClass,
|
||||
tileGrid: _ol_tilegrid_.createXYZ()
|
||||
})
|
||||
@@ -349,7 +349,7 @@ describe('ol.renderer.canvas.VectorTileLayer', function() {
|
||||
target.style.height = '100px';
|
||||
document.body.appendChild(target);
|
||||
var extent = [1824704.739223726, 6141868.096770482, 1827150.7241288517, 6144314.081675608];
|
||||
var source = new _ol_source_VectorTile_({
|
||||
var source = new VectorTileSource({
|
||||
format: new MVT(),
|
||||
url: 'spec/ol/data/14-8938-5680.vector.pbf',
|
||||
minZoom: 14,
|
||||
|
||||
@@ -5,14 +5,14 @@ import VectorTile from '../../../../src/ol/VectorTile.js';
|
||||
import MVT from '../../../../src/ol/format/MVT.js';
|
||||
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 VectorTileSource from '../../../../src/ol/source/VectorTile.js';
|
||||
import _ol_tilegrid_ from '../../../../src/ol/tilegrid.js';
|
||||
import TileGrid from '../../../../src/ol/tilegrid/TileGrid.js';
|
||||
|
||||
describe('ol.source.VectorTile', function() {
|
||||
|
||||
var format = new MVT();
|
||||
var source = new _ol_source_VectorTile_({
|
||||
var source = new VectorTileSource({
|
||||
format: format,
|
||||
tilePixelRatio: 8,
|
||||
url: 'spec/ol/data/{z}-{x}-{y}.vector.pbf'
|
||||
@@ -96,7 +96,7 @@ describe('ol.source.VectorTile', function() {
|
||||
|
||||
var extent = [665584.2026596286, 7033250.839875697, 667162.0221431496, 7035280.378636755];
|
||||
|
||||
source = new _ol_source_VectorTile_({
|
||||
source = new VectorTileSource({
|
||||
tileGrid: new TileGrid({
|
||||
origin: [218128, 6126002],
|
||||
resolutions: [4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1, 0.5]
|
||||
|
||||
Reference in New Issue
Block a user