Merge pull request #11540 from gberaudo/avoid_mvt_reprojection

Avoid unnecessary transform in the MVT format
This commit is contained in:
Andreas Hocevar
2020-09-10 19:18:33 +02:00
committed by GitHub
3 changed files with 36 additions and 27 deletions

View File

@@ -65,6 +65,15 @@ where('ArrayBuffer.isView').describe('ol.format.MVT', function () {
expect(geometry.getCoordinates()[1][0]).to.eql([4160, 3489]);
});
it('avoids unnecessary reprojections of the ol.render.Feature', function () {
const format = new MVT({
layers: ['poi_label'],
});
const geometry = format.readFeatures(data)[0].getGeometry();
expect(geometry.getType()).to.be('Point');
expect(geometry.getFlatCoordinates()).to.eql([-1210, 2681]);
});
it('parses id property', function () {
// ol.Feature
let format = new MVT({