Introduction
MapConductor Android SDK Documentation
Section titled “MapConductor Android SDK Documentation”MapConductor is a unified mapping library that provides a common API for multiple map providers including Google Maps, Mapbox, HERE, ArcGIS, and MapLibre. This documentation covers the public API components available through Maven distribution for v1.1.2.
Overview
Section titled “Overview”The MapConductor SDK allows you to use a single API to work with different map providers. The SDK automatically handles provider-specific implementations while providing a consistent interface for your application.
Supported Map Providers
Section titled “Supported Map Providers”- Google Maps:
GoogleMapViewStateImpl/GoogleMapView - Mapbox:
MapboxViewStateImpl/MapboxMapView - HERE Maps:
HereViewStateImpl/HereMapView - ArcGIS:
ArcGISMapViewStateImpl/ArcGISMapView - MapLibre:
MapLibreViewStateImpl/MapLibreMapView
Core Classes
Section titled “Core Classes”The SDK provides fundamental geographic classes:
- GeoPoint: Represents geographic coordinates (latitude, longitude, altitude)
- GeoRectBounds: Defines rectangular geographic areas with southwest/northeast corners
- MapCameraPosition: Represents camera position (target, zoom, bearing, tilt, paddings)
Key Components
Section titled “Key Components”The SDK provides the following core components:
- Map View Components: Provider-specific map view components (GoogleMapView, MapboxMapView, HereMapView, ArcGISMapView, MapLibreMapView)
- Marker: Point markers with customizable icons and interactions
- Circle: Circular overlays with styling options
- Polyline: Line segments connecting multiple points
- Polygon: Filled shapes with stroke and fill styling
- GroundImage: Image overlays positioned geographically (Google Maps only)
Getting Started
Section titled “Getting Started”To use MapConductor in your project:
1. Installation
Section titled “1. Installation”See the Get Started page for complete dependency information and version details.
2. SDK-Specific Setup
Section titled “2. SDK-Specific Setup”Important: MapConductor provides a unified API layer on top of existing map SDKs. You must set up each map SDK independently before using MapConductor’s integration.
Each map provider requires its own SDK setup with API keys, permissions, and configuration:
- Google Maps Setup – Configure Google Maps SDK with API keys and permissions
- Mapbox Setup – Set up Mapbox access tokens and style configuration
- HERE Maps Setup – Configure HERE SDK with API keys and licensing
- ArcGIS Maps Setup – Set up ArcGIS SDK with API keys and licensing
- MapLibre Setup – Configure tiles and style information
You only need to configure the SDKs you plan to use in your application.
3. Basic Usage
Section titled “3. Basic Usage”Create a map view with a marker and a circle:
@Composablefun BasicMapExample(modifier: Modifier = Modifier) { val sanFrancisco = GeoPointImpl.fromLatLong(37.7749, -122.4194) val camera = MapCameraPositionImpl( position = sanFrancisco, zoom = 13.0, ) // Replace with your map SDK provider // - Google Maps -> rememberGoogleMapViewState // - Mapbox -> rememberMapboxViewState // ... and so on val mapViewState = rememberGoogleMapViewState( cameraPosition = camera, )
// Replace MapView with your chosen map provider // - Google Maps -> GoogleMapView // - Mapbox -> MapboxMapView // ... and so on GoogleMapView( modifier = modifier, state = mapViewState, onMapClick = { geoPoint -> println("Map clicked at: ${geoPoint.latitude}, ${geoPoint.longitude}") }, onMarkerClick = { markerState -> println("Marker clicked: ${markerState.extra}") } ) { // Add a marker Marker( position = sanFrancisco, icon = DefaultIcon(label = "SF"), extra = "San Francisco marker" )
// Add a circle Circle( center = sanFrancisco, radiusMeters = 1000.0, strokeColor = Color.Blue, fillColor = Color.Blue.copy(alpha = 0.3f) ) }}
4. Switching Map Providers
Section titled “4. Switching Map Providers”To switch between map providers, simply change the MapViewState implementation:
// Google Mapsval googleMapState = rememberGoogleMapViewState()
// Mapboxval mapboxState = rememberMapboxMapViewState()
// HERE Mapsval hereState = rememberHereMapViewState()
// ArcGISval arcgisState = rememberArcGISMapViewState()
// MapLibreval mapLibreState = rememberMapLibreMapViewState()The rest of your code remains the same – all components work consistently across providers.
What’s New in v1.1.2
Section titled “What’s New in v1.1.2”Compared to v1.1.0, v1.1.2 includes:
- Fixed a bug where InfoBubble display position was not recalculated when moving the map’s visible region
What’s New in v1.1.0
Section titled “What’s New in v1.1.0”Compared to v1.0.0, v1.1.0 includes:
- Unified camera move event handling (
onCameraMoveStart,onCameraMove,onCameraMoveEnd) across all providers - Improved
MapViewStatecamera position handling andVisibleRegionintegration - Refactored marker controller interfaces for clearer provider integrations
- Expanded example app with advanced camera control and
VisibleRegionusage examples