-
- All Implemented Interfaces:
-
com.google.android.gms.maps.model.TileProvider
public class HeatmapTileProvider implements TileProviderTile provider that creates heatmap tiles.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classHeatmapTileProvider.BuilderBuilder class for the HeatmapTileProvider.
-
Field Summary
Fields Modifier and Type Field Description public final static intDEFAULT_RADIUSpublic final static doubleDEFAULT_OPACITYpublic final static GradientDEFAULT_GRADIENT
-
Method Summary
Modifier and Type Method Description voidsetWeightedData(Collection<WeightedLatLng> data)Changes the dataset the heatmap is portraying. voidsetData(Collection<LatLng> data)Changes the dataset the heatmap is portraying. TilegetTile(int x, int y, int zoom)Creates tile. voidsetGradient(Gradient gradient)Setter for gradient/color map.User should clear overlay's tile cache (using clearTileCache()) after calling this. voidsetRadius(int radius)Setter for radius.User should clear overlay's tile cache (using clearTileCache()) after calling this. voidsetOpacity(double opacity)Setter for opacityUser should clear overlay's tile cache (using clearTileCache()) after calling this. voidsetMaxIntensity(double intensity)Setter for max intensityUser should clear overlay's tile cache (using clearTileCache()) after calling this. -
-
Method Detail
-
setWeightedData
void setWeightedData(Collection<WeightedLatLng> data)
Changes the dataset the heatmap is portraying. Weighted.User should clear overlay's tile cache (using clearTileCache()) after calling this.
- Parameters:
data- Data set of points to use in the heatmap, as LatLngs.Note: Editing data without calling setWeightedData again will not update the datadisplayed on the map, but will impact calculation of max intensity values,as the collection you pass in is stored.Outside of changing the data, max intensity values are calculated only uponchanging the radius.
-
setData
void setData(Collection<LatLng> data)
Changes the dataset the heatmap is portraying. Unweighted.User should clear overlay's tile cache (using clearTileCache()) after calling this.
- Parameters:
data- Data set of points to use in the heatmap, as LatLngs.
-
getTile
Tile getTile(int x, int y, int zoom)
Creates tile.
- Parameters:
x- X coordinate of tile.y- Y coordinate of tile.zoom- Zoom level.
-
setGradient
void setGradient(Gradient gradient)
Setter for gradient/color map.User should clear overlay's tile cache (using clearTileCache()) after calling this.
- Parameters:
gradient- Gradient to set
-
setRadius
void setRadius(int radius)
Setter for radius.User should clear overlay's tile cache (using clearTileCache()) after calling this.
- Parameters:
radius- Radius to set
-
setOpacity
void setOpacity(double opacity)
Setter for opacityUser should clear overlay's tile cache (using clearTileCache()) after calling this.
- Parameters:
opacity- opacity to set
-
setMaxIntensity
void setMaxIntensity(double intensity)
Setter for max intensityUser should clear overlay's tile cache (using clearTileCache()) after calling this.
- Parameters:
intensity- intensity to set
-
-
-
-