Rename _ol_VectorTile_ to VectorTile
This commit is contained in:
@@ -4,7 +4,7 @@ import _ol_Feature_ from '../../../../../src/ol/Feature.js';
|
||||
import Map from '../../../../../src/ol/Map.js';
|
||||
import TileState from '../../../../../src/ol/TileState.js';
|
||||
import VectorImageTile from '../../../../../src/ol/VectorImageTile.js';
|
||||
import _ol_VectorTile_ from '../../../../../src/ol/VectorTile.js';
|
||||
import VectorTile from '../../../../../src/ol/VectorTile.js';
|
||||
import _ol_View_ from '../../../../../src/ol/View.js';
|
||||
import * as _ol_extent_ from '../../../../../src/ol/extent.js';
|
||||
import MVT from '../../../../../src/ol/format/MVT.js';
|
||||
@@ -60,13 +60,13 @@ describe('ol.renderer.canvas.VectorTileLayer', function() {
|
||||
feature3 = new _ol_render_Feature_('Point', [1, -1], []);
|
||||
feature2.setStyle(featureStyle);
|
||||
var TileClass = function() {
|
||||
_ol_VectorTile_.apply(this, arguments);
|
||||
VectorTile.apply(this, arguments);
|
||||
this.setState('loaded');
|
||||
this.setFeatures([feature1, feature2, feature3]);
|
||||
this.setProjection(getProjection('EPSG:4326'));
|
||||
tileCallback(this);
|
||||
};
|
||||
inherits(TileClass, _ol_VectorTile_);
|
||||
inherits(TileClass, VectorTile);
|
||||
source = new _ol_source_VectorTile_({
|
||||
format: new MVT(),
|
||||
tileClass: TileClass,
|
||||
@@ -224,9 +224,9 @@ describe('ol.renderer.canvas.VectorTileLayer', function() {
|
||||
});
|
||||
map.addLayer(layer2);
|
||||
|
||||
var spy1 = sinon.spy(_ol_VectorTile_.prototype,
|
||||
var spy1 = sinon.spy(VectorTile.prototype,
|
||||
'getReplayGroup');
|
||||
var spy2 = sinon.spy(_ol_VectorTile_.prototype,
|
||||
var spy2 = sinon.spy(VectorTile.prototype,
|
||||
'setReplayGroup');
|
||||
map.renderSync();
|
||||
expect(spy1.callCount).to.be(4);
|
||||
@@ -245,7 +245,7 @@ describe('ol.renderer.canvas.VectorTileLayer', function() {
|
||||
transition: 0
|
||||
})
|
||||
});
|
||||
var sourceTile = new _ol_VectorTile_([0, 0, 0], 2);
|
||||
var sourceTile = new VectorTile([0, 0, 0], 2);
|
||||
sourceTile.setProjection(getProjection('EPSG:3857'));
|
||||
sourceTile.features_ = [];
|
||||
sourceTile.getImage = function() {
|
||||
@@ -293,7 +293,7 @@ describe('ol.renderer.canvas.VectorTileLayer', function() {
|
||||
var TileClass = function() {
|
||||
VectorImageTile.apply(this, arguments);
|
||||
this.setState('loaded');
|
||||
var sourceTile = new _ol_VectorTile_([0, 0, 0]);
|
||||
var sourceTile = new VectorTile([0, 0, 0]);
|
||||
sourceTile.setProjection(getProjection('EPSG:3857'));
|
||||
sourceTile.getReplayGroup = function() {
|
||||
return replayGroup;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import VectorImageTile from '../../../../src/ol/VectorImageTile.js';
|
||||
import _ol_VectorTile_ from '../../../../src/ol/VectorTile.js';
|
||||
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';
|
||||
@@ -25,7 +25,7 @@ describe('ol.source.VectorTile', function() {
|
||||
});
|
||||
|
||||
it('uses ol.VectorTile as default tileClass', function() {
|
||||
expect(source.tileClass).to.equal(_ol_VectorTile_);
|
||||
expect(source.tileClass).to.equal(VectorTile);
|
||||
});
|
||||
|
||||
it('creates a 512 XYZ tilegrid by default', function() {
|
||||
@@ -65,7 +65,7 @@ describe('ol.source.VectorTile', function() {
|
||||
});
|
||||
source.on('tileloadend', function(e) {
|
||||
expect(started).to.be(true);
|
||||
expect(e.tile).to.be.a(_ol_VectorTile_);
|
||||
expect(e.tile).to.be.a(VectorTile);
|
||||
expect(e.tile.getFeatures().length).to.be(1327);
|
||||
done();
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import TileState from '../../../src/ol/TileState.js';
|
||||
import VectorImageTile from '../../../src/ol/VectorImageTile.js';
|
||||
import _ol_VectorTile_ from '../../../src/ol/VectorTile.js';
|
||||
import VectorTile from '../../../src/ol/VectorTile.js';
|
||||
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';
|
||||
@@ -17,7 +17,7 @@ describe('ol.VectorImageTile', function() {
|
||||
VectorImageTile.defaultLoadFunction, [0, 0, -1], function() {
|
||||
return url;
|
||||
}, _ol_tilegrid_.createXYZ(), _ol_tilegrid_.createXYZ(), {},
|
||||
1, getProjection('EPSG:3857'), _ol_VectorTile_, function() {});
|
||||
1, getProjection('EPSG:3857'), VectorTile, function() {});
|
||||
|
||||
tile.load();
|
||||
var sourceTile = tile.getTile(tile.tileKeys[0]);
|
||||
@@ -41,7 +41,7 @@ describe('ol.VectorImageTile', function() {
|
||||
}, [0, 0, -1], function() {
|
||||
return url;
|
||||
}, _ol_tilegrid_.createXYZ(), _ol_tilegrid_.createXYZ(), {},
|
||||
1, getProjection('EPSG:3857'), _ol_VectorTile_, function() {});
|
||||
1, getProjection('EPSG:3857'), VectorTile, function() {});
|
||||
|
||||
tile.load();
|
||||
var calls = 0;
|
||||
@@ -65,7 +65,7 @@ describe('ol.VectorImageTile', function() {
|
||||
VectorImageTile.defaultLoadFunction, [0, 0, -1], function() {
|
||||
return url;
|
||||
}, _ol_tilegrid_.createXYZ(), _ol_tilegrid_.createXYZ(), {},
|
||||
1, getProjection('EPSG:3857'), _ol_VectorTile_, function() {});
|
||||
1, getProjection('EPSG:3857'), VectorTile, function() {});
|
||||
|
||||
tile.load();
|
||||
|
||||
@@ -81,7 +81,7 @@ describe('ol.VectorImageTile', function() {
|
||||
var tile = new VectorImageTile([0, 0, -1], 0, url, format,
|
||||
VectorImageTile.defaultLoadFunction, [0, 0, -1], function() {},
|
||||
_ol_tilegrid_.createXYZ(), _ol_tilegrid_.createXYZ(), {},
|
||||
1, getProjection('EPSG:3857'), _ol_VectorTile_, function() {});
|
||||
1, getProjection('EPSG:3857'), VectorTile, function() {});
|
||||
|
||||
tile.load();
|
||||
|
||||
@@ -105,7 +105,7 @@ describe('ol.VectorImageTile', function() {
|
||||
return url;
|
||||
}, tileGrid,
|
||||
_ol_tilegrid_.createXYZ({extent: [-180, -90, 180, 90], tileSize: 512}),
|
||||
sourceTiles, 1, getProjection('EPSG:4326'), _ol_VectorTile_, function() {});
|
||||
sourceTiles, 1, getProjection('EPSG:4326'), VectorTile, function() {});
|
||||
tile.load();
|
||||
expect(tile.tileKeys.length).to.be(1);
|
||||
expect(tile.getTile(tile.tileKeys[0]).tileCoord).to.eql([0, 16, -10]);
|
||||
@@ -118,7 +118,7 @@ describe('ol.VectorImageTile', function() {
|
||||
VectorImageTile.defaultLoadFunction, [0, 0, -1], function() {
|
||||
return url;
|
||||
}, _ol_tilegrid_.createXYZ(), _ol_tilegrid_.createXYZ({tileSize: 512}), {},
|
||||
1, getProjection('EPSG:3857'), _ol_VectorTile_, function() {});
|
||||
1, getProjection('EPSG:3857'), VectorTile, function() {});
|
||||
|
||||
tile.load();
|
||||
expect(tile.loadListenerKeys_.length).to.be(4);
|
||||
@@ -138,7 +138,7 @@ describe('ol.VectorImageTile', function() {
|
||||
VectorImageTile.defaultLoadFunction, [0, 0, -1], function() {
|
||||
return url;
|
||||
}, _ol_tilegrid_.createXYZ(), _ol_tilegrid_.createXYZ({tileSize: 512}), {},
|
||||
1, getProjection('EPSG:3857'), _ol_VectorTile_, function() {});
|
||||
1, getProjection('EPSG:3857'), VectorTile, function() {});
|
||||
|
||||
tile.load();
|
||||
_ol_events_.listenOnce(tile, 'change', function() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import _ol_Feature_ from '../../../src/ol/Feature.js';
|
||||
import VectorImageTile from '../../../src/ol/VectorImageTile.js';
|
||||
import _ol_VectorTile_ from '../../../src/ol/VectorTile.js';
|
||||
import VectorTile from '../../../src/ol/VectorTile.js';
|
||||
import _ol_events_ from '../../../src/ol/events.js';
|
||||
import TextFeature from '../../../src/ol/format/TextFeature.js';
|
||||
import {get as getProjection} from '../../../src/ol/proj.js';
|
||||
@@ -22,7 +22,7 @@ describe('ol.VectorTile', function() {
|
||||
return [new _ol_Feature_()];
|
||||
};
|
||||
|
||||
var tile = new _ol_VectorTile_([0, 0, 0], null, null, format);
|
||||
var tile = new VectorTile([0, 0, 0], null, null, format);
|
||||
var url = 'spec/ol/data/point.json';
|
||||
|
||||
VectorImageTile.defaultLoadFunction(tile, url);
|
||||
|
||||
Reference in New Issue
Block a user