Skip to content

ArcGIS Maps Setup

This section covers the setup process for ArcGIS Maps SDK integration with MapConductor.

Important: MapConductor provides a unified API layer on top of existing map SDKs. You must set up the ArcGIS Maps SDK independently before using MapConductor’s ArcGIS integration.

  • Android development environment
  • ArcGIS developer account
  • ArcGIS API key

1. ArcGIS Developer Dashboard Configuration

Section titled “1. ArcGIS Developer Dashboard Configuration”
  1. Sign up for an ArcGIS Developer account
  2. Go to the ArcGIS Developer Dashboard
  3. Create a new application or select an existing one
  4. Generate an API key with appropriate scopes
  5. Note the API key for use in your app

Ensure the Esri repository is configured (already present in this repository’s settings.gradle.kts):

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 to your project’s root build.gradle.kts:

plugins {
id("com.google.android.libraries.mapsplatform.secrets-gradle-plugin") version "2.0.1" apply false
}

Then, add the dependencies and apply the plugin in your app’s build.gradle.kts:

// App build.gradle.kts
plugins {
// ... other plugins
id("com.google.android.libraries.mapsplatform.secrets-gradle-plugin")
}
dependencies {
// ArcGIS Maps SDK (version managed via libs.versions.toml)
implementation(platform(libs.arcgis.maps.kotlin.toolkit.bom))
implementation(libs.arcgis.maps.kotlin)
implementation(libs.arcgis.maps.kotlin.toolkit.geoview.compose)
implementation(libs.arcgis.maps.kotlin.toolkit.authentication)
// MapConductor BOM for version management (v1.1.2)
implementation(platform("com.mapconductor:mapconductor-bom:1.1.2"))
// MapConductor modules (versions managed by BOM)
implementation("com.mapconductor:core")
implementation("com.mapconductor:for-arcgis")
}

The Secrets Gradle Plugin can read your secrets.properties file and inject values into your AndroidManifest.xml at build time.

Add the ArcGIS API key placeholder to your AndroidManifest.xml:

<application>
<!-- ArcGIS API Key -->
<meta-data
android:name="ARCGIS_API_KEY"
android:value="${ARCGIS_API_KEY}" />
<!-- 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>

Add your actual API key to your secrets.properties file:

secrets.properties
ARCGIS_API_KEY=your_actual_arcgis_api_key_here

Important:

  • Never commit your secrets.properties file to version control. Add it to .gitignore.
  • The Secrets Gradle Plugin automatically replaces ${ARCGIS_API_KEY} in your AndroidManifest.xml with the actual value from this file.

ArcGIS SDK requires proper license configuration. Set the license in your application:

// In your Application class or MainActivity
ArcGISEnvironment.setApiKey("your_api_key_here")
// For development/testing
// ArcGISEnvironment.setLicense("your_license_key_here") // Optional for basic use

For production apps, consider using a Named User License or License Key.

To verify your ArcGIS setup:

  1. Build and run your app
  2. Check that the ArcGIS map displays correctly
  3. Test GIS-specific features (if using)
  4. Verify authentication is working
@Composable
fun TestArcGIS() {
val mapState = rememberArcGISMapViewState()
ArcGISMapView(state = mapState) {
// If this displays correctly, your setup is working
}
}

Map not loading

  • Verify API key is correct in secrets.properties
  • Check that the API key has proper scopes in ArcGIS Dashboard

License errors

  • Ensure ArcGISEnvironment.setApiKey() is called before using the map
  • For production apps, configure proper licensing according to Esri documentation

Build errors

  • Ensure ArcGIS SDK coordinates match your project configuration
  • Verify BOM is used for version management
  • Check that Compose toolkit dependencies are included

Once ArcGIS Maps SDK is properly configured, you can use MapConductor’s ArcGISMapView component with the unified API.