-
- All Implemented Interfaces:
-
com.google.android.gms.maps.model.TileProvider
public final class HeatmapTileProvider implements TileProviderTile provider that creates heatmap tiles.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classHeatmapTileProvider.BuilderBuilder class for the HeatmapTileProvider.
public classHeatmapTileProvider.Companion
-
Method Summary
Modifier and Type Method Description final UnitsetWeightedData(Collection<WeightedLatLng> data)final UnitupdateData(Collection<WeightedLatLng> data)Refreshes the heatmap with a new collection of weighted data points. final UnitsetData(Collection<LatLng> latLngs)final UnitupdateLatLngs(Collection<LatLng> latLngs)Refreshes the heatmap with a new collection of unweighted data points. final UnitsetGradient(Gradient gradient)final UnitsetRadius(Integer radius)final UnitsetOpacity(Double opacity)final UnitsetMaxIntensity(Double intensity)TilegetTile(Integer x, Integer y, Integer zoom)-
-
Method Detail
-
setWeightedData
@Deprecated(message = Use updateData(Collection<WeightedLatLng>) instead., replaceWith = @ReplaceWith(imports = {}, expression = updateData(data))) final Unit setWeightedData(Collection<WeightedLatLng> data)
-
updateData
final Unit updateData(Collection<WeightedLatLng> data)
Refreshes the heatmap with a new collection of weighted data points.
This is an expensive operation. It involves rebuilding the quadtree index and recalculating the bounds and maximum intensity values for the new dataset. This method should be used when the underlying data for the heatmap has changed.
- Parameters:
data- The new collection of WeightedLatLng points.
-
setData
@Deprecated(message = Use updateLatLngs(Collection<LatLng>) instead., replaceWith = @ReplaceWith(imports = {}, expression = updateLatLngs(latLngs))) final Unit setData(Collection<LatLng> latLngs)
-
updateLatLngs
final Unit updateLatLngs(Collection<LatLng> latLngs)
Refreshes the heatmap with a new collection of unweighted data points. Each point is assigned a default weight of 1.0.
This is a convenience method that wraps the data in WeightedLatLng objects before calling updateData.
- Parameters:
latLngs- The new collection of LatLng points.
-
setGradient
final Unit setGradient(Gradient gradient)
-
setOpacity
final Unit setOpacity(Double opacity)
-
setMaxIntensity
final Unit setMaxIntensity(Double intensity)
-
-
-
-