🐛 Fix new render zoom (#6488)

* 🐛 Fix new render zoom

* 🐛 Use scale instead of just zoom in get_tiles_for_viewbox

---------

Co-authored-by: Belén Albeza <belen@hey.com>
This commit is contained in:
Alejandro Alonso 2025-05-16 10:49:03 +02:00 committed by GitHub
parent ad87e9842d
commit 0cb6e0dee2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 9 deletions

View file

@ -36,9 +36,9 @@ pub fn get_tiles_for_viewbox(viewbox: Viewbox, scale: f32) -> (i32, i32, i32, i3
pub fn get_tiles_for_viewbox_with_interest(
viewbox: Viewbox,
interest: i32,
dpr: f32,
scale: f32,
) -> (i32, i32, i32, i32) {
let (sx, sy, ex, ey) = get_tiles_for_viewbox(viewbox, dpr);
let (sx, sy, ex, ey) = get_tiles_for_viewbox(viewbox, scale);
(sx - interest, sy - interest, ex + interest, ey + interest)
}