Untangle vector tile feature reprojection

This commit is contained in:
Andreas Hocevar
2016-01-27 00:42:51 +01:00
parent 682e65fead
commit 483376deb2
6 changed files with 76 additions and 39 deletions

View File

@@ -12,7 +12,6 @@ goog.require('ol.VectorTile');
goog.require('ol.format.FormatType');
goog.require('ol.proj');
goog.require('ol.proj.Projection');
goog.require('ol.proj.Units');
goog.require('ol.xml');
@@ -142,14 +141,7 @@ ol.featureloader.tile = function(url, format) {
* @this {ol.VectorTile}
*/
function(features, dataProjection) {
var dataUnits = dataProjection.getUnits();
if (dataUnits === ol.proj.Units.TILE_PIXELS) {
var projection = new ol.proj.Projection({
code: this.getProjection().getCode(),
units: dataUnits
});
this.setProjection(projection);
}
this.setProjection(dataProjection);
this.setFeatures(features);
},
/**