Quickstart
A Jetpack Compose app for Android that shows a topographic map and draws the Tour du Mont-Blanc on it.
You need Android Studio with Kotlin 2.4 or newer, and an emulator or device on Android 7.0 (API 24) or later. You also need a publishable key with the tiles and publishing scopes, from Organization → API keys in the Mountaya app.
Create an Empty Activity project in Android Studio. In the app's build.gradle.kts, set compileSdk = 37 and add the modules:
Declare android.permission.INTERNET in AndroidManifest.xml.
Put the key in an .env file beside the app's build script, and list it in .gitignore:
Hand it to the app as a BuildConfig field, read from the environment, else from .env:
Replace MainActivity.kt with this:
Replace TrailMap with this version. It draws the Tour du Mont-Blanc and fits the camera to it:
Run the app on an emulator or a device:
The map opens on the Tour du Mont-Blanc, with the Mountaya watermark in its top-left corner.