Merge pull request #9322 from ahocevar/render-to-source-resolution
Use closest lower source resolution for render tiles
This commit is contained in:
@@ -191,7 +191,7 @@ class VectorTile extends UrlTile {
|
|||||||
if (sourceExtent) {
|
if (sourceExtent) {
|
||||||
getIntersection(extent, sourceExtent, extent);
|
getIntersection(extent, sourceExtent, extent);
|
||||||
}
|
}
|
||||||
const sourceZ = sourceTileGrid.getZForResolution(resolution/*, 1*/);
|
const sourceZ = sourceTileGrid.getZForResolution(resolution, 1);
|
||||||
const minZoom = sourceTileGrid.getMinZoom();
|
const minZoom = sourceTileGrid.getMinZoom();
|
||||||
|
|
||||||
let loadedZ = sourceZ + 1;
|
let loadedZ = sourceZ + 1;
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ describe('ol.source.VectorTile', function() {
|
|||||||
|
|
||||||
function tileUrlFunction(tileCoord) {
|
function tileUrlFunction(tileCoord) {
|
||||||
++requested;
|
++requested;
|
||||||
if (tileCoord.toString() == '6,27,-57') {
|
if (tileCoord.toString() == '5,13,-29') {
|
||||||
return tileCoord.join('/');
|
return tileCoord.join('/');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -154,7 +154,7 @@ describe('ol.source.VectorTile', function() {
|
|||||||
map.renderSync();
|
map.renderSync();
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
expect(requested).to.be.greaterThan(1);
|
expect(requested).to.be.greaterThan(1);
|
||||||
expect(loaded).to.eql(['6/27/-57']);
|
expect(loaded).to.eql(['5/13/-29']);
|
||||||
done();
|
done();
|
||||||
}, 0);
|
}, 0);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user