diff --git a/externs/olx.js b/externs/olx.js index cfec2c57d6..4f634dbb1c 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -4386,12 +4386,16 @@ olx.source.VectorTileOptions.prototype.tileGrid; /** - * Optional function to load a tile given a URL. The default is + * Optional function to load a tile given a URL. Could look like this: * ```js * function(tile, url) { - * tile.setLoader( - * ol.featureloader.tile(url, tile.getFormat())); - * }; + * tile.setLoader(function() { + * var data = // ... fetch data + * var format = tile.getFormat(); + * tile.setFeatures(format.readFeatures(data)); + * tile.setProjection(format.readProjection(data)); + * }; + * }); * ``` * @type {ol.TileLoadFunctionType|undefined} * @api diff --git a/src/ol/vectortile.js b/src/ol/vectortile.js index ac2b2f2052..85fb41e349 100644 --- a/src/ol/vectortile.js +++ b/src/ol/vectortile.js @@ -170,7 +170,9 @@ ol.VectorTile.prototype.setFeatures = function(features) { /** + * Set the projection of the features that were added with {@link #setFeatures}. * @param {ol.proj.Projection} projection Feature projection. + * @api */ ol.VectorTile.prototype.setProjection = function(projection) { this.projection_ = projection;