Use same tile size in rendered and source tile grid
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user