Named export for VectorImageTile
This commit is contained in:
@@ -285,14 +285,14 @@ VectorImageTile.prototype.finishLoading_ = function() {
|
||||
}
|
||||
};
|
||||
|
||||
export default VectorImageTile;
|
||||
|
||||
/**
|
||||
* Sets the loader for a tile.
|
||||
* @param {ol.VectorTile} tile Vector tile.
|
||||
* @param {string} url URL.
|
||||
*/
|
||||
VectorImageTile.defaultLoadFunction = function(tile, url) {
|
||||
export function defaultLoadFunction(tile, url) {
|
||||
var loader = loadFeaturesXhr(url, tile.getFormat(), tile.onLoad.bind(tile), tile.onError.bind(tile));
|
||||
tile.setLoader(loader);
|
||||
};
|
||||
export default VectorImageTile;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
import {inherits} from '../index.js';
|
||||
import TileState from '../TileState.js';
|
||||
import VectorImageTile from '../VectorImageTile.js';
|
||||
import VectorImageTile, {defaultLoadFunction} from '../VectorImageTile.js';
|
||||
import VectorTile from '../VectorTile.js';
|
||||
import _ol_size_ from '../size.js';
|
||||
import _ol_source_UrlTile_ from '../source/UrlTile.js';
|
||||
@@ -46,8 +46,7 @@ var _ol_source_VectorTile_ = function(options) {
|
||||
projection: projection,
|
||||
state: options.state,
|
||||
tileGrid: tileGrid,
|
||||
tileLoadFunction: options.tileLoadFunction ?
|
||||
options.tileLoadFunction : VectorImageTile.defaultLoadFunction,
|
||||
tileLoadFunction: options.tileLoadFunction ? options.tileLoadFunction : defaultLoadFunction,
|
||||
tileUrlFunction: options.tileUrlFunction,
|
||||
url: options.url,
|
||||
urls: options.urls,
|
||||
|
||||
Reference in New Issue
Block a user