🧭Compass

Overview

Compass is a Kotlin Multiplatform library location toolkit. It provides a set of tools for working with location data, including geocoding, reverse geocoding, and more. The library is built with a focus on simplicity and ease of use, providing a straightforward API for geocoding operations.

Features

Easy to use

Compass has a simple API:

suspend fun lookupCoordinates(latitude: Double, longitude: Double): Place? {
    val geocoder = Geocoder()
    val result: GeocoderResult<Place> = geocoder.reverse(latitude, longitude)
    return result.getOrNull()
}

The above Geocoder() function is one of many extension functions included to make your life easier. Behind the scenes a PlatformGeocoder is used to do all the heavy lifting, and can be created and provided on a per-platform basis.

You can learn more about geocoding here: Geocoding Overview

The above Geocoder()extension function is from the Android/iOS only artifact. If you plan on supporting other platforms, check out Mixed platforms.

Get Started

Here is a few good starting points to start using Compass!

📇Setup🖥️Artifacts📇All Dependencies

Last updated