Adjust for layer canvas rotation
replace missed lines
This commit is contained in:
@@ -34,7 +34,8 @@ const swipe = document.getElementById('swipe');
|
||||
|
||||
aerial.on('prerender', function(event) {
|
||||
const ctx = event.context;
|
||||
const width = ctx.canvas.width * (swipe.value / 100);
|
||||
const mapSize = map.getSize();
|
||||
const width = mapSize[0] * (swipe.value / 100);
|
||||
const tl = getRenderPixel(event, [width, 0]);
|
||||
const tr = getRenderPixel(event, [mapSize[0], 0]);
|
||||
const bl = getRenderPixel(event, [width, mapSize[1]]);
|
||||
|
||||
Reference in New Issue
Block a user