Use same tile size in rendered and source tile grid

This commit is contained in:
Andreas Hocevar
2017-05-08 19:39:37 +02:00
parent 785e7135a7
commit 355ce9f679
3 changed files with 34 additions and 11 deletions

View File

@@ -12,7 +12,7 @@ describe('ol.source.VectorTile', function() {
var format = new ol.format.MVT();
var source = new ol.source.VectorTile({
format: format,
tileGrid: ol.tilegrid.createXYZ(),
tileGrid: ol.tilegrid.createXYZ({tileSize: 512}),
url: '{z}/{x}/{y}.pbf'
});
var tile;
@@ -40,4 +40,11 @@ describe('ol.source.VectorTile', function() {
});
});
describe('#getTileGridForProjection', function() {
it('creates a tile grid with the source tile grid\'s tile size', function() {
var tileGrid = source.getTileGridForProjection(ol.proj.get('EPSG:3857'));
expect(tileGrid.getTileSize(0)).to.be(512);
});
});
});