Weighted Heat Map Layer

This sample shows how to create a heat map which defines the intensity of each data point based on a property. In this case the "mag" property is used to specify the weight of each data point. Additionally ann expression has been added to the radius property so that it changes based on the zoom level of the map.

Tip: When working with larger data sets, enable clustering on the data source and set the weight to ['get', 'point_count'] to get improved performance.