MapConductor Heatmap is a map-implementation-agnostic heatmap overlay for the MapConductor SDK.
It renders heatmap data as a tile-based RasterLayer so it works with any map implementation (Google Maps, MapLibre, Mapbox, ArcGIS, HERE, etc.).
https://mapconductor.com/setup/
Place HeatmapOverlay inside any XxxMapView content block and add points with HeatmapPoint:
XxxMapView(...) {
HeatmapOverlay(
radiusPx =20,
opacity =0.7,
) {
HeatmapPoint(
position =GeoPoint(latitude =35.6762, longitude =139.6503),
weight =1.0,
)
HeatmapPoint(
position =GeoPoint(latitude =35.6895, longitude =139.6917),
weight =2.5,
)
}
}For large datasets, use HeatmapPoints to add all points in a single update:
val pointStates:List<HeatmapPointState> = remember { buildPointList() }
XxxMapView(...) {
HeatmapOverlay(radiusPx =20) {
HeatmapPoints(pointStates)
}
}Use HeatmapOverlayState to control heatmap properties dynamically:
val heatmapState = remember {
HeatmapOverlayState(
radiusPx =20,
opacity =0.7,
gradient =HeatmapGradient.DEFAULT,
)
}
// Update dynamically
heatmapState.radiusPx =30
heatmapState.opacity =0.5XxxMapView(...) {
HeatmapOverlay(state = heatmapState) {
HeatmapPoints(pointStates)
}
}val gradient =HeatmapGradient(
listOf(
HeatmapGradientStop(position =0.0, color =Color.argb(0, 0, 0, 255)), // transparent blueHeatmapGradientStop(position =0.5, color =Color.rgb(0, 255, 0)), // greenHeatmapGradientStop(position =1.0, color =Color.rgb(255, 0, 0)), // red
)
)
val heatmapState = remember {
HeatmapOverlayState(gradient = gradient)
}HeatmapPointState allows per-point customization:
val pointState =HeatmapPointState(
position =GeoPoint(latitude =35.6762, longitude =139.6503),
weight =3.0,
)| Parameter | Type | Default | Description |
|---|---|---|---|
radiusPx | Int | 20 | Blur radius of each point in pixels |
opacity | Double | 0.7 | Layer opacity (0.0–1.0) |
gradient | HeatmapGradient | HeatmapGradient.DEFAULT | Color gradient |
maxIntensity | Double? | null | Max intensity for normalization; auto-calculated if null |
| Property | Type | Default |
|---|---|---|
radiusPx | Int | 20 |
opacity | Double | 0.7 |
gradient | HeatmapGradient | HeatmapGradient.DEFAULT |
maxIntensity | Double? | null |
weightProvider | (HeatmapPointState) -> Double | { it.weight } |
Green (#66E100) at position 0.2 → Red (#FF0000) at position 1.0.