Transform tile-pixels coordinates only once
This allows us to simplify the vector tile renderer significantly, because there are no more coordinates that need special tile-pixel handling.
This commit is contained in:
+15
-4
@@ -1870,6 +1870,7 @@ olx.format;
|
||||
|
||||
/**
|
||||
* @typedef {{dataProjection: ol.ProjectionLike,
|
||||
* extent: (ol.Extent|undefined),
|
||||
* featureProjection: ol.ProjectionLike,
|
||||
* rightHanded: (boolean|undefined)}}
|
||||
*/
|
||||
@@ -1888,6 +1889,15 @@ olx.format.ReadOptions;
|
||||
olx.format.ReadOptions.prototype.dataProjection;
|
||||
|
||||
|
||||
/**
|
||||
* Tile extent of the tile being read. This is only used and required for
|
||||
* {@link ol.format.MVT}.
|
||||
* @type {ol.Extent}
|
||||
* @api
|
||||
*/
|
||||
olx.format.ReadOptions.prototype.extent;
|
||||
|
||||
|
||||
/**
|
||||
* Projection of the feature geometries created by the format reader. If not
|
||||
* provided, features will be returned in the `dataProjection`.
|
||||
@@ -5094,10 +5104,11 @@ olx.source.VectorTileOptions.prototype.tileGrid;
|
||||
* tile.setLoader(function() {
|
||||
* var data = // ... fetch data
|
||||
* var format = tile.getFormat();
|
||||
* tile.setFeatures(format.readFeatures(data));
|
||||
* tile.setProjection(format.readProjection(data));
|
||||
* // uncomment the line below for ol.format.MVT only
|
||||
* //tile.setExtent(format.getLastExtent());
|
||||
* tile.setFeatures(format.readFeatures(data, {
|
||||
* // uncomment the line below for ol.format.MVT only
|
||||
* extent: tile.getExtent(),
|
||||
* featureProjection: map.getView().getProjection()
|
||||
* }));
|
||||
* };
|
||||
* });
|
||||
* ```
|
||||
|
||||
Reference in New Issue
Block a user