Skip to content

Introduction

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.

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.

  • Google Maps: GoogleMapViewStateImpl / GoogleMapView
  • Mapbox: MapboxViewStateImpl / MapboxMapView
  • HERE Maps: HereViewStateImpl / HereMapView
  • ArcGIS: ArcGISMapViewStateImpl / ArcGISMapView
  • MapLibre: MapLibreViewStateImpl / MapLibreMapView

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)

The SDK provides the following core components:

  1. Map View Components: Provider-specific map view components (GoogleMapView, MapboxMapView, HereMapView, ArcGISMapView, MapLibreMapView)
  2. Marker: Point markers with customizable icons and interactions
  3. Circle: Circular overlays with styling options
  4. Polyline: Line segments connecting multiple points
  5. Polygon: Filled shapes with stroke and fill styling
  6. GroundImage: Image overlays positioned geographically (Google Maps only)

To use MapConductor in your project:

See the Get Started page for complete dependency information and version details.

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:

You only need to configure the SDKs you plan to use in your application.

Create a map view with a marker and a circle:

@Composable
fun 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)
)
}
}

a marker with a circle are drew on the map

To switch between map providers, simply change the MapViewState implementation:

// Google Maps
val googleMapState = rememberGoogleMapViewState()
// Mapbox
val mapboxState = rememberMapboxMapViewState()
// HERE Maps
val hereState = rememberHereMapViewState()
// ArcGIS
val arcgisState = rememberArcGISMapViewState()
// MapLibre
val mapLibreState = rememberMapLibreMapViewState()

The rest of your code remains the same – all components work consistently across providers.

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

Compared to v1.0.0, v1.1.0 includes:

  • Unified camera move event handling (onCameraMoveStart, onCameraMove, onCameraMoveEnd) across all providers
  • Improved MapViewState camera position handling and VisibleRegion integration
  • Refactored marker controller interfaces for clearer provider integrations
  • Expanded example app with advanced camera control and VisibleRegion usage examples