MapTiler setup
How to drive MapTiler's official Android SDK (com.maptiler:maptiler-sdk-kotlin) through MapConductor, picking MapTiler Cloud reference styles by name.
Before you start
Get an API key
Issue an API key from the MapTiler Cloud dashboard. There is a free tier.
Add the dependencies
The MapTiler SDK is available from Maven Central.
dependencies {
// MapTiler Android SDK
implementation("com.maptiler:maptiler-sdk-kotlin:2.1.0")
// MapConductor BOM pins every module below
implementation(platform("com.mapconductor:mapconductor-bom:1.2.0"))
implementation("com.mapconductor:core")
implementation("com.mapconductor:for-maptiler")
}Hand over the API key
The module reads the key from a manifest meta-data entry — use a placeholder if you route it through the Secrets Gradle Plugin. You can also set it in code.
<manifest>
<uses-permission android:name="android.permission.INTERNET" />
<application>
<meta-data
android:name="MAPTILER_API_KEY"
android:value="${MAPTILER_API_KEY}" />
</application>
</manifest>// Alternative: set it in code before the first map is shown com.maptiler.maptilersdk.MTConfig.apiKey = "YOUR_MAPTILER_API_KEY"
VERIFY
What you should see
Pick a style and render the map. Tiles loading means you are done.
@Composable
fun TestMapTiler(modifier: Modifier = Modifier) {
val mapState = rememberMapTilerMapViewState(
mapDesign = MapTilerDesign.Streets,
cameraPosition = MapCameraPosition(
position = GeoPoint(35.6812, 139.7671),
zoom = 11.0,
),
)
// If the map appears, the setup is correct.
MapTilerMapView(state = mapState, modifier = modifier)
}Map designs
MapTilerDesign enumerates the MapTiler Cloud reference styles as they are.
Troubleshooting
The map stays blank
- Check the manifest's MAPTILER_API_KEY actually resolved to a value.
- Confirm the key is active in MapTiler Cloud and you are within your quota.
- Confirm the INTERNET permission is present.
The build fails
- Check that the map SDK coordinates and version match what your version catalog declares.
- Make sure the repository is declared in settings.gradle.kts — with repositoriesMode set to FAIL_ON_PROJECT_REPOS, per-module repositories blocks are ignored.
- If several map SDKs are present at once, look for dependency clashes with ./gradlew :app:dependencies.
Next
Markers, polylines, polygons, circles, ground images, raster layers and info bubbles all work through the shared API. Because MapTiler's Android SDK runs MapLibre GL JS in a WebView, shapes are added to the style as GeoJSON sources with fill and line layers — geodesic interpolation and hole handling come from the shared core, so the result matches the other providers.