Compass 🧭
GithubReferenceMaven
  • 🧭Compass
  • 🖥️Artifacts
  • 🚗Roadmap
  • Setup
    • 📇All Dependencies
    • 🤖Android / iOS
    • 📱Mixed platforms
  • Geocoding
    • 🌎Geocoding Overview
    • 📈Web API Service
      • Google Maps
      • Mapbox
    • ❓Request a Geocoder API
  • Geolocation
    • 📍Geolocation Overview
    • 🔍Geolocator
    • 🌐Location
    • 📱Android / iOS
    • 🖥️Browser
  • Autocomplete
    • 🔍Autocomplete Overview
    • 🌎Via Geocoding
      • 📱Android / iOS
      • 📈Web API Service
  • Misc
    • 📲Demo
    • 💾Contributing
    • 🔧Compass Reference
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. Geocoding

Geocoding Overview

PreviousMixed platformsNextWeb API Service

Last updated 1 year ago

Was this helpful?

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 and 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.

🌎
Google Maps
Mapbox