Skip to content

ArcGIS Maps Setup

This section describes the setup steps for integrating the ArcGIS Maps SDK with MapConductor.

  • 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 Maven repository is configured (this repository already includes it in settings.gradle.kts):

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 or build.gradle:

// (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 or build.gradle:

App/build.gradle.kts
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 for version management (v1.1.3)
implementation(platform("com.mapconductor:mapconductor-bom:1.1.3"))
// MapConductor modules (versions managed by BOM)
implementation("com.mapconductor:core")
implementation("com.mapconductor:for-arcgis")
}

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

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

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. The Secrets Gradle Plugin automatically replaces ${ARCGIS_API_KEY} in your AndroidManifest.xml with the actual value from this file.

secrets.properties
ARCGIS_API_KEY=your_actual_arcgis_api_key_here

ArcGIS SDK requires proper license configuration. Configure licensing in your application:

// In your Application class or MainActivity
// ArcGISEnvironment.setLicense("your_license_key_here") // Optional for basic use

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 state = rememberArcGISMapViewState(
cameraPosition =
MapCameraPosition(
position = GeoPoint.fromLatLong(0.0, 0.0),
zoom = 5.0,
),
)
ArcGISMapView(
modifier = modifier,
state = state,
) {
// If this displays correctly, your setup is working
}
}

ArcGIS setup verification

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.