diff options
author | Iván Ávalos <avalos@disroot.org> | 2022-01-16 02:35:33 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2022-01-16 02:35:33 -0600 |
commit | 5d018cdfc1af8d356716dd45d81eb64dbed6b3e4 (patch) | |
tree | 9055c0f906d3961a1259aaec9390eac7c93d8ae8 | |
parent | cfb46fd31745451fffc65a95bcbdab134d12b852 (diff) | |
download | etbsa-trackermap-mobile-5d018cdfc1af8d356716dd45d81eb64dbed6b3e4.tar.gz etbsa-trackermap-mobile-5d018cdfc1af8d356716dd45d81eb64dbed6b3e4.tar.bz2 etbsa-trackermap-mobile-5d018cdfc1af8d356716dd45d81eb64dbed6b3e4.zip |
Added comment explaining Mapnik stuff
-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 |