Skip to content

Kotlin-first SDK for Yandex MapKit. It's API is similar to the Yandex MapKit SDK but also supports multiplatform projects and compose multiplaform, enabling you to use MapKit directly from your common source targeting iOS or Android.

License

Notifications You must be signed in to change notification settings

SuLG-ik/yandex-mapkit-kmp

Repository files navigation

Yandex MapKit KMP SDK

Kotlin Compose Multiplatform Maven Central License badge-android badge-ios

Kotlin-first SDK for Yandex MapKit. It's API is similar to the Yandex MapKit SDK but also supports multiplatform projects and compose multiplaform, enabling you to use MapKit directly from your common source targeting iOS or Android.

NOTE: It is not Yandex's project. Author has no connection with original SDK, it is wrapper above official Yandex MapKit SDK

Available libraries

The following libraries are available. It uses Yandex MapKit SDK version 4.8.1-lite

Module Gradle Dependency Description
Core ru.sulgik.mapkit:yandex-mapkit-kmp:0.1.1 Features of original Yandex MapKit SDK
Compose ru.sulgik.mapkit:yandex-mapkit-kmp-compose:0.1.1 Component to draw map and compose-resources usage as map images
Moko ru.sulgik.mapkit:yandex-mapkit-kmp-moko:0.1.1 Use moko-resources as map images. Requires native initialization
Moko Compose ru.sulgik.mapkit:yandex-mapkit-kmp-moko-compose:0.1.1 Use moko-resources as image provider. Not require native initialization

Installation

The minimum supported Android SDK is 26 (Android 8.0).

All modules are available for use in common code, but native API available only in native code.

On iOS the official Yandex MapKit SDK in not linked as a transtive dependency. Therefore, any project using this SDK needs to link the same Yandex MapKit SDK as well. This can be done through your preferred installation method (Cocoapods/SPM).

kotlin {
  cocoapods {
    pod("YandexMapsMobile") {
      version = "<mapkit-version>"
    }
  }
  sourceSets {
    commonMain.dependencies {
      implementation("ru.sulgik.mapkit:yandex-mapkit-kmp:<version>") // main module
      implementation("ru.sulgik.mapkit:yandex-mapkit-kmp-compose:<version>") // optional compose support
      implementation("ru.sulgik.mapkit:yandex-mapkit-kmp-moko:<version>") // optional: moko support
      implementation("ru.sulgik.mapkit:yandex-mapkit-kmp-moko-compose:<version>") // optional: moko compose resources support
    }
  }
}
cocoapods {
    pod("YandexMapsMobile") {
        version = "<version>"
    }
}

Documentation

Full documentation on page

About

Kotlin-first SDK for Yandex MapKit. It's API is similar to the Yandex MapKit SDK but also supports multiplatform projects and compose multiplaform, enabling you to use MapKit directly from your common source targeting iOS or Android.

Topics

Resources

License

Stars

Watchers

Forks

Languages