Version 0.3.0
This commit is contained in:
parent
7c7a788d2e
commit
7ca4bba1b7
12
CHANGELOG.md
12
CHANGELOG.md
@ -5,7 +5,6 @@
|
||||
### Added
|
||||
|
||||
### Changed
|
||||
- Package changed to `space.kscience`
|
||||
|
||||
### Deprecated
|
||||
|
||||
@ -14,3 +13,14 @@
|
||||
### Fixed
|
||||
|
||||
### Security
|
||||
|
||||
## 0.3.0 - 2024-06-04
|
||||
|
||||
### Changed
|
||||
|
||||
- Package changed to `space.kscience`
|
||||
- Kotlin 2.0
|
||||
|
||||
### Fixed
|
||||
|
||||
- Use of generated resources for Wasm
|
||||
|
12
README.md
12
README.md
@ -8,7 +8,6 @@ This repository is a work-in-progress implementation of Map-with-markers compone
|
||||
|
||||
|
||||
### [demo](demo)
|
||||
>
|
||||
>
|
||||
> **Maturity**: EXPERIMENTAL
|
||||
|
||||
@ -33,17 +32,14 @@ This repository is a work-in-progress implementation of Map-with-markers compone
|
||||
|
||||
|
||||
### [maps-kt-features](maps-kt-features)
|
||||
>
|
||||
>
|
||||
> **Maturity**: EXPERIMENTAL
|
||||
|
||||
### [maps-kt-geojson](maps-kt-geojson)
|
||||
>
|
||||
>
|
||||
> **Maturity**: EXPERIMENTAL
|
||||
|
||||
### [maps-kt-scheme](maps-kt-scheme)
|
||||
>
|
||||
>
|
||||
> **Maturity**: EXPERIMENTAL
|
||||
|
||||
@ -53,21 +49,21 @@ This repository is a work-in-progress implementation of Map-with-markers compone
|
||||
> **Maturity**: EXPERIMENTAL
|
||||
|
||||
### [demo/maps](demo/maps)
|
||||
>
|
||||
>
|
||||
> **Maturity**: EXPERIMENTAL
|
||||
|
||||
### [demo/maps-wasm](demo/maps-wasm)
|
||||
>
|
||||
> **Maturity**: EXPERIMENTAL
|
||||
|
||||
### [demo/polygon-editor](demo/polygon-editor)
|
||||
>
|
||||
>
|
||||
> **Maturity**: EXPERIMENTAL
|
||||
|
||||
### [demo/scheme](demo/scheme)
|
||||
>
|
||||
>
|
||||
> **Maturity**: EXPERIMENTAL
|
||||
|
||||
### [demo/trajectory-playground](demo/trajectory-playground)
|
||||
>
|
||||
>
|
||||
> **Maturity**: EXPERIMENTAL
|
||||
|
@ -9,7 +9,7 @@ val kmathVersion: String by extra("0.4.0")
|
||||
|
||||
allprojects {
|
||||
group = "space.kscience"
|
||||
version = "0.3.0-dev-2"
|
||||
version = "0.3.0"
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
|
@ -2,7 +2,8 @@ import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform")
|
||||
id("org.jetbrains.compose")
|
||||
alias(spclibs.plugins.compose.compiler)
|
||||
alias(spclibs.plugins.compose.jb)
|
||||
}
|
||||
|
||||
//val ktorVersion: String by rootProject.extra
|
||||
@ -14,17 +15,23 @@ kotlin {
|
||||
binaries.executable()
|
||||
}
|
||||
sourceSets {
|
||||
val wasmJsMain by getting {
|
||||
commonMain {
|
||||
dependencies {
|
||||
@OptIn(org.jetbrains.compose.ExperimentalComposeLibrary::class)
|
||||
api(compose.components.resources)
|
||||
}
|
||||
}
|
||||
|
||||
wasmJsMain {
|
||||
dependencies {
|
||||
implementation(projects.mapsKtScheme)
|
||||
@OptIn(org.jetbrains.compose.ExperimentalComposeLibrary::class) api(compose.components.resources)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
compose {
|
||||
experimental.web{
|
||||
application{}
|
||||
web {
|
||||
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 469 KiB After Width: | Height: | Size: 469 KiB |
@ -4,18 +4,19 @@ import androidx.compose.runtime.*
|
||||
import androidx.compose.ui.ExperimentalComposeUiApi
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.window.CanvasBasedWindow
|
||||
import center.sciprog.maps.features.FeatureGroup
|
||||
import center.sciprog.maps.features.ViewConfig
|
||||
import center.sciprog.maps.features.ViewPoint
|
||||
import center.sciprog.maps.features.color
|
||||
import center.sciprog.maps.scheme.*
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.isActive
|
||||
import kotlinx.coroutines.launch
|
||||
import org.jetbrains.compose.resources.DrawableResource
|
||||
import org.jetbrains.compose.resources.ExperimentalResourceApi
|
||||
import org.jetbrains.compose.resources.painterResource
|
||||
import space.kscience.kmath.geometry.Angle
|
||||
import space.kscience.maps.features.FeatureGroup
|
||||
import space.kscience.maps.features.ViewConfig
|
||||
import space.kscience.maps.features.ViewPoint
|
||||
import space.kscience.maps.features.color
|
||||
import space.kscience.maps.scheme.*
|
||||
import space.kscience.maps_wasm.generated.resources.Res
|
||||
import space.kscience.maps_wasm.generated.resources.middle_earth
|
||||
|
||||
|
||||
@Composable
|
||||
@ -25,7 +26,9 @@ fun App() {
|
||||
|
||||
|
||||
val features: FeatureGroup<XY> = FeatureGroup.remember(XYCoordinateSpace) {
|
||||
background(1600f, 1200f) { painterResource(DrawableResource("middle-earth.jpg")) }
|
||||
background(1600f, 1200f) {
|
||||
painterResource(Res.drawable.middle_earth)
|
||||
}
|
||||
circle(410.52737 to 868.7676).color(Color.Blue)
|
||||
text(410.52737 to 868.7676, "Shire").color(Color.Blue)
|
||||
circle(1132.0881 to 394.99127).color(Color.Red)
|
||||
|
@ -2,7 +2,8 @@ import org.jetbrains.compose.desktop.application.dsl.TargetFormat
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform")
|
||||
id("org.jetbrains.compose")
|
||||
alias(spclibs.plugins.compose.compiler)
|
||||
alias(spclibs.plugins.compose.jb)
|
||||
}
|
||||
|
||||
val ktorVersion: String by rootProject.extra
|
||||
|
@ -13,9 +13,6 @@ import androidx.compose.ui.unit.DpSize
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.window.Window
|
||||
import androidx.compose.ui.window.application
|
||||
import center.sciprog.maps.compose.*
|
||||
import center.sciprog.maps.features.*
|
||||
import center.sciprog.maps.geojson.geoJson
|
||||
import io.ktor.client.HttpClient
|
||||
import io.ktor.client.engine.cio.CIO
|
||||
import kotlinx.coroutines.delay
|
||||
@ -29,9 +26,12 @@ import space.kscience.attributes.Attributes
|
||||
import space.kscience.kmath.geometry.Angle
|
||||
import space.kscience.kmath.geometry.degrees
|
||||
import space.kscience.kmath.geometry.radians
|
||||
import space.kscience.maps.compose.*
|
||||
import space.kscience.maps.coordinates.GeodeticMapCoordinates
|
||||
import space.kscience.maps.coordinates.Gmc
|
||||
import space.kscience.maps.coordinates.kilometers
|
||||
import space.kscience.maps.features.*
|
||||
import space.kscience.maps.geojson.geoJson
|
||||
import java.nio.file.Path
|
||||
import kotlin.math.PI
|
||||
import kotlin.random.Random
|
||||
|
@ -2,7 +2,8 @@ import org.jetbrains.compose.desktop.application.dsl.TargetFormat
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform")
|
||||
id("org.jetbrains.compose")
|
||||
alias(spclibs.plugins.compose.compiler)
|
||||
alias(spclibs.plugins.compose.jb)
|
||||
}
|
||||
|
||||
val ktorVersion: String by rootProject.extra
|
||||
|
@ -9,11 +9,11 @@ import androidx.compose.runtime.snapshots.SnapshotStateList
|
||||
import androidx.compose.ui.input.pointer.isSecondaryPressed
|
||||
import androidx.compose.ui.window.Window
|
||||
import androidx.compose.ui.window.application
|
||||
import center.sciprog.maps.features.*
|
||||
import center.sciprog.maps.scheme.SchemeView
|
||||
import center.sciprog.maps.scheme.XY
|
||||
import center.sciprog.maps.scheme.XYCoordinateSpace
|
||||
import center.sciprog.maps.scheme.XYCanvasState
|
||||
import space.kscience.maps.features.*
|
||||
import space.kscience.maps.scheme.SchemeView
|
||||
import space.kscience.maps.scheme.XY
|
||||
import space.kscience.maps.scheme.XYCanvasState
|
||||
import space.kscience.maps.scheme.XYCoordinateSpace
|
||||
|
||||
@Composable
|
||||
@Preview
|
||||
|
@ -2,7 +2,8 @@ import org.jetbrains.compose.desktop.application.dsl.TargetFormat
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform")
|
||||
id("org.jetbrains.compose")
|
||||
alias(spclibs.plugins.compose.compiler)
|
||||
alias(spclibs.plugins.compose.jb)
|
||||
}
|
||||
|
||||
val ktorVersion: String by rootProject.extra
|
||||
|
@ -8,18 +8,18 @@ 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.maps.features.FeatureGroup
|
||||
import center.sciprog.maps.features.ViewConfig
|
||||
import center.sciprog.maps.features.ViewPoint
|
||||
import center.sciprog.maps.features.color
|
||||
import center.sciprog.maps.scheme.*
|
||||
import center.sciprog.maps.svg.FeatureStateSnapshot
|
||||
import center.sciprog.maps.svg.exportToSvg
|
||||
import center.sciprog.maps.svg.snapshot
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.isActive
|
||||
import kotlinx.coroutines.launch
|
||||
import space.kscience.kmath.geometry.Angle
|
||||
import space.kscience.maps.features.FeatureGroup
|
||||
import space.kscience.maps.features.ViewConfig
|
||||
import space.kscience.maps.features.ViewPoint
|
||||
import space.kscience.maps.features.color
|
||||
import space.kscience.maps.scheme.*
|
||||
import space.kscience.maps.svg.FeatureStateSnapshot
|
||||
import space.kscience.maps.svg.exportToSvg
|
||||
import space.kscience.maps.svg.snapshot
|
||||
import java.awt.Desktop
|
||||
import java.nio.file.Files
|
||||
|
||||
|
@ -5,9 +5,9 @@ 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.maps.features.*
|
||||
import center.sciprog.maps.scheme.*
|
||||
import center.sciprog.maps.scheme.XYCoordinateSpace.Rectangle
|
||||
import space.kscience.maps.features.*
|
||||
import space.kscience.maps.scheme.*
|
||||
import space.kscience.maps.scheme.XYCoordinateSpace.Rectangle
|
||||
|
||||
|
||||
fun main() = application {
|
||||
|
@ -1,6 +1,7 @@
|
||||
plugins {
|
||||
kotlin("multiplatform")
|
||||
id("org.jetbrains.compose")
|
||||
alias(spclibs.plugins.compose.compiler)
|
||||
alias(spclibs.plugins.compose.jb)
|
||||
}
|
||||
|
||||
val ktorVersion: String by rootProject.extra
|
||||
|
@ -8,13 +8,13 @@ import androidx.compose.runtime.*
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.window.Window
|
||||
import androidx.compose.ui.window.application
|
||||
import center.sciprog.maps.features.*
|
||||
import center.sciprog.maps.scheme.SchemeView
|
||||
import center.sciprog.maps.scheme.XY
|
||||
import space.kscience.kmath.geometry.Angle
|
||||
import space.kscience.kmath.geometry.Vector2D
|
||||
import space.kscience.kmath.geometry.euclidean2d.Circle2D
|
||||
import space.kscience.kmath.geometry.euclidean2d.Float64Space2D
|
||||
import space.kscience.maps.features.*
|
||||
import space.kscience.maps.scheme.SchemeView
|
||||
import space.kscience.maps.scheme.XY
|
||||
import space.kscience.trajectory.*
|
||||
import kotlin.random.Random
|
||||
|
||||
|
@ -1,13 +1,5 @@
|
||||
kotlin.code.style=official
|
||||
|
||||
compose.version=1.6.0-rc02
|
||||
org.jetbrains.compose.experimental.wasm.enabled=true
|
||||
org.jetbrains.compose.experimental.jscanvas.enabled=true
|
||||
|
||||
agp.version=8.1.0
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
|
||||
org.gradle.jvmargs=-Xmx4096m
|
||||
|
||||
toolsVersion=0.15.2-kotlin-1.9.22
|
||||
toolsVersion=0.15.4-kotlin-2.0.0
|
@ -7,19 +7,8 @@ The core interfaces of KMath.
|
||||
|
||||
## Artifact:
|
||||
|
||||
The Maven coordinates of this project are `center.sciprog:maps-kt-compose:0.2.2`.
|
||||
The Maven coordinates of this project are `space.kscience:maps-kt-compose:0.3.0`.
|
||||
|
||||
**Gradle Groovy:**
|
||||
```groovy
|
||||
repositories {
|
||||
maven { url 'https://repo.kotlin.link' }
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'center.sciprog:maps-kt-compose:0.2.2'
|
||||
}
|
||||
```
|
||||
**Gradle Kotlin DSL:**
|
||||
```kotlin
|
||||
repositories {
|
||||
@ -28,6 +17,6 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("center.sciprog:maps-kt-compose:0.2.2")
|
||||
implementation("space.kscience:maps-kt-compose:0.3.0")
|
||||
}
|
||||
```
|
||||
|
@ -1,6 +1,7 @@
|
||||
plugins {
|
||||
id("space.kscience.gradle.mpp")
|
||||
id("org.jetbrains.compose")
|
||||
alias(spclibs.plugins.compose.compiler)
|
||||
alias(spclibs.plugins.compose.jb)
|
||||
// id("com.android.library")
|
||||
`maven-publish`
|
||||
}
|
||||
@ -10,40 +11,22 @@ kscience {
|
||||
wasm()
|
||||
|
||||
useCoroutines()
|
||||
}
|
||||
|
||||
kotlin {
|
||||
sourceSets {
|
||||
commonMain {
|
||||
dependencies {
|
||||
api(projects.mapsKtCore)
|
||||
api(projects.mapsKtFeatures)
|
||||
api(compose.foundation)
|
||||
api(project.dependencies.platform(spclibs.ktor.bom))
|
||||
}
|
||||
}
|
||||
commonMain{
|
||||
api(projects.mapsKtCore)
|
||||
api(projects.mapsKtFeatures)
|
||||
api(compose.foundation)
|
||||
api(project.dependencies.platform(spclibs.ktor.bom))
|
||||
}
|
||||
jvmMain{
|
||||
api("io.ktor:ktor-client-cio")
|
||||
}
|
||||
jvmTest{
|
||||
implementation("io.ktor:ktor-client-cio")
|
||||
implementation(compose.desktop.currentOs)
|
||||
implementation(spclibs.kotlinx.coroutines.test)
|
||||
|
||||
getByName("jvmMain"){
|
||||
dependencies {
|
||||
api("io.ktor:ktor-client-cio")
|
||||
}
|
||||
}
|
||||
//
|
||||
// getByName("jsMain"){
|
||||
// dependencies {
|
||||
// api("io.ktor:ktor-client-js")
|
||||
// }
|
||||
// }
|
||||
|
||||
getByName("jvmTest") {
|
||||
dependencies {
|
||||
implementation("io.ktor:ktor-client-cio")
|
||||
implementation(compose.desktop.currentOs)
|
||||
implementation(spclibs.kotlinx.coroutines.test)
|
||||
|
||||
implementation(spclibs.logback.classic)
|
||||
}
|
||||
}
|
||||
implementation(spclibs.logback.classic)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
package space.kscience.maps.compose
|
||||
|
||||
import center.sciprog.maps.features.Rectangle
|
||||
import space.kscience.kmath.geometry.Angle
|
||||
import space.kscience.kmath.geometry.abs
|
||||
import space.kscience.maps.coordinates.GeodeticMapCoordinates
|
||||
import space.kscience.maps.coordinates.Gmc
|
||||
import space.kscience.maps.features.Rectangle
|
||||
|
||||
internal fun Angle.isBetween(a: Angle, b: Angle) = this in a..b || this in b..a
|
||||
|
||||
|
@ -6,12 +6,12 @@ import androidx.compose.ui.unit.Dp
|
||||
import androidx.compose.ui.unit.DpOffset
|
||||
import androidx.compose.ui.unit.DpRect
|
||||
import androidx.compose.ui.unit.dp
|
||||
import center.sciprog.maps.features.*
|
||||
import space.kscience.kmath.geometry.radians
|
||||
import space.kscience.maps.coordinates.Gmc
|
||||
import space.kscience.maps.coordinates.MercatorProjection
|
||||
import space.kscience.maps.coordinates.WebMercatorCoordinates
|
||||
import space.kscience.maps.coordinates.WebMercatorProjection
|
||||
import space.kscience.maps.features.*
|
||||
import kotlin.math.*
|
||||
|
||||
|
||||
|
@ -11,13 +11,13 @@ import androidx.compose.ui.graphics.toComposeImageBitmap
|
||||
import androidx.compose.ui.unit.IntOffset
|
||||
import androidx.compose.ui.unit.IntSize
|
||||
import androidx.compose.ui.unit.dp
|
||||
import center.sciprog.maps.features.*
|
||||
import io.github.oshai.kotlinlogging.KotlinLogging
|
||||
import kotlinx.coroutines.CancellationException
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.supervisorScope
|
||||
import org.jetbrains.skia.Image
|
||||
import space.kscience.maps.coordinates.Gmc
|
||||
import space.kscience.maps.features.*
|
||||
import kotlin.math.ceil
|
||||
import kotlin.math.pow
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
package space.kscience.maps.compose
|
||||
|
||||
import center.sciprog.maps.features.ViewPoint
|
||||
import space.kscience.maps.coordinates.GeodeticMapCoordinates
|
||||
import space.kscience.maps.coordinates.Gmc
|
||||
import space.kscience.maps.coordinates.WebMercatorProjection
|
||||
import space.kscience.maps.features.ViewPoint
|
||||
|
||||
/**
|
||||
* Observable position on the map. Includes observation coordinate and [zoom] factor
|
||||
|
@ -3,13 +3,12 @@ package space.kscience.maps.compose
|
||||
import androidx.compose.ui.unit.DpOffset
|
||||
import androidx.compose.ui.unit.DpSize
|
||||
import androidx.compose.ui.unit.dp
|
||||
import center.sciprog.maps.coordinates.*
|
||||
import center.sciprog.maps.features.CoordinateSpace
|
||||
import center.sciprog.maps.features.Rectangle
|
||||
import center.sciprog.maps.features.ViewPoint
|
||||
import space.kscience.kmath.geometry.Angle
|
||||
import space.kscience.kmath.geometry.radians
|
||||
import space.kscience.maps.coordinates.*
|
||||
import space.kscience.maps.features.CoordinateSpace
|
||||
import space.kscience.maps.features.Rectangle
|
||||
import space.kscience.maps.features.ViewPoint
|
||||
import kotlin.math.abs
|
||||
import kotlin.math.floor
|
||||
import kotlin.math.pow
|
||||
|
@ -6,11 +6,10 @@ import androidx.compose.ui.graphics.vector.ImageVector
|
||||
import androidx.compose.ui.unit.Dp
|
||||
import androidx.compose.ui.unit.DpSize
|
||||
import androidx.compose.ui.unit.dp
|
||||
import center.sciprog.maps.coordinates.*
|
||||
import center.sciprog.maps.features.*
|
||||
import org.jetbrains.skia.Font
|
||||
import space.kscience.kmath.geometry.Angle
|
||||
import space.kscience.maps.coordinates.*
|
||||
import space.kscience.maps.features.*
|
||||
import kotlin.math.ceil
|
||||
|
||||
|
||||
|
@ -9,19 +9,8 @@ The core interfaces of KMath.
|
||||
|
||||
## Artifact:
|
||||
|
||||
The Maven coordinates of this project are `center.sciprog:maps-kt-core:0.2.2`.
|
||||
The Maven coordinates of this project are `space.kscience:maps-kt-core:0.3.0`.
|
||||
|
||||
**Gradle Groovy:**
|
||||
```groovy
|
||||
repositories {
|
||||
maven { url 'https://repo.kotlin.link' }
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'center.sciprog:maps-kt-core:0.2.2'
|
||||
}
|
||||
```
|
||||
**Gradle Kotlin DSL:**
|
||||
```kotlin
|
||||
repositories {
|
||||
@ -30,6 +19,6 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("center.sciprog:maps-kt-core:0.2.2")
|
||||
implementation("space.kscience:maps-kt-core:0.3.0")
|
||||
}
|
||||
```
|
||||
|
@ -6,19 +6,8 @@
|
||||
|
||||
## Artifact:
|
||||
|
||||
The Maven coordinates of this project are `center.sciprog:maps-kt-features:0.2.2`.
|
||||
The Maven coordinates of this project are `space.kscience:maps-kt-features:0.3.0`.
|
||||
|
||||
**Gradle Groovy:**
|
||||
```groovy
|
||||
repositories {
|
||||
maven { url 'https://repo.kotlin.link' }
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'center.sciprog:maps-kt-features:0.2.2'
|
||||
}
|
||||
```
|
||||
**Gradle Kotlin DSL:**
|
||||
```kotlin
|
||||
repositories {
|
||||
@ -27,6 +16,6 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("center.sciprog:maps-kt-features:0.2.2")
|
||||
implementation("space.kscience:maps-kt-features:0.3.0")
|
||||
}
|
||||
```
|
||||
|
@ -1,6 +1,7 @@
|
||||
plugins {
|
||||
id("space.kscience.gradle.mpp")
|
||||
id("org.jetbrains.compose")
|
||||
alias(spclibs.plugins.compose.compiler)
|
||||
alias(spclibs.plugins.compose.jb)
|
||||
`maven-publish`
|
||||
}
|
||||
|
||||
@ -26,19 +27,13 @@ kscience {
|
||||
useSerialization(sourceSet = space.kscience.gradle.DependencySourceSet.TEST) {
|
||||
protobuf()
|
||||
}
|
||||
}
|
||||
|
||||
kotlin {
|
||||
sourceSets {
|
||||
commonMain {
|
||||
dependencies {
|
||||
api(projects.trajectoryKt)
|
||||
api(compose.runtime)
|
||||
api(compose.foundation)
|
||||
api(compose.material)
|
||||
api(compose.ui)
|
||||
api("io.github.oshai:kotlin-logging:6.0.3")
|
||||
}
|
||||
}
|
||||
commonMain{
|
||||
api(projects.trajectoryKt)
|
||||
api(compose.runtime)
|
||||
api(compose.foundation)
|
||||
api(compose.material)
|
||||
api(compose.ui)
|
||||
api("io.github.oshai:kotlin-logging:6.0.3")
|
||||
}
|
||||
}
|
@ -7,7 +7,7 @@ import androidx.compose.ui.input.pointer.*
|
||||
import androidx.compose.ui.unit.DpOffset
|
||||
import androidx.compose.ui.unit.DpRect
|
||||
import androidx.compose.ui.unit.dp
|
||||
import center.sciprog.maps.features.*
|
||||
import space.kscience.maps.features.*
|
||||
import kotlin.math.max
|
||||
import kotlin.math.min
|
||||
|
||||
|
@ -20,7 +20,7 @@ public fun <T : Any> FeatureGroup<T>.draggableLine(
|
||||
bId.resolve().center,
|
||||
Attributes<FeatureGroup<T>> {
|
||||
ZAttribute(-10f)
|
||||
lineId?.attributes?.let { from(it) }
|
||||
lineId?.attributes?.let { putAll(it) }
|
||||
}
|
||||
)
|
||||
)
|
||||
@ -53,7 +53,7 @@ public fun <T : Any> FeatureGroup<T>.draggableMultiLine(
|
||||
points.map { it.resolve().center },
|
||||
Attributes<FeatureGroup<T>>{
|
||||
ZAttribute(-10f)
|
||||
polygonId?.attributes?.let { from(it) }
|
||||
polygonId?.attributes?.let { putAll(it) }
|
||||
}
|
||||
)
|
||||
)
|
||||
|
@ -52,7 +52,7 @@ public fun <T : Any, F : Feature<T>> FeatureRef<T, F>.modifyAttributes(
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
parent.feature(
|
||||
id,
|
||||
resolve().withAttributes { modify(modification) } as F
|
||||
resolve().withAttributes { modified(modification) } as F
|
||||
)
|
||||
return this
|
||||
}
|
||||
|
@ -12,7 +12,6 @@ import space.kscience.AttributesSerializer
|
||||
import space.kscience.NameAttribute
|
||||
import space.kscience.SerializableAttribute
|
||||
import space.kscience.attributes.Attributes
|
||||
import space.kscience.equals
|
||||
import kotlin.test.Ignore
|
||||
import kotlin.test.Test
|
||||
import kotlin.test.assertEquals
|
||||
|
@ -6,19 +6,8 @@
|
||||
|
||||
## Artifact:
|
||||
|
||||
The Maven coordinates of this project are `center.sciprog:maps-kt-geojson:0.2.2`.
|
||||
The Maven coordinates of this project are `space.kscience:maps-kt-geojson:0.3.0`.
|
||||
|
||||
**Gradle Groovy:**
|
||||
```groovy
|
||||
repositories {
|
||||
maven { url 'https://repo.kotlin.link' }
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'center.sciprog:maps-kt-geojson:0.2.2'
|
||||
}
|
||||
```
|
||||
**Gradle Kotlin DSL:**
|
||||
```kotlin
|
||||
repositories {
|
||||
@ -27,6 +16,6 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("center.sciprog:maps-kt-geojson:0.2.2")
|
||||
implementation("space.kscience:maps-kt-geojson:0.3.0")
|
||||
}
|
||||
```
|
||||
|
@ -1,10 +1,10 @@
|
||||
package space.kscience.maps.geojson
|
||||
|
||||
import center.sciprog.maps.geojson.GeoJson.Companion.PROPERTIES_KEY
|
||||
import center.sciprog.maps.geojson.GeoJson.Companion.TYPE_KEY
|
||||
import center.sciprog.maps.geojson.GeoJsonFeatureCollection.Companion.FEATURES_KEY
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.json.*
|
||||
import space.kscience.maps.geojson.GeoJson.Companion.PROPERTIES_KEY
|
||||
import space.kscience.maps.geojson.GeoJson.Companion.TYPE_KEY
|
||||
import space.kscience.maps.geojson.GeoJsonFeatureCollection.Companion.FEATURES_KEY
|
||||
import kotlin.jvm.JvmInline
|
||||
|
||||
/**
|
||||
|
@ -1,9 +1,9 @@
|
||||
package space.kscience.maps.geojson
|
||||
|
||||
import center.sciprog.maps.geojson.GeoJsonGeometry.Companion.COORDINATES_KEY
|
||||
import kotlinx.serialization.json.*
|
||||
import space.kscience.maps.coordinates.Gmc
|
||||
import space.kscience.maps.coordinates.meters
|
||||
import space.kscience.maps.geojson.GeoJsonGeometry.Companion.COORDINATES_KEY
|
||||
import kotlin.jvm.JvmInline
|
||||
|
||||
public sealed interface GeoJsonGeometry : GeoJson {
|
||||
|
@ -1,12 +1,12 @@
|
||||
package space.kscience.maps.geojson
|
||||
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import center.sciprog.maps.features.*
|
||||
import kotlinx.serialization.json.contentOrNull
|
||||
import kotlinx.serialization.json.intOrNull
|
||||
import kotlinx.serialization.json.jsonPrimitive
|
||||
import space.kscience.NameAttribute
|
||||
import space.kscience.maps.coordinates.Gmc
|
||||
import space.kscience.maps.features.*
|
||||
|
||||
|
||||
/**
|
||||
|
@ -1,11 +1,11 @@
|
||||
package space.kscience.maps.geojson
|
||||
|
||||
import center.sciprog.maps.features.Feature
|
||||
import center.sciprog.maps.features.FeatureGroup
|
||||
import center.sciprog.maps.features.FeatureRef
|
||||
import kotlinx.serialization.json.Json
|
||||
import kotlinx.serialization.json.jsonObject
|
||||
import space.kscience.maps.coordinates.Gmc
|
||||
import space.kscience.maps.features.Feature
|
||||
import space.kscience.maps.features.FeatureGroup
|
||||
import space.kscience.maps.features.FeatureRef
|
||||
import java.net.URL
|
||||
|
||||
/**
|
||||
|
@ -1,9 +1,9 @@
|
||||
package center.sciprog.maps.geotiff
|
||||
|
||||
import center.sciprog.maps.coordinates.Gmc
|
||||
import center.sciprog.maps.features.Feature
|
||||
import center.sciprog.maps.features.FeatureGroup
|
||||
import center.sciprog.maps.features.FeatureRef
|
||||
import space.kscience.maps.coordinates.Gmc
|
||||
import space.kscience.maps.features.Feature
|
||||
import space.kscience.maps.features.FeatureGroup
|
||||
import space.kscience.maps.features.FeatureRef
|
||||
import kotlinx.serialization.json.Json
|
||||
import kotlinx.serialization.json.jsonObject
|
||||
import org.geotools.gce.geotiff.GeoTiffReader
|
||||
|
@ -6,19 +6,8 @@
|
||||
|
||||
## Artifact:
|
||||
|
||||
The Maven coordinates of this project are `center.sciprog:maps-kt-scheme:0.2.2`.
|
||||
The Maven coordinates of this project are `space.kscience:maps-kt-scheme:0.3.0`.
|
||||
|
||||
**Gradle Groovy:**
|
||||
```groovy
|
||||
repositories {
|
||||
maven { url 'https://repo.kotlin.link' }
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'center.sciprog:maps-kt-scheme:0.2.2'
|
||||
}
|
||||
```
|
||||
**Gradle Kotlin DSL:**
|
||||
```kotlin
|
||||
repositories {
|
||||
@ -27,6 +16,6 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("center.sciprog:maps-kt-scheme:0.2.2")
|
||||
implementation("space.kscience:maps-kt-scheme:0.3.0")
|
||||
}
|
||||
```
|
||||
|
@ -1,6 +1,7 @@
|
||||
plugins {
|
||||
id("space.kscience.gradle.mpp")
|
||||
id("org.jetbrains.compose")
|
||||
alias(spclibs.plugins.compose.compiler)
|
||||
alias(spclibs.plugins.compose.jb)
|
||||
`maven-publish`
|
||||
}
|
||||
|
||||
@ -8,24 +9,17 @@ kscience{
|
||||
jvm()
|
||||
// js()
|
||||
wasm()
|
||||
}
|
||||
|
||||
kotlin {
|
||||
sourceSets {
|
||||
commonMain {
|
||||
dependencies {
|
||||
api(projects.mapsKtFeatures)
|
||||
}
|
||||
}
|
||||
getByName("jvmMain"){
|
||||
dependencies {
|
||||
implementation("org.jfree:org.jfree.svg:5.0.4")
|
||||
api(compose.desktop.currentOs)
|
||||
}
|
||||
}
|
||||
commonMain{
|
||||
api(projects.mapsKtFeatures)
|
||||
}
|
||||
jvmMain{
|
||||
implementation("org.jfree:org.jfree.svg:5.0.4")
|
||||
api(compose.desktop.currentOs)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//java {
|
||||
// targetCompatibility = JVM_TARGET
|
||||
//}
|
@ -4,9 +4,9 @@ import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.DpSize
|
||||
import center.sciprog.maps.compose.canvasControls
|
||||
import center.sciprog.maps.features.*
|
||||
import io.github.oshai.kotlinlogging.KotlinLogging
|
||||
import space.kscience.maps.compose.canvasControls
|
||||
import space.kscience.maps.features.*
|
||||
import kotlin.math.min
|
||||
|
||||
|
||||
|
@ -2,10 +2,10 @@ package space.kscience.maps.scheme
|
||||
|
||||
import androidx.compose.ui.unit.DpSize
|
||||
import androidx.compose.ui.unit.dp
|
||||
import center.sciprog.maps.features.CoordinateSpace
|
||||
import center.sciprog.maps.features.Rectangle
|
||||
import center.sciprog.maps.features.ViewPoint
|
||||
import space.kscience.kmath.geometry.Vector2D
|
||||
import space.kscience.maps.features.CoordinateSpace
|
||||
import space.kscience.maps.features.Rectangle
|
||||
import space.kscience.maps.features.ViewPoint
|
||||
import kotlin.math.abs
|
||||
import kotlin.math.max
|
||||
import kotlin.math.min
|
||||
|
@ -1,11 +1,12 @@
|
||||
package space.kscience.maps.scheme
|
||||
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.unit.Dp
|
||||
import androidx.compose.ui.unit.DpOffset
|
||||
import androidx.compose.ui.unit.DpRect
|
||||
import androidx.compose.ui.unit.dp
|
||||
import center.sciprog.maps.features.*
|
||||
import space.kscience.maps.features.*
|
||||
import kotlin.math.min
|
||||
|
||||
public class XYCanvasState(
|
||||
|
@ -3,9 +3,9 @@ package space.kscience.maps.scheme
|
||||
import androidx.compose.ui.unit.DpOffset
|
||||
import androidx.compose.ui.unit.DpSize
|
||||
import androidx.compose.ui.unit.dp
|
||||
import center.sciprog.maps.features.CoordinateSpace
|
||||
import center.sciprog.maps.features.Rectangle
|
||||
import center.sciprog.maps.features.ViewPoint
|
||||
import space.kscience.maps.features.CoordinateSpace
|
||||
import space.kscience.maps.features.Rectangle
|
||||
import space.kscience.maps.features.ViewPoint
|
||||
import kotlin.math.abs
|
||||
import kotlin.math.pow
|
||||
|
||||
|
@ -8,9 +8,9 @@ import androidx.compose.ui.graphics.vector.ImageVector
|
||||
import androidx.compose.ui.unit.Dp
|
||||
import androidx.compose.ui.unit.DpSize
|
||||
import androidx.compose.ui.unit.dp
|
||||
import center.sciprog.maps.features.*
|
||||
import space.kscience.attributes.Attributes
|
||||
import space.kscience.kmath.geometry.Angle
|
||||
import space.kscience.maps.features.*
|
||||
import kotlin.math.ceil
|
||||
|
||||
internal fun Pair<Number, Number>.toCoordinates(): XY = XY(first.toFloat(), second.toFloat())
|
||||
|
@ -12,10 +12,10 @@ import androidx.compose.ui.graphics.painter.Painter
|
||||
import androidx.compose.ui.unit.IntOffset
|
||||
import androidx.compose.ui.unit.IntSize
|
||||
import androidx.compose.ui.unit.LayoutDirection
|
||||
import center.sciprog.maps.features.*
|
||||
import center.sciprog.maps.scheme.XY
|
||||
import org.jfree.svg.SVGGraphics2D
|
||||
import space.kscience.attributes.Attributes
|
||||
import space.kscience.maps.features.*
|
||||
import space.kscience.maps.scheme.XY
|
||||
import java.awt.BasicStroke
|
||||
import java.awt.geom.*
|
||||
import java.awt.image.AffineTransformOp
|
||||
|
@ -4,11 +4,11 @@ import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.graphics.painter.Painter
|
||||
import androidx.compose.ui.unit.DpSize
|
||||
import androidx.compose.ui.unit.dp
|
||||
import center.sciprog.maps.features.*
|
||||
import center.sciprog.maps.scheme.XY
|
||||
import center.sciprog.maps.scheme.XYCanvasState
|
||||
import org.jfree.svg.SVGGraphics2D
|
||||
import org.jfree.svg.SVGUtils
|
||||
import space.kscience.maps.features.*
|
||||
import space.kscience.maps.scheme.XY
|
||||
import space.kscience.maps.scheme.XYCanvasState
|
||||
|
||||
|
||||
public class FeatureStateSnapshot<T : Any>(
|
||||
|
@ -5,8 +5,6 @@ enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
|
||||
pluginManagement {
|
||||
|
||||
val toolsVersion: String by extra
|
||||
val composeVersion = extra["compose.version"] as String
|
||||
val agpVersion = extra["agp.version"] as String
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
@ -20,13 +18,9 @@ pluginManagement {
|
||||
plugins {
|
||||
// id("com.android.application").version(extra["agp.version"] as String)
|
||||
// id("com.android.library").version(extra["agp.version"] as String)
|
||||
id("org.jetbrains.compose") version composeVersion
|
||||
id("space.kscience.gradle.project") version toolsVersion
|
||||
id("space.kscience.gradle.mpp") version toolsVersion
|
||||
id("space.kscience.gradle.jvm") version toolsVersion
|
||||
id("space.kscience.gradle.js") version toolsVersion
|
||||
id("com.android.application") version agpVersion
|
||||
id("com.android.library") version agpVersion
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,19 +5,8 @@
|
||||
|
||||
## Artifact:
|
||||
|
||||
The Maven coordinates of this project are `space.kscience:trajectory-kt:0.2.2`.
|
||||
The Maven coordinates of this project are `space.kscience:trajectory-kt:0.3.0`.
|
||||
|
||||
**Gradle Groovy:**
|
||||
```groovy
|
||||
repositories {
|
||||
maven { url 'https://repo.kotlin.link' }
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'space.kscience:trajectory-kt:0.2.2'
|
||||
}
|
||||
```
|
||||
**Gradle Kotlin DSL:**
|
||||
```kotlin
|
||||
repositories {
|
||||
@ -26,7 +15,7 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("space.kscience:trajectory-kt:0.2.2")
|
||||
implementation("space.kscience:trajectory-kt:0.3.0")
|
||||
}
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user