public class HeatmapTileProvider
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
HeatmapTileProvider.Builder
Builder class for the HeatmapTileProvider.
|
Modifier and Type | Field and Description |
---|---|
static Gradient |
DEFAULT_GRADIENT
Default gradient for heatmap.
|
static double |
DEFAULT_OPACITY
Default opacity of heatmap overlay
|
static int |
DEFAULT_RADIUS
Default radius for convolution
|
Modifier and Type | Method and Description |
---|---|
Tile |
getTile(int x,
int y,
int zoom)
Creates tile.
|
void |
setData(java.util.Collection<LatLng> data)
Changes the dataset the heatmap is portraying.
|
void |
setGradient(Gradient gradient)
Setter for gradient/color map.
|
void |
setMaxIntensity(double intensity)
Setter for max intensity
User should clear overlay's tile cache (using clearTileCache()) after calling this.
|
void |
setOpacity(double opacity)
Setter for opacity
User should clear overlay's tile cache (using clearTileCache()) after calling this.
|
void |
setRadius(int radius)
Setter for radius.
|
void |
setWeightedData(java.util.Collection<WeightedLatLng> data)
Changes the dataset the heatmap is portraying.
|
public static final int DEFAULT_RADIUS
public static final double DEFAULT_OPACITY
public static final Gradient DEFAULT_GRADIENT
public void setWeightedData(java.util.Collection<WeightedLatLng> data)
data
- Data set of points to use in the heatmap, as LatLngs.
Note: Editing data without calling setWeightedData again will not update the data
displayed 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 upon
changing the radius.public void setData(java.util.Collection<LatLng> data)
data
- Data set of points to use in the heatmap, as LatLngs.public Tile getTile(int x, int y, int zoom)
x
- X coordinate of tile.y
- Y coordinate of tile.zoom
- Zoom level.public void setGradient(Gradient gradient)
gradient
- Gradient to setpublic void setRadius(int radius)
radius
- Radius to setpublic void setOpacity(double opacity)
opacity
- opacity to setpublic void setMaxIntensity(double intensity)
intensity
- intensity to set