ArcGIS setup
How to drive the ArcGIS Maps SDK for Kotlin through MapConductor: add the Esri repository and pass the API key through the manifest. Both a 2D and a 3D view are available.
Before you start
Get an API key
- Create an ArcGIS developer account.
- Open the ArcGIS Developer Dashboard.
- Create an application and issue an API key with the scopes you need.
Add the Esri repository
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
// Esri public repository for ArcGIS Maps SDK
maven {
url = uri("https://esri.jfrog.io/artifactory/arcgis")
}
}
}Add the Secrets Gradle Plugin
This is how the key stays out of source control: the plugin reads secrets.properties and substitutes the value into the AndroidManifest.xml placeholder at build time.
plugins {
id("com.google.android.libraries.mapsplatform.secrets-gradle-plugin") version "2.0.1" apply false
}Add the dependencies
ArcGIS has its own BOM, and the Compose toolkit artifacts are required too.
plugins {
// ... other plugins
id("com.google.android.libraries.mapsplatform.secrets-gradle-plugin")
}
dependencies {
// ArcGIS Maps SDK
implementation(platform("com.esri:arcgis-maps-kotlin-toolkit-bom:200.7.0"))
implementation("com.esri:arcgis-maps-kotlin:200.7.0")
implementation("com.esri:arcgis-maps-kotlin-toolkit-geoview-compose")
implementation("com.esri:arcgis-maps-kotlin-toolkit-authentication")
// MapConductor BOM pins every module below
implementation(platform("com.mapconductor:mapconductor-bom:1.2.0"))
implementation("com.mapconductor:core")
implementation("com.mapconductor:for-arcgis")
}Wire the manifest and the key
<manifest>
<!-- Add internet and location permissions -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application>
<!-- ArcGIS API Key -->
<meta-data
android:name="ARCGIS_API_KEY"
android:value="${ARCGIS_API_KEY}" />
</application>
</manifest>ARCGIS_API_KEY=your_actual_arcgis_api_key_here
Set the license (production only)
Not needed for basic map display. For production, set the license as Esri's documentation describes.
// In your Application class or MainActivity
// ArcGISEnvironment.setLicense("your_license_key_here") // Optional for basic useVERIFY
What you should see
You are done when the ArcGIS map renders and zoom, pan and — on the 3D view — tilt all work.
@Composable
fun TestArcGIS(modifier: Modifier = Modifier) {
val mapState = rememberArcGISMapViewState(
cameraPosition = MapCameraPosition(
position = GeoPoint(35.6762, 139.6503),
zoom = 12.0,
),
)
// If the map appears, the setup is correct.
// ArcGISMapView is the 3D scene view; ArcGISMapView2D shares the same state.
ArcGISMapView(modifier = modifier, state = mapState)
}Map designs
ArcGISDesign maps onto Esri's basemaps. The list below is a selection — the type ships many more.
Troubleshooting
The map never loads
- Check the API key in secrets.properties.
- Confirm the key carries the required scopes in the Dashboard.
A licensing error appears
- For production, set up licensing as Esri's documentation describes.
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
ArcGISMapView is the 3D view and ArcGISMapView2D the 2D one. They share a state object, so you can switch between them at runtime.