diff options
Diffstat (limited to 'shared/src/commonMain')
-rw-r--r-- | shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/MapCalculus.kt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/MapCalculus.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/MapCalculus.kt index 8c58179..d4c5261 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/MapCalculus.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/MapCalculus.kt @@ -2,7 +2,12 @@ package mx.trackermap.TrackerMap.utils class MapCalculus { companion object { - // Source: https://github.com/openstreetmap/mapnik-stylesheets/blob/master/zoom-to-scale.txt + /** + * WhirlyGlobe library uses height rather than zoom levels, but it supports converting + * Mapnik denominator scales to height, so we can first convert zoom levels to Mapnik + * denominator scales, and then convert them to height using WhirlyGlobe. + * Source: https://github.com/openstreetmap/mapnik-stylesheets/blob/master/zoom-to-scale.txt + */ fun zoomLevelToScale(zoom: Int): Double? = when (zoom) { 1 -> 279541132.014 |