Heatmap module for MapConductor iOS SDK.
This package is standalone and depends only on ios-sdk-core.
- iOS 15+
- Swift 5.9+
- Xcode 15+
- In Xcode, open File > Add Package Dependencies...
- Enter this repository URL
- Add the product MapConductorHeatmap to your target
Add the dependency:
dependencies: [
.package(url: "https://github.com/MapConductor/mapconductor-heatmap", from: "1.0.0"),
],Then add MapConductorHeatmap to your target dependencies:
.target(
name: "YourApp",
dependencies: [
.product(name: "MapConductorHeatmap", package: "mapconductor-heatmap"),
]
),
import MapConductorHeatmapThe Heatmap module provides utilities to create a heatmap layer and update it with your data.
let heatmapState: HeatmapOverlayState = HeatmapOverlayState(tileSize: 512)
let points = [
HeatmapPointState(position: GeoPoint.fromLatLong(...),
weight: 1.0,
id: "location-1"),
HeatmapPointState(position: GeoPoint.fromLatLong(...),
weight: 1.0,
id: "location-2"),
...
HeatmapPointState(position: GeoPoint.fromLatLong(...),
weight: 1.0,
id: "location-n"),
]
HeatmapOverlay(state: heatmapState) {
ForEach(points, id: \.id) { pointState in
HeatmapPointView(state: pointState)
}
}The concrete map rendering (Google Maps / MapLibre / MapKit) is provided by separate packages. This module focuses on heatmap logic and data handling.