Make ol.VectorTile#getFeatures and #getProjection exportable

This commit is contained in:
Andreas Hocevar
2017-05-16 22:57:03 +02:00
parent 98a1654b47
commit 9af01c515f
3 changed files with 12 additions and 4 deletions

View File

@@ -108,7 +108,8 @@ ol.renderer.canvas.VectorTileLayer.prototype.createReplayGroup_ = function(
var pixelRatio = frameState.pixelRatio;
var projection = frameState.viewState.projection;
var revision = layer.getRevision();
var renderOrder = layer.getRenderOrder() || null;
var renderOrder = /** @type {ol.RenderOrderFunction} */
(layer.getRenderOrder()) || null;
var replayState = tile.getReplayState();
if (!replayState.dirty && replayState.renderedRevision == revision &&

View File

@@ -453,9 +453,11 @@ ol.RegularShapeRenderOptions;
/**
* A function to be used when sorting features before rendering.
* It takes two instances of {@link ol.Feature} and returns a `{number}`.
* It takes two instances of {@link ol.Feature} or {@link ol.render.Feature} and
* returns a `{number}`.
*
* @typedef {function(ol.Feature, ol.Feature):number}
* @typedef {function((ol.Feature|ol.render.Feature), (ol.Feature|ol.render.Feature)):
* number}
*/
ol.RenderOrderFunction;

View File

@@ -77,7 +77,10 @@ ol.VectorTile.prototype.getFormat = function() {
/**
* @return {Array.<ol.Feature>} Features.
* Get the features for this tile. Geometries will be in the projection returned
* by {@link #getProjection}.
* @return {Array.<ol.Feature|ol.render.Feature>} Features.
* @api
*/
ol.VectorTile.prototype.getFeatures = function() {
return this.features_;
@@ -93,7 +96,9 @@ ol.VectorTile.prototype.getKey = function() {
/**
* Get the feature projection of features returned by {@link #getFeatures}.
* @return {ol.proj.Projection} Feature projection.
* @api
*/
ol.VectorTile.prototype.getProjection = function() {
return this.projection_;