Rename _ol_VectorImageTile_ to VectorImageTile
This commit is contained in:
+12
-12
@@ -32,7 +32,7 @@ import {loadFeaturesXhr} from './featureloader.js';
|
|||||||
* Function to call when a source tile's state changes.
|
* Function to call when a source tile's state changes.
|
||||||
* @param {olx.TileOptions=} opt_options Tile options.
|
* @param {olx.TileOptions=} opt_options Tile options.
|
||||||
*/
|
*/
|
||||||
var _ol_VectorImageTile_ = function(tileCoord, state, sourceRevision, format,
|
var VectorImageTile = function(tileCoord, state, sourceRevision, format,
|
||||||
tileLoadFunction, urlTileCoord, tileUrlFunction, sourceTileGrid, tileGrid,
|
tileLoadFunction, urlTileCoord, tileUrlFunction, sourceTileGrid, tileGrid,
|
||||||
sourceTiles, pixelRatio, projection, tileClass, handleTileChange, opt_options) {
|
sourceTiles, pixelRatio, projection, tileClass, handleTileChange, opt_options) {
|
||||||
|
|
||||||
@@ -121,13 +121,13 @@ var _ol_VectorImageTile_ = function(tileCoord, state, sourceRevision, format,
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
inherits(_ol_VectorImageTile_, _ol_Tile_);
|
inherits(VectorImageTile, _ol_Tile_);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
_ol_VectorImageTile_.prototype.disposeInternal = function() {
|
VectorImageTile.prototype.disposeInternal = function() {
|
||||||
this.state = TileState.ABORT;
|
this.state = TileState.ABORT;
|
||||||
this.changed();
|
this.changed();
|
||||||
if (this.interimTile) {
|
if (this.interimTile) {
|
||||||
@@ -157,7 +157,7 @@ _ol_VectorImageTile_.prototype.disposeInternal = function() {
|
|||||||
* @param {ol.layer.Layer} layer Layer.
|
* @param {ol.layer.Layer} layer Layer.
|
||||||
* @return {CanvasRenderingContext2D} The rendering context.
|
* @return {CanvasRenderingContext2D} The rendering context.
|
||||||
*/
|
*/
|
||||||
_ol_VectorImageTile_.prototype.getContext = function(layer) {
|
VectorImageTile.prototype.getContext = function(layer) {
|
||||||
var key = getUid(layer).toString();
|
var key = getUid(layer).toString();
|
||||||
if (!(key in this.context_)) {
|
if (!(key in this.context_)) {
|
||||||
this.context_[key] = createCanvasContext2D();
|
this.context_[key] = createCanvasContext2D();
|
||||||
@@ -171,7 +171,7 @@ _ol_VectorImageTile_.prototype.getContext = function(layer) {
|
|||||||
* @param {ol.layer.Layer} layer Layer.
|
* @param {ol.layer.Layer} layer Layer.
|
||||||
* @return {HTMLCanvasElement} Canvas.
|
* @return {HTMLCanvasElement} Canvas.
|
||||||
*/
|
*/
|
||||||
_ol_VectorImageTile_.prototype.getImage = function(layer) {
|
VectorImageTile.prototype.getImage = function(layer) {
|
||||||
return this.getReplayState(layer).renderedTileRevision == -1 ?
|
return this.getReplayState(layer).renderedTileRevision == -1 ?
|
||||||
null : this.getContext(layer).canvas;
|
null : this.getContext(layer).canvas;
|
||||||
};
|
};
|
||||||
@@ -181,7 +181,7 @@ _ol_VectorImageTile_.prototype.getImage = function(layer) {
|
|||||||
* @param {ol.layer.Layer} layer Layer.
|
* @param {ol.layer.Layer} layer Layer.
|
||||||
* @return {ol.TileReplayState} The replay state.
|
* @return {ol.TileReplayState} The replay state.
|
||||||
*/
|
*/
|
||||||
_ol_VectorImageTile_.prototype.getReplayState = function(layer) {
|
VectorImageTile.prototype.getReplayState = function(layer) {
|
||||||
var key = getUid(layer).toString();
|
var key = getUid(layer).toString();
|
||||||
if (!(key in this.replayState_)) {
|
if (!(key in this.replayState_)) {
|
||||||
this.replayState_[key] = {
|
this.replayState_[key] = {
|
||||||
@@ -198,7 +198,7 @@ _ol_VectorImageTile_.prototype.getReplayState = function(layer) {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
_ol_VectorImageTile_.prototype.getKey = function() {
|
VectorImageTile.prototype.getKey = function() {
|
||||||
return this.tileKeys.join('/') + '-' + this.sourceRevision_;
|
return this.tileKeys.join('/') + '-' + this.sourceRevision_;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -207,7 +207,7 @@ _ol_VectorImageTile_.prototype.getKey = function() {
|
|||||||
* @param {string} tileKey Key (tileCoord) of the source tile.
|
* @param {string} tileKey Key (tileCoord) of the source tile.
|
||||||
* @return {ol.VectorTile} Source tile.
|
* @return {ol.VectorTile} Source tile.
|
||||||
*/
|
*/
|
||||||
_ol_VectorImageTile_.prototype.getTile = function(tileKey) {
|
VectorImageTile.prototype.getTile = function(tileKey) {
|
||||||
return this.sourceTiles_[tileKey];
|
return this.sourceTiles_[tileKey];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -215,7 +215,7 @@ _ol_VectorImageTile_.prototype.getTile = function(tileKey) {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
_ol_VectorImageTile_.prototype.load = function() {
|
VectorImageTile.prototype.load = function() {
|
||||||
// Source tiles with LOADED state - we just count them because once they are
|
// Source tiles with LOADED state - we just count them because once they are
|
||||||
// loaded, we're no longer listening to state changes.
|
// loaded, we're no longer listening to state changes.
|
||||||
var leftToLoad = 0;
|
var leftToLoad = 0;
|
||||||
@@ -264,7 +264,7 @@ _ol_VectorImageTile_.prototype.load = function() {
|
|||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
_ol_VectorImageTile_.prototype.finishLoading_ = function() {
|
VectorImageTile.prototype.finishLoading_ = function() {
|
||||||
var loaded = this.tileKeys.length;
|
var loaded = this.tileKeys.length;
|
||||||
var empty = 0;
|
var empty = 0;
|
||||||
for (var i = loaded - 1; i >= 0; --i) {
|
for (var i = loaded - 1; i >= 0; --i) {
|
||||||
@@ -291,8 +291,8 @@ _ol_VectorImageTile_.prototype.finishLoading_ = function() {
|
|||||||
* @param {ol.VectorTile} tile Vector tile.
|
* @param {ol.VectorTile} tile Vector tile.
|
||||||
* @param {string} url URL.
|
* @param {string} url URL.
|
||||||
*/
|
*/
|
||||||
_ol_VectorImageTile_.defaultLoadFunction = function(tile, url) {
|
VectorImageTile.defaultLoadFunction = function(tile, url) {
|
||||||
var loader = loadFeaturesXhr(url, tile.getFormat(), tile.onLoad.bind(tile), tile.onError.bind(tile));
|
var loader = loadFeaturesXhr(url, tile.getFormat(), tile.onLoad.bind(tile), tile.onError.bind(tile));
|
||||||
tile.setLoader(loader);
|
tile.setLoader(loader);
|
||||||
};
|
};
|
||||||
export default _ol_VectorImageTile_;
|
export default VectorImageTile;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
import {inherits} from '../index.js';
|
import {inherits} from '../index.js';
|
||||||
import TileState from '../TileState.js';
|
import TileState from '../TileState.js';
|
||||||
import _ol_VectorImageTile_ from '../VectorImageTile.js';
|
import VectorImageTile from '../VectorImageTile.js';
|
||||||
import _ol_VectorTile_ from '../VectorTile.js';
|
import _ol_VectorTile_ from '../VectorTile.js';
|
||||||
import _ol_size_ from '../size.js';
|
import _ol_size_ from '../size.js';
|
||||||
import _ol_source_UrlTile_ from '../source/UrlTile.js';
|
import _ol_source_UrlTile_ from '../source/UrlTile.js';
|
||||||
@@ -47,7 +47,7 @@ var _ol_source_VectorTile_ = function(options) {
|
|||||||
state: options.state,
|
state: options.state,
|
||||||
tileGrid: tileGrid,
|
tileGrid: tileGrid,
|
||||||
tileLoadFunction: options.tileLoadFunction ?
|
tileLoadFunction: options.tileLoadFunction ?
|
||||||
options.tileLoadFunction : _ol_VectorImageTile_.defaultLoadFunction,
|
options.tileLoadFunction : VectorImageTile.defaultLoadFunction,
|
||||||
tileUrlFunction: options.tileUrlFunction,
|
tileUrlFunction: options.tileUrlFunction,
|
||||||
url: options.url,
|
url: options.url,
|
||||||
urls: options.urls,
|
urls: options.urls,
|
||||||
@@ -118,7 +118,7 @@ _ol_source_VectorTile_.prototype.getTile = function(z, x, y, pixelRatio, project
|
|||||||
var tileCoord = [z, x, y];
|
var tileCoord = [z, x, y];
|
||||||
var urlTileCoord = this.getTileCoordForTileUrlFunction(
|
var urlTileCoord = this.getTileCoordForTileUrlFunction(
|
||||||
tileCoord, projection);
|
tileCoord, projection);
|
||||||
var tile = new _ol_VectorImageTile_(
|
var tile = new VectorImageTile(
|
||||||
tileCoord,
|
tileCoord,
|
||||||
urlTileCoord !== null ? TileState.IDLE : TileState.EMPTY,
|
urlTileCoord !== null ? TileState.IDLE : TileState.EMPTY,
|
||||||
this.getRevision(),
|
this.getRevision(),
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import _ol_obj_ from '../../../../../src/ol/obj.js';
|
|||||||
import _ol_Feature_ from '../../../../../src/ol/Feature.js';
|
import _ol_Feature_ from '../../../../../src/ol/Feature.js';
|
||||||
import Map from '../../../../../src/ol/Map.js';
|
import Map from '../../../../../src/ol/Map.js';
|
||||||
import TileState from '../../../../../src/ol/TileState.js';
|
import TileState from '../../../../../src/ol/TileState.js';
|
||||||
import _ol_VectorImageTile_ from '../../../../../src/ol/VectorImageTile.js';
|
import VectorImageTile from '../../../../../src/ol/VectorImageTile.js';
|
||||||
import _ol_VectorTile_ from '../../../../../src/ol/VectorTile.js';
|
import _ol_VectorTile_ from '../../../../../src/ol/VectorTile.js';
|
||||||
import _ol_View_ from '../../../../../src/ol/View.js';
|
import _ol_View_ from '../../../../../src/ol/View.js';
|
||||||
import * as _ol_extent_ from '../../../../../src/ol/extent.js';
|
import * as _ol_extent_ from '../../../../../src/ol/extent.js';
|
||||||
@@ -251,7 +251,7 @@ describe('ol.renderer.canvas.VectorTileLayer', function() {
|
|||||||
sourceTile.getImage = function() {
|
sourceTile.getImage = function() {
|
||||||
return document.createElement('canvas');
|
return document.createElement('canvas');
|
||||||
};
|
};
|
||||||
var tile = new _ol_VectorImageTile_([0, 0, 0]);
|
var tile = new VectorImageTile([0, 0, 0]);
|
||||||
tile.transition_ = 0;
|
tile.transition_ = 0;
|
||||||
tile.wrappedTileCoord = [0, 0, 0];
|
tile.wrappedTileCoord = [0, 0, 0];
|
||||||
tile.setState(TileState.LOADED);
|
tile.setState(TileState.LOADED);
|
||||||
@@ -291,7 +291,7 @@ describe('ol.renderer.canvas.VectorTileLayer', function() {
|
|||||||
describe('#forEachFeatureAtCoordinate', function() {
|
describe('#forEachFeatureAtCoordinate', function() {
|
||||||
var layer, renderer, replayGroup;
|
var layer, renderer, replayGroup;
|
||||||
var TileClass = function() {
|
var TileClass = function() {
|
||||||
_ol_VectorImageTile_.apply(this, arguments);
|
VectorImageTile.apply(this, arguments);
|
||||||
this.setState('loaded');
|
this.setState('loaded');
|
||||||
var sourceTile = new _ol_VectorTile_([0, 0, 0]);
|
var sourceTile = new _ol_VectorTile_([0, 0, 0]);
|
||||||
sourceTile.setProjection(getProjection('EPSG:3857'));
|
sourceTile.setProjection(getProjection('EPSG:3857'));
|
||||||
@@ -304,7 +304,7 @@ describe('ol.renderer.canvas.VectorTileLayer', function() {
|
|||||||
this.sourceTiles_[key] = sourceTile;
|
this.sourceTiles_[key] = sourceTile;
|
||||||
this.wrappedTileCoord = arguments[0];
|
this.wrappedTileCoord = arguments[0];
|
||||||
};
|
};
|
||||||
inherits(TileClass, _ol_VectorImageTile_);
|
inherits(TileClass, VectorImageTile);
|
||||||
|
|
||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
replayGroup = {};
|
replayGroup = {};
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import Map from '../../../../src/ol/Map.js';
|
import Map from '../../../../src/ol/Map.js';
|
||||||
import _ol_View_ from '../../../../src/ol/View.js';
|
import _ol_View_ from '../../../../src/ol/View.js';
|
||||||
import _ol_VectorImageTile_ from '../../../../src/ol/VectorImageTile.js';
|
import VectorImageTile from '../../../../src/ol/VectorImageTile.js';
|
||||||
import _ol_VectorTile_ from '../../../../src/ol/VectorTile.js';
|
import _ol_VectorTile_ from '../../../../src/ol/VectorTile.js';
|
||||||
import MVT from '../../../../src/ol/format/MVT.js';
|
import MVT from '../../../../src/ol/format/MVT.js';
|
||||||
import _ol_layer_VectorTile_ from '../../../../src/ol/layer/VectorTile.js';
|
import _ol_layer_VectorTile_ from '../../../../src/ol/layer/VectorTile.js';
|
||||||
@@ -38,7 +38,7 @@ describe('ol.source.VectorTile', function() {
|
|||||||
describe('#getTile()', function() {
|
describe('#getTile()', function() {
|
||||||
it('creates a tile with the correct tile class', function() {
|
it('creates a tile with the correct tile class', function() {
|
||||||
tile = source.getTile(0, 0, 0, 1, getProjection('EPSG:3857'));
|
tile = source.getTile(0, 0, 0, 1, getProjection('EPSG:3857'));
|
||||||
expect(tile).to.be.a(_ol_VectorImageTile_);
|
expect(tile).to.be.a(VectorImageTile);
|
||||||
});
|
});
|
||||||
it('sets the correct tileCoord on the created tile', function() {
|
it('sets the correct tileCoord on the created tile', function() {
|
||||||
expect(tile.getTileCoord()).to.eql([0, 0, 0]);
|
expect(tile.getTileCoord()).to.eql([0, 0, 0]);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import TileState from '../../../src/ol/TileState.js';
|
import TileState from '../../../src/ol/TileState.js';
|
||||||
import _ol_VectorImageTile_ from '../../../src/ol/VectorImageTile.js';
|
import VectorImageTile from '../../../src/ol/VectorImageTile.js';
|
||||||
import _ol_VectorTile_ from '../../../src/ol/VectorTile.js';
|
import _ol_VectorTile_ from '../../../src/ol/VectorTile.js';
|
||||||
import _ol_events_ from '../../../src/ol/events.js';
|
import _ol_events_ from '../../../src/ol/events.js';
|
||||||
import GeoJSON from '../../../src/ol/format/GeoJSON.js';
|
import GeoJSON from '../../../src/ol/format/GeoJSON.js';
|
||||||
@@ -13,8 +13,8 @@ describe('ol.VectorImageTile', function() {
|
|||||||
it('configures loader that sets features on the source tile', function(done) {
|
it('configures loader that sets features on the source tile', function(done) {
|
||||||
var format = new GeoJSON();
|
var format = new GeoJSON();
|
||||||
var url = 'spec/ol/data/point.json';
|
var url = 'spec/ol/data/point.json';
|
||||||
var tile = new _ol_VectorImageTile_([0, 0, -1], 0, url, format,
|
var tile = new VectorImageTile([0, 0, -1], 0, url, format,
|
||||||
_ol_VectorImageTile_.defaultLoadFunction, [0, 0, -1], function() {
|
VectorImageTile.defaultLoadFunction, [0, 0, -1], function() {
|
||||||
return url;
|
return url;
|
||||||
}, _ol_tilegrid_.createXYZ(), _ol_tilegrid_.createXYZ(), {},
|
}, _ol_tilegrid_.createXYZ(), _ol_tilegrid_.createXYZ(), {},
|
||||||
1, getProjection('EPSG:3857'), _ol_VectorTile_, function() {});
|
1, getProjection('EPSG:3857'), _ol_VectorTile_, function() {});
|
||||||
@@ -34,10 +34,10 @@ describe('ol.VectorImageTile', function() {
|
|||||||
var format = new GeoJSON();
|
var format = new GeoJSON();
|
||||||
var url = 'spec/ol/data/unavailable.json';
|
var url = 'spec/ol/data/unavailable.json';
|
||||||
var sourceTile;
|
var sourceTile;
|
||||||
var tile = new _ol_VectorImageTile_([0, 0, 0] /* one world away */, 0, url, format,
|
var tile = new VectorImageTile([0, 0, 0] /* one world away */, 0, url, format,
|
||||||
function(tile, url) {
|
function(tile, url) {
|
||||||
sourceTile = tile;
|
sourceTile = tile;
|
||||||
_ol_VectorImageTile_.defaultLoadFunction(tile, url);
|
VectorImageTile.defaultLoadFunction(tile, url);
|
||||||
}, [0, 0, -1], function() {
|
}, [0, 0, -1], function() {
|
||||||
return url;
|
return url;
|
||||||
}, _ol_tilegrid_.createXYZ(), _ol_tilegrid_.createXYZ(), {},
|
}, _ol_tilegrid_.createXYZ(), _ol_tilegrid_.createXYZ(), {},
|
||||||
@@ -61,8 +61,8 @@ describe('ol.VectorImageTile', function() {
|
|||||||
it('sets ERROR state when source tiles fail to load', function(done) {
|
it('sets ERROR state when source tiles fail to load', function(done) {
|
||||||
var format = new GeoJSON();
|
var format = new GeoJSON();
|
||||||
var url = 'spec/ol/data/unavailable.json';
|
var url = 'spec/ol/data/unavailable.json';
|
||||||
var tile = new _ol_VectorImageTile_([0, 0, -1], 0, url, format,
|
var tile = new VectorImageTile([0, 0, -1], 0, url, format,
|
||||||
_ol_VectorImageTile_.defaultLoadFunction, [0, 0, -1], function() {
|
VectorImageTile.defaultLoadFunction, [0, 0, -1], function() {
|
||||||
return url;
|
return url;
|
||||||
}, _ol_tilegrid_.createXYZ(), _ol_tilegrid_.createXYZ(), {},
|
}, _ol_tilegrid_.createXYZ(), _ol_tilegrid_.createXYZ(), {},
|
||||||
1, getProjection('EPSG:3857'), _ol_VectorTile_, function() {});
|
1, getProjection('EPSG:3857'), _ol_VectorTile_, function() {});
|
||||||
@@ -78,8 +78,8 @@ describe('ol.VectorImageTile', function() {
|
|||||||
it('sets EMPTY state when tile has only empty source tiles', function(done) {
|
it('sets EMPTY state when tile has only empty source tiles', function(done) {
|
||||||
var format = new GeoJSON();
|
var format = new GeoJSON();
|
||||||
var url = '';
|
var url = '';
|
||||||
var tile = new _ol_VectorImageTile_([0, 0, -1], 0, url, format,
|
var tile = new VectorImageTile([0, 0, -1], 0, url, format,
|
||||||
_ol_VectorImageTile_.defaultLoadFunction, [0, 0, -1], function() {},
|
VectorImageTile.defaultLoadFunction, [0, 0, -1], function() {},
|
||||||
_ol_tilegrid_.createXYZ(), _ol_tilegrid_.createXYZ(), {},
|
_ol_tilegrid_.createXYZ(), _ol_tilegrid_.createXYZ(), {},
|
||||||
1, getProjection('EPSG:3857'), _ol_VectorTile_, function() {});
|
1, getProjection('EPSG:3857'), _ol_VectorTile_, function() {});
|
||||||
|
|
||||||
@@ -100,8 +100,8 @@ describe('ol.VectorImageTile', function() {
|
|||||||
extent: [-88, 35, -87, 36]
|
extent: [-88, 35, -87, 36]
|
||||||
});
|
});
|
||||||
var sourceTiles = {};
|
var sourceTiles = {};
|
||||||
var tile = new _ol_VectorImageTile_([1, 0, -1], 0, url, format,
|
var tile = new VectorImageTile([1, 0, -1], 0, url, format,
|
||||||
_ol_VectorImageTile_.defaultLoadFunction, [1, 0, -1], function(zxy) {
|
VectorImageTile.defaultLoadFunction, [1, 0, -1], function(zxy) {
|
||||||
return url;
|
return url;
|
||||||
}, tileGrid,
|
}, tileGrid,
|
||||||
_ol_tilegrid_.createXYZ({extent: [-180, -90, 180, 90], tileSize: 512}),
|
_ol_tilegrid_.createXYZ({extent: [-180, -90, 180, 90], tileSize: 512}),
|
||||||
@@ -114,8 +114,8 @@ describe('ol.VectorImageTile', function() {
|
|||||||
it('#dispose() while loading', function() {
|
it('#dispose() while loading', function() {
|
||||||
var format = new GeoJSON();
|
var format = new GeoJSON();
|
||||||
var url = 'spec/ol/data/point.json';
|
var url = 'spec/ol/data/point.json';
|
||||||
var tile = new _ol_VectorImageTile_([0, 0, 0] /* one world away */, 0, url, format,
|
var tile = new VectorImageTile([0, 0, 0] /* one world away */, 0, url, format,
|
||||||
_ol_VectorImageTile_.defaultLoadFunction, [0, 0, -1], function() {
|
VectorImageTile.defaultLoadFunction, [0, 0, -1], function() {
|
||||||
return url;
|
return url;
|
||||||
}, _ol_tilegrid_.createXYZ(), _ol_tilegrid_.createXYZ({tileSize: 512}), {},
|
}, _ol_tilegrid_.createXYZ(), _ol_tilegrid_.createXYZ({tileSize: 512}), {},
|
||||||
1, getProjection('EPSG:3857'), _ol_VectorTile_, function() {});
|
1, getProjection('EPSG:3857'), _ol_VectorTile_, function() {});
|
||||||
@@ -134,8 +134,8 @@ describe('ol.VectorImageTile', function() {
|
|||||||
it('#dispose() when loaded', function(done) {
|
it('#dispose() when loaded', function(done) {
|
||||||
var format = new GeoJSON();
|
var format = new GeoJSON();
|
||||||
var url = 'spec/ol/data/point.json';
|
var url = 'spec/ol/data/point.json';
|
||||||
var tile = new _ol_VectorImageTile_([0, 0, -1], 0, url, format,
|
var tile = new VectorImageTile([0, 0, -1], 0, url, format,
|
||||||
_ol_VectorImageTile_.defaultLoadFunction, [0, 0, -1], function() {
|
VectorImageTile.defaultLoadFunction, [0, 0, -1], function() {
|
||||||
return url;
|
return url;
|
||||||
}, _ol_tilegrid_.createXYZ(), _ol_tilegrid_.createXYZ({tileSize: 512}), {},
|
}, _ol_tilegrid_.createXYZ(), _ol_tilegrid_.createXYZ({tileSize: 512}), {},
|
||||||
1, getProjection('EPSG:3857'), _ol_VectorTile_, function() {});
|
1, getProjection('EPSG:3857'), _ol_VectorTile_, function() {});
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import _ol_Feature_ from '../../../src/ol/Feature.js';
|
import _ol_Feature_ from '../../../src/ol/Feature.js';
|
||||||
import _ol_VectorImageTile_ from '../../../src/ol/VectorImageTile.js';
|
import VectorImageTile from '../../../src/ol/VectorImageTile.js';
|
||||||
import _ol_VectorTile_ from '../../../src/ol/VectorTile.js';
|
import _ol_VectorTile_ from '../../../src/ol/VectorTile.js';
|
||||||
import _ol_events_ from '../../../src/ol/events.js';
|
import _ol_events_ from '../../../src/ol/events.js';
|
||||||
import TextFeature from '../../../src/ol/format/TextFeature.js';
|
import TextFeature from '../../../src/ol/format/TextFeature.js';
|
||||||
@@ -25,7 +25,7 @@ describe('ol.VectorTile', function() {
|
|||||||
var tile = new _ol_VectorTile_([0, 0, 0], null, null, format);
|
var tile = new _ol_VectorTile_([0, 0, 0], null, null, format);
|
||||||
var url = 'spec/ol/data/point.json';
|
var url = 'spec/ol/data/point.json';
|
||||||
|
|
||||||
_ol_VectorImageTile_.defaultLoadFunction(tile, url);
|
VectorImageTile.defaultLoadFunction(tile, url);
|
||||||
var loader = tile.loader_;
|
var loader = tile.loader_;
|
||||||
_ol_events_.listen(tile, 'change', function(e) {
|
_ol_events_.listen(tile, 'change', function(e) {
|
||||||
expect(tile.getFeatures().length).to.be.greaterThan(0);
|
expect(tile.getFeatures().length).to.be.greaterThan(0);
|
||||||
|
|||||||
Reference in New Issue
Block a user