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
  • Obtain an API key
  • Create the Geocoder

Was this helpful?

Edit on GitHub
  1. Geocoding
  2. Web API Service

Mapbox

PreviousGoogle MapsNextRequest a Geocoder API

Last updated 1 year ago

Was this helpful?

To use as your geocoding backend you will need to do the following:

Obtain an API key

Create an account for , then copy your access token.

Create the Geocoder

Simple pass your API key to the Geocoder function:

val geocoder = MapboxGeocoder(apiKey = "your-api-key")

// Or this helper function
val geocoder = Geocoder(apiKey = "your-api-key")

Customizing Google Maps request

The Mapbox geocoding API has some You can modify these by passing them into the Geocoder function:

val geocoder = MapboxGeocoder(apiKey = "your-api-key") {
    limit = 3
}
📈
Mapbox API
Mapbox
optional parameters.