Docs / Extensions / Heatmap

Heatmaps

Density data rendered as a tile-based raster layer. It is provider-independent, so swapping the map does not change how it looks.

ANDROID
com.mapconductor:heatmap
iOS
MapConductorHeatmap
REACT
@mapconductor/react-heatmap
Platform

01 · Install

app/build.gradle.kts
implementation("com.mapconductor:heatmap")

02 · Usage

Declare points inside the overlay. For large datasets use the batch component to send them in one update.

HeatmapScreen.kt · Jetpack Compose
val pointStates: List<HeatmapPointState> = remember { buildPointList() }

MapLibreMapView(state = mapState) {
    HeatmapOverlay(radiusPx = 20, opacity = 0.7) {
        HeatmapPoints(pointStates)
    }
}

03 · Options

Option
Default
Description
radiusPx
20
Blur radius of each point, in pixels.
opacity
0.7
Opacity of the whole overlay.
gradient
DEFAULT
Colour ramp across intensity; stops are fully configurable.
tileSize
512
Edge length of the generated tiles, in pixels.
weightProvider
state.weight
How each point's weight is read; by default it uses each HeatmapPointState's weight (default 1.0) — for population, revenue and similar quantities.

04 · Performance

Drawn as tiles

The heatmap is generated as raster tiles, so the number of overlays stays constant as points grow. The sample renders 24,526 points.

Sample · 24,526 points drawn as tiles

Related pages