-
Notifications
You must be signed in to change notification settings - Fork 4
Heat maps #27
Description
This GL JS example and this Android SDK demo app activity claim to demonstrate “heat maps”, but in reality they’re hot spot maps. The “heat” only represents frequency, but not, say, a magnitude property in the GL JS example. The overlaid shapes can be blurred circles but not amorphous shapes, and the heat comes apart as you zoom in rather than spreading out.
Some of the requests we’ve gotten for heat maps (such as mapbox/mapbox-gl-native#3420, mapbox/mapbox-gl-native#6304) have turned out to be for actual heat maps. In the Google Maps JavaScript API, HeatmapLayer can work with WeightedLocations for this effect. The Google Maps SDK for Android supports heat maps as well using HeatmapTileProvider and WeightedLatLng. On iOS/macOS, there are a number of libraries based on MapKit (example) that implement heat maps using a custom-rendered MKOverlayView or the more modern MKOverlayRenderer.
The Android and iOS SDKs support something along the lines of these MapKit-based libraries, via an unsupported, undocumented OpenGL style layer API. But we should have a straightforward, officially supported solution for heat maps. As far as I can tell, we may need a new layer type that clusters nearby points of similar intensity into amorphous shapes (rather than collapsing them down into a single point). Please chime in if you think it’s doable with the existing layer types, though.