From dcdfc22b9561679e785b4f35f80e49427ca8241f Mon Sep 17 00:00:00 2001 From: ahocevar Date: Thu, 24 May 2018 15:37:19 +0200 Subject: [PATCH] For performance, remove transition for vector tiles --- src/ol/VectorImageTile.js | 2 +- src/ol/source/VectorTile.js | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/ol/VectorImageTile.js b/src/ol/VectorImageTile.js index bf51371ced..9a6c56cc19 100644 --- a/src/ol/VectorImageTile.js +++ b/src/ol/VectorImageTile.js @@ -46,7 +46,7 @@ const VectorImageTile = function(tileCoord, state, sourceRevision, format, tileLoadFunction, urlTileCoord, tileUrlFunction, sourceTileGrid, tileGrid, sourceTiles, pixelRatio, projection, tileClass, handleTileChange, opt_options) { - Tile.call(this, tileCoord, state, opt_options); + Tile.call(this, tileCoord, state, {transition: 0}); /** * @private diff --git a/src/ol/source/VectorTile.js b/src/ol/source/VectorTile.js index 8fbfea3c9b..e4a0323f82 100644 --- a/src/ol/source/VectorTile.js +++ b/src/ol/source/VectorTile.js @@ -47,8 +47,6 @@ import {createXYZ, extentFromProjection, createForProjection} from '../tilegrid. * When set to `false`, only one world * will be rendered. When set to `true`, tiles will be wrapped horizontally to * render multiple worlds. - * @property {number} [transition] Duration of the opacity transition for rendering. - * To disable the opacity transition, pass `transition: 0`. */ @@ -168,8 +166,7 @@ VectorTile.prototype.getTile = function(z, x, y, pixelRatio, projection) { this.format_, this.tileLoadFunction, urlTileCoord, this.tileUrlFunction, this.tileGrid, this.getTileGridForProjection(projection), this.sourceTiles_, pixelRatio, projection, this.tileClass, - this.handleTileChange.bind(this), - this.tileOptions); + this.handleTileChange.bind(this)); this.tileCache.set(tileCoordKey, tile); return tile;