Fix autoscale for maps

This commit is contained in:
Alexander Nozik 2023-02-22 14:00:41 +03:00
parent 94a91e9ff9
commit 1bcae1f362
2 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ val kmathVersion: String by extra("0.3.1-dev-10")
allprojects { allprojects {
group = "center.sciprog" group = "center.sciprog"
version = "0.2.2-dev-8" version = "0.2.2-dev-9"
repositories { repositories {
mavenLocal() mavenLocal()

View File

@ -62,7 +62,7 @@ public class MapViewScope internal constructor(
min( min(
canvasSize.width.value / rectangle.longitudeDelta.radians, canvasSize.width.value / rectangle.longitudeDelta.radians,
canvasSize.height.value / rectangle.latitudeDelta.radians canvasSize.height.value / rectangle.latitudeDelta.radians
) * PI / mapTileProvider.tileSize ) * 2 * PI / mapTileProvider.tileSize
) )
return space.ViewPoint(rectangle.center, zoom.toFloat()) return space.ViewPoint(rectangle.center, zoom.toFloat())
} }