Merge pull request #7072 from ahocevar/vectortile-docs

Improve API docs for ol.VectorTile
This commit is contained in:
Andreas Hocevar
2017-08-03 10:51:26 +02:00
committed by GitHub
+16 -9
View File
@@ -109,7 +109,7 @@ ol.VectorTile.prototype.getFormat = function() {
/** /**
* Get the features for this tile. Geometries will be in the projection returned * Get the features for this tile. Geometries will be in the projection returned
* by {@link #getProjection}. * by {@link ol.VectorTile#getProjection}.
* @return {Array.<ol.Feature|ol.render.Feature>} Features. * @return {Array.<ol.Feature|ol.render.Feature>} Features.
* @api * @api
*/ */
@@ -127,7 +127,8 @@ ol.VectorTile.prototype.getKey = function() {
/** /**
* Get the feature projection of features returned by {@link #getFeatures}. * Get the feature projection of features returned by
* {@link ol.VectorTile#getFeatures}.
* @return {ol.proj.Projection} Feature projection. * @return {ol.proj.Projection} Feature projection.
* @api * @api
*/ */
@@ -180,12 +181,14 @@ ol.VectorTile.prototype.onError = function() {
/** /**
* Sets the extent of the vector tile. For tiles in projections with * Function for use in an {@link ol.source.VectorTile}'s `tileLoadFunction`.
* `tile-pixels` as units, this should be set to * Sets the extent of the vector tile. This is only required for tiles in
* `[0, 0, tilePixelSize, tilePixelSize]` by the source's `tileLoadFunction`. * projections with `tile-pixels` as units. The extent should be set to
* `tilePixelSize` is calculated by multiplying the tile size with the tile * `[0, 0, tilePixelSize, tilePixelSize]`, where `tilePixelSize` is calculated
* pixel ratio. When using `ol.format.MVT`, the format's `getLastExtent()` * by multiplying the tile size with the tile pixel ratio. For sources using
* method returns the correct extent. The default is `[0, 0, 4096, 4096]`. * {@link ol.format.MVT} as feature format, the
* {@link ol.format.MVT#getLastExtent} method will return the correct extent.
* The default is `[0, 0, 4096, 4096]`.
* @param {ol.Extent} extent The extent. * @param {ol.Extent} extent The extent.
* @api * @api
*/ */
@@ -195,6 +198,8 @@ ol.VectorTile.prototype.setExtent = function(extent) {
/** /**
* Function for use in an {@link ol.source.VectorTile}'s `tileLoadFunction`.
* Sets the features for the tile.
* @param {Array.<ol.Feature>} features Features. * @param {Array.<ol.Feature>} features Features.
* @api * @api
*/ */
@@ -205,7 +210,9 @@ ol.VectorTile.prototype.setFeatures = function(features) {
/** /**
* Set the projection of the features that were added with {@link #setFeatures}. * Function for use in an {@link ol.source.VectorTile}'s `tileLoadFunction`.
* Sets the projection of the features that were added with
* {@link ol.VectorTile#setFeatures}.
* @param {ol.proj.Projection} projection Feature projection. * @param {ol.proj.Projection} projection Feature projection.
* @api * @api
*/ */