🌎Geocoding Overview

Geocoding is the process of turning coordinates into a Place (reverse), or turning an address name into coordinates.

Compass offers the following features:

  • Reverse: Turn coordinates (latitude, longitude) into a Place object.

  • Forward: Turn an address search query into coordinates.

  • Android and iOS support, using built-in services.

  • Support for web based API services.

    • Currently support for Google Maps and Mapbox is included.

    • Easily create a wrapper for your own API.

Built-in services are used for Android and iOS. That means that there is restrictions to its usage. You can be throttled or blocked from using the geocoding services if you make too many requests in a short period of time.

Quick start

fun getPlaceFromCoordinates(lat: Long, lng: Long): Place? {
    val geocoder = Geocoder()
    return geocoder.placeOrNull()
}

In this quick example the Geocoder() function is a convenience function for creating a Geocoder object. Each of the geocoder-* artifacts provide one.

Last updated