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.
Prerequisites
Section titled “Prerequisites”- Android development environment
- ArcGIS developer account
- ArcGIS API key
Setup Steps
Section titled “Setup Steps”1. ArcGIS Developer Dashboard Configuration
Section titled “1. ArcGIS Developer Dashboard Configuration”- Sign up for an ArcGIS Developer account
- Go to the ArcGIS Developer Dashboard
- Create a new application or select an existing one
- Generate an API key with appropriate scopes
- Note the API key for use in your app
2. Gradle Configuration
Section titled “2. Gradle Configuration”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.ktsplugins { // ... 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.
3. Android Manifest Configuration
Section titled “3. Android Manifest Configuration”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>4. API Key Configuration
Section titled “4. API Key Configuration”Add your actual API key to your secrets.properties file:
ARCGIS_API_KEY=your_actual_arcgis_api_key_hereImportant:
- Never commit your
secrets.propertiesfile to version control. Add it to.gitignore. - The Secrets Gradle Plugin automatically replaces
${ARCGIS_API_KEY}in yourAndroidManifest.xmlwith the actual value from this file.
5. License Configuration
Section titled “5. License Configuration”ArcGIS SDK requires proper license configuration. Set the license in your application:
// In your Application class or MainActivityArcGISEnvironment.setApiKey("your_api_key_here")
// For development/testing// ArcGISEnvironment.setLicense("your_license_key_here") // Optional for basic useFor production apps, consider using a Named User License or License Key.
Verification
Section titled “Verification”To verify your ArcGIS setup:
- Build and run your app
- Check that the ArcGIS map displays correctly
- Test GIS-specific features (if using)
- Verify authentication is working
@Composablefun TestArcGIS() { val mapState = rememberArcGISMapViewState()
ArcGISMapView(state = mapState) { // If this displays correctly, your setup is working }}Troubleshooting
Section titled “Troubleshooting”Common Issues
Section titled “Common Issues”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
Next Steps
Section titled “Next Steps”Once ArcGIS Maps SDK is properly configured, you can use MapConductor’s ArcGISMapView component with the unified API.