diff --git a/demo/maps/src/jvmMain/kotlin/Main.kt b/demo/maps/src/jvmMain/kotlin/Main.kt index 3363848..2c7ce6e 100644 --- a/demo/maps/src/jvmMain/kotlin/Main.kt +++ b/demo/maps/src/jvmMain/kotlin/Main.kt @@ -9,9 +9,9 @@ import androidx.compose.ui.geometry.Size import androidx.compose.ui.graphics.Color import androidx.compose.ui.window.Window import androidx.compose.ui.window.application -import centre.sciprog.maps.GeodeticMapCoordinates -import centre.sciprog.maps.MapViewPoint -import centre.sciprog.maps.compose.* +import center.sciprog.maps.compose.* +import center.sciprog.maps.GeodeticMapCoordinates +import center.sciprog.maps.MapViewPoint import io.ktor.client.HttpClient import io.ktor.client.engine.cio.CIO import kotlinx.coroutines.delay diff --git a/demo/scheme/src/jvmMain/kotlin/Main.kt b/demo/scheme/src/jvmMain/kotlin/Main.kt index 321f01b..98757de 100644 --- a/demo/scheme/src/jvmMain/kotlin/Main.kt +++ b/demo/scheme/src/jvmMain/kotlin/Main.kt @@ -7,7 +7,7 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.res.painterResource import androidx.compose.ui.window.Window import androidx.compose.ui.window.application -import center.sciprog.compose.scheme.* +import center.sciprog.scheme.* @Composable @Preview diff --git a/maps-kt-compose/src/commonMain/kotlin/centre/sciprog/maps/compose/FeatureBuilder.kt b/maps-kt-compose/src/commonMain/kotlin/center/sciprog/maps/compose/FeatureBuilder.kt similarity index 97% rename from maps-kt-compose/src/commonMain/kotlin/centre/sciprog/maps/compose/FeatureBuilder.kt rename to maps-kt-compose/src/commonMain/kotlin/center/sciprog/maps/compose/FeatureBuilder.kt index 1993b61..75df7ee 100644 --- a/maps-kt-compose/src/commonMain/kotlin/centre/sciprog/maps/compose/FeatureBuilder.kt +++ b/maps-kt-compose/src/commonMain/kotlin/center/sciprog/maps/compose/FeatureBuilder.kt @@ -1,4 +1,4 @@ -package centre.sciprog.maps.compose +package center.sciprog.maps.compose import androidx.compose.runtime.Composable import androidx.compose.runtime.mutableStateMapOf @@ -8,7 +8,7 @@ import androidx.compose.ui.graphics.drawscope.DrawScope import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.unit.DpSize import androidx.compose.ui.unit.dp -import centre.sciprog.maps.GeodeticMapCoordinates +import center.sciprog.maps.GeodeticMapCoordinates typealias FeatureId = String diff --git a/maps-kt-compose/src/commonMain/kotlin/centre/sciprog/maps/compose/LruCache.kt b/maps-kt-compose/src/commonMain/kotlin/center/sciprog/maps/compose/LruCache.kt similarity index 95% rename from maps-kt-compose/src/commonMain/kotlin/centre/sciprog/maps/compose/LruCache.kt rename to maps-kt-compose/src/commonMain/kotlin/center/sciprog/maps/compose/LruCache.kt index bf8d3fc..4a776ee 100644 --- a/maps-kt-compose/src/commonMain/kotlin/centre/sciprog/maps/compose/LruCache.kt +++ b/maps-kt-compose/src/commonMain/kotlin/center/sciprog/maps/compose/LruCache.kt @@ -1,4 +1,4 @@ -package centre.sciprog.maps.compose +package center.sciprog.maps.compose import kotlin.jvm.Synchronized diff --git a/maps-kt-compose/src/commonMain/kotlin/centre/sciprog/maps/compose/MapFeature.kt b/maps-kt-compose/src/commonMain/kotlin/center/sciprog/maps/compose/MapFeature.kt similarity index 95% rename from maps-kt-compose/src/commonMain/kotlin/centre/sciprog/maps/compose/MapFeature.kt rename to maps-kt-compose/src/commonMain/kotlin/center/sciprog/maps/compose/MapFeature.kt index 77f721d..d80ac3d 100644 --- a/maps-kt-compose/src/commonMain/kotlin/centre/sciprog/maps/compose/MapFeature.kt +++ b/maps-kt-compose/src/commonMain/kotlin/center/sciprog/maps/compose/MapFeature.kt @@ -1,4 +1,4 @@ -package centre.sciprog.maps.compose +package center.sciprog.maps.compose import androidx.compose.runtime.Composable import androidx.compose.ui.geometry.Offset @@ -12,9 +12,9 @@ import androidx.compose.ui.graphics.vector.rememberVectorPainter import androidx.compose.ui.unit.DpSize import androidx.compose.ui.unit.IntSize import androidx.compose.ui.unit.dp -import centre.sciprog.maps.GeodeticMapCoordinates -import centre.sciprog.maps.GmcBox -import centre.sciprog.maps.wrapAll +import center.sciprog.maps.GeodeticMapCoordinates +import center.sciprog.maps.GmcBox +import center.sciprog.maps.wrapAll //TODO replace zoom range with zoom-based representation change sealed class MapFeature(val zoomRange: IntRange) { diff --git a/maps-kt-compose/src/commonMain/kotlin/centre/sciprog/maps/compose/MapTileProvider.kt b/maps-kt-compose/src/commonMain/kotlin/center/sciprog/maps/compose/MapTileProvider.kt similarity index 94% rename from maps-kt-compose/src/commonMain/kotlin/centre/sciprog/maps/compose/MapTileProvider.kt rename to maps-kt-compose/src/commonMain/kotlin/center/sciprog/maps/compose/MapTileProvider.kt index c4d90f8..3804202 100644 --- a/maps-kt-compose/src/commonMain/kotlin/centre/sciprog/maps/compose/MapTileProvider.kt +++ b/maps-kt-compose/src/commonMain/kotlin/center/sciprog/maps/compose/MapTileProvider.kt @@ -1,4 +1,4 @@ -package centre.sciprog.maps.compose +package center.sciprog.maps.compose import androidx.compose.ui.graphics.ImageBitmap import kotlinx.coroutines.CoroutineScope diff --git a/maps-kt-compose/src/commonMain/kotlin/centre/sciprog/maps/compose/MapView.kt b/maps-kt-compose/src/commonMain/kotlin/center/sciprog/maps/compose/MapView.kt similarity index 97% rename from maps-kt-compose/src/commonMain/kotlin/centre/sciprog/maps/compose/MapView.kt rename to maps-kt-compose/src/commonMain/kotlin/center/sciprog/maps/compose/MapView.kt index ac424ca..1f1019e 100644 --- a/maps-kt-compose/src/commonMain/kotlin/centre/sciprog/maps/compose/MapView.kt +++ b/maps-kt-compose/src/commonMain/kotlin/center/sciprog/maps/compose/MapView.kt @@ -1,10 +1,10 @@ -package centre.sciprog.maps.compose +package center.sciprog.maps.compose import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.unit.DpSize -import centre.sciprog.maps.* +import center.sciprog.maps.* import kotlin.math.PI import kotlin.math.log2 import kotlin.math.min diff --git a/maps-kt-compose/src/jvmMain/kotlin/centre/sciprog/maps/compose/MapViewJvm.kt b/maps-kt-compose/src/jvmMain/kotlin/center/sciprog/maps/compose/MapViewJvm.kt similarity index 98% rename from maps-kt-compose/src/jvmMain/kotlin/centre/sciprog/maps/compose/MapViewJvm.kt rename to maps-kt-compose/src/jvmMain/kotlin/center/sciprog/maps/compose/MapViewJvm.kt index 6d9310a..5fb3bb6 100644 --- a/maps-kt-compose/src/jvmMain/kotlin/centre/sciprog/maps/compose/MapViewJvm.kt +++ b/maps-kt-compose/src/jvmMain/kotlin/center/sciprog/maps/compose/MapViewJvm.kt @@ -1,4 +1,4 @@ -package centre.sciprog.maps.compose +package center.sciprog.maps.compose import androidx.compose.foundation.Canvas import androidx.compose.foundation.gestures.drag @@ -16,7 +16,7 @@ import androidx.compose.ui.graphics.nativeCanvas import androidx.compose.ui.graphics.toArgb import androidx.compose.ui.input.pointer.* import androidx.compose.ui.unit.* -import centre.sciprog.maps.* +import center.sciprog.maps.* import kotlinx.coroutines.CancellationException import kotlinx.coroutines.launch import mu.KotlinLogging @@ -33,7 +33,7 @@ private fun Color.toPaint(): Paint = Paint().apply { private fun IntRange.intersect(other: IntRange) = max(first, other.first)..min(last, other.last) internal fun MapViewPoint.move(deltaX: Double, deltaY: Double): MapViewPoint { - val newCoordinates = GeodeticMapCoordinates.ofRadians( + val newCoordinates = center.sciprog.maps.GeodeticMapCoordinates.ofRadians( (focus.latitude + deltaY / scaleFactor).coerceIn( -MercatorProjection.MAXIMUM_LATITUDE, MercatorProjection.MAXIMUM_LATITUDE diff --git a/maps-kt-compose/src/jvmMain/kotlin/centre/sciprog/maps/compose/OpenStreetMapTileProvider.kt b/maps-kt-compose/src/jvmMain/kotlin/center/sciprog/maps/compose/OpenStreetMapTileProvider.kt similarity index 98% rename from maps-kt-compose/src/jvmMain/kotlin/centre/sciprog/maps/compose/OpenStreetMapTileProvider.kt rename to maps-kt-compose/src/jvmMain/kotlin/center/sciprog/maps/compose/OpenStreetMapTileProvider.kt index d6d0934..f7eb053 100644 --- a/maps-kt-compose/src/jvmMain/kotlin/centre/sciprog/maps/compose/OpenStreetMapTileProvider.kt +++ b/maps-kt-compose/src/jvmMain/kotlin/center/sciprog/maps/compose/OpenStreetMapTileProvider.kt @@ -1,4 +1,4 @@ -package centre.sciprog.maps.compose +package center.sciprog.maps.compose import androidx.compose.ui.graphics.ImageBitmap import androidx.compose.ui.graphics.toComposeImageBitmap diff --git a/maps-kt-core/src/commonMain/kotlin/centre/sciprog/maps/GeodeticMapCoordinates.kt b/maps-kt-core/src/commonMain/kotlin/center/sciprog/maps/GeodeticMapCoordinates.kt similarity index 98% rename from maps-kt-core/src/commonMain/kotlin/centre/sciprog/maps/GeodeticMapCoordinates.kt rename to maps-kt-core/src/commonMain/kotlin/center/sciprog/maps/GeodeticMapCoordinates.kt index d569e3e..bd8152b 100644 --- a/maps-kt-core/src/commonMain/kotlin/centre/sciprog/maps/GeodeticMapCoordinates.kt +++ b/maps-kt-core/src/commonMain/kotlin/center/sciprog/maps/GeodeticMapCoordinates.kt @@ -1,4 +1,4 @@ -package centre.sciprog.maps +package center.sciprog.maps import kotlin.math.PI diff --git a/maps-kt-core/src/commonMain/kotlin/centre/sciprog/maps/GmcBox.kt b/maps-kt-core/src/commonMain/kotlin/center/sciprog/maps/GmcBox.kt similarity index 98% rename from maps-kt-core/src/commonMain/kotlin/centre/sciprog/maps/GmcBox.kt rename to maps-kt-core/src/commonMain/kotlin/center/sciprog/maps/GmcBox.kt index de58b36..5b5297b 100644 --- a/maps-kt-core/src/commonMain/kotlin/centre/sciprog/maps/GmcBox.kt +++ b/maps-kt-core/src/commonMain/kotlin/center/sciprog/maps/GmcBox.kt @@ -1,4 +1,4 @@ -package centre.sciprog.maps +package center.sciprog.maps import kotlin.math.abs import kotlin.math.max diff --git a/maps-kt-core/src/commonMain/kotlin/centre/sciprog/maps/MapViewPoint.kt b/maps-kt-core/src/commonMain/kotlin/center/sciprog/maps/MapViewPoint.kt similarity index 97% rename from maps-kt-core/src/commonMain/kotlin/centre/sciprog/maps/MapViewPoint.kt rename to maps-kt-core/src/commonMain/kotlin/center/sciprog/maps/MapViewPoint.kt index 668585c..43a6836 100644 --- a/maps-kt-core/src/commonMain/kotlin/centre/sciprog/maps/MapViewPoint.kt +++ b/maps-kt-core/src/commonMain/kotlin/center/sciprog/maps/MapViewPoint.kt @@ -1,4 +1,4 @@ -package centre.sciprog.maps +package center.sciprog.maps import kotlin.math.pow diff --git a/maps-kt-core/src/commonMain/kotlin/centre/sciprog/maps/MercatorProjection.kt b/maps-kt-core/src/commonMain/kotlin/center/sciprog/maps/MercatorProjection.kt similarity index 98% rename from maps-kt-core/src/commonMain/kotlin/centre/sciprog/maps/MercatorProjection.kt rename to maps-kt-core/src/commonMain/kotlin/center/sciprog/maps/MercatorProjection.kt index 1221c4a..3155480 100644 --- a/maps-kt-core/src/commonMain/kotlin/centre/sciprog/maps/MercatorProjection.kt +++ b/maps-kt-core/src/commonMain/kotlin/center/sciprog/maps/MercatorProjection.kt @@ -3,7 +3,7 @@ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ -package centre.sciprog.maps +package center.sciprog.maps import kotlin.math.* diff --git a/maps-kt-core/src/commonMain/kotlin/centre/sciprog/maps/WebMercatorProjection.kt b/maps-kt-core/src/commonMain/kotlin/center/sciprog/maps/WebMercatorProjection.kt similarity index 98% rename from maps-kt-core/src/commonMain/kotlin/centre/sciprog/maps/WebMercatorProjection.kt rename to maps-kt-core/src/commonMain/kotlin/center/sciprog/maps/WebMercatorProjection.kt index 3c6eeea..952e7da 100644 --- a/maps-kt-core/src/commonMain/kotlin/centre/sciprog/maps/WebMercatorProjection.kt +++ b/maps-kt-core/src/commonMain/kotlin/center/sciprog/maps/WebMercatorProjection.kt @@ -3,7 +3,7 @@ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ -package centre.sciprog.maps +package center.sciprog.maps import kotlin.math.* diff --git a/scheme-kt/src/jvmMain/kotlin/center/sciprog/compose/scheme/FeatureBuilder.kt b/scheme-kt/src/jvmMain/kotlin/center/sciprog/scheme/FeatureBuilder.kt similarity index 97% rename from scheme-kt/src/jvmMain/kotlin/center/sciprog/compose/scheme/FeatureBuilder.kt rename to scheme-kt/src/jvmMain/kotlin/center/sciprog/scheme/FeatureBuilder.kt index a025820..b7d85dd 100644 --- a/scheme-kt/src/jvmMain/kotlin/center/sciprog/compose/scheme/FeatureBuilder.kt +++ b/scheme-kt/src/jvmMain/kotlin/center/sciprog/scheme/FeatureBuilder.kt @@ -1,4 +1,4 @@ -package center.sciprog.compose.scheme +package center.sciprog.scheme import androidx.compose.runtime.Composable import androidx.compose.runtime.mutableStateMapOf @@ -10,7 +10,7 @@ import androidx.compose.ui.graphics.painter.Painter import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.unit.DpSize import androidx.compose.ui.unit.dp -import center.sciprog.compose.scheme.SchemeFeature.Companion.defaultScaleRange +import center.sciprog.scheme.SchemeFeature.Companion.defaultScaleRange typealias FeatureId = String diff --git a/scheme-kt/src/jvmMain/kotlin/center/sciprog/compose/scheme/SchemeCoordinates.kt b/scheme-kt/src/jvmMain/kotlin/center/sciprog/scheme/SchemeCoordinates.kt similarity index 96% rename from scheme-kt/src/jvmMain/kotlin/center/sciprog/compose/scheme/SchemeCoordinates.kt rename to scheme-kt/src/jvmMain/kotlin/center/sciprog/scheme/SchemeCoordinates.kt index ee9a7db..122cdeb 100644 --- a/scheme-kt/src/jvmMain/kotlin/center/sciprog/compose/scheme/SchemeCoordinates.kt +++ b/scheme-kt/src/jvmMain/kotlin/center/sciprog/scheme/SchemeCoordinates.kt @@ -1,4 +1,4 @@ -package center.sciprog.compose.scheme +package center.sciprog.scheme import kotlin.math.abs import kotlin.math.max diff --git a/scheme-kt/src/jvmMain/kotlin/center/sciprog/compose/scheme/SchemeFeature.kt b/scheme-kt/src/jvmMain/kotlin/center/sciprog/scheme/SchemeFeature.kt similarity index 97% rename from scheme-kt/src/jvmMain/kotlin/center/sciprog/compose/scheme/SchemeFeature.kt rename to scheme-kt/src/jvmMain/kotlin/center/sciprog/scheme/SchemeFeature.kt index 8a9e47f..475bdf2 100644 --- a/scheme-kt/src/jvmMain/kotlin/center/sciprog/compose/scheme/SchemeFeature.kt +++ b/scheme-kt/src/jvmMain/kotlin/center/sciprog/scheme/SchemeFeature.kt @@ -1,4 +1,4 @@ -package center.sciprog.compose.scheme +package center.sciprog.scheme import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.Color @@ -10,7 +10,7 @@ import androidx.compose.ui.graphics.vector.rememberVectorPainter import androidx.compose.ui.unit.DpSize import androidx.compose.ui.unit.IntSize import androidx.compose.ui.unit.dp -import center.sciprog.compose.scheme.SchemeFeature.Companion.defaultScaleRange +import center.sciprog.scheme.SchemeFeature.Companion.defaultScaleRange internal typealias FloatRange = ClosedFloatingPointRange diff --git a/scheme-kt/src/jvmMain/kotlin/center/sciprog/compose/scheme/SchemeView.kt b/scheme-kt/src/jvmMain/kotlin/center/sciprog/scheme/SchemeView.kt similarity index 99% rename from scheme-kt/src/jvmMain/kotlin/center/sciprog/compose/scheme/SchemeView.kt rename to scheme-kt/src/jvmMain/kotlin/center/sciprog/scheme/SchemeView.kt index a6c3e6a..25ce1c8 100644 --- a/scheme-kt/src/jvmMain/kotlin/center/sciprog/compose/scheme/SchemeView.kt +++ b/scheme-kt/src/jvmMain/kotlin/center/sciprog/scheme/SchemeView.kt @@ -1,4 +1,4 @@ -package center.sciprog.compose.scheme +package center.sciprog.scheme import androidx.compose.foundation.Canvas import androidx.compose.foundation.gestures.drag diff --git a/scheme-kt/src/jvmMain/kotlin/center/sciprog/compose/scheme/SchemeViewPoint.kt b/scheme-kt/src/jvmMain/kotlin/center/sciprog/scheme/SchemeViewPoint.kt similarity index 94% rename from scheme-kt/src/jvmMain/kotlin/center/sciprog/compose/scheme/SchemeViewPoint.kt rename to scheme-kt/src/jvmMain/kotlin/center/sciprog/scheme/SchemeViewPoint.kt index 412b558..4e60dee 100644 --- a/scheme-kt/src/jvmMain/kotlin/center/sciprog/compose/scheme/SchemeViewPoint.kt +++ b/scheme-kt/src/jvmMain/kotlin/center/sciprog/scheme/SchemeViewPoint.kt @@ -1,4 +1,4 @@ -package center.sciprog.compose.scheme +package center.sciprog.scheme import kotlin.math.pow