Merge pull request #5011 from ahocevar/vectortile-setprojection

Add missing setProjection function to ol.VectorTile API
This commit is contained in:
Andreas Hocevar
2016-03-10 20:01:29 +01:00
2 changed files with 10 additions and 4 deletions
+8 -4
View File
@@ -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