public class HeatMapLayerOptions extends BaseOptions
| 限定符和类型 | 字段和说明 |
|---|---|
static Gradient |
DEFAULT_GRADIENT
热力图默认渐变
Default gradient of heatmap |
static double |
DEFAULT_OPACITY
热力图层默认透明度
Default opacity of heatmap layer |
static int |
DEFAULT_RADIUS
热力图默认的点半径
Default point radius of heatmap |
static int |
TYPE_GRID
热力图层类型-网格热力图
Heatmap layer type - Grid heatmap |
static int |
TYPE_HEXAGON
热力图层类型-蜂巢热力图
Heatmap layer type - Hexagon heatmap |
static int |
TYPE_NORMAL
热力图层类型-普通热力图(暂不支持)
Heatmap layer type - General heatmap (not supported yet) |
| 构造器和说明 |
|---|
HeatMapLayerOptions() |
| 限定符和类型 | 方法和说明 |
|---|---|
HeatMapLayerOptions |
data(java.util.Collection<LatLng> val)
设置热力图绘制的数据,data 或 weightedData接口必须设置其中之一
Set the data for drawing the heatmap, either data or weightedData interface must be set |
HeatMapLayerOptions |
gap(float val)
设置间隔 网格和蜂巢时生效
Set the interval, effective for grid and honeycomb —— —— —— —— 丨 丨 丨 丨 丨 丨 丨 丨 —— —— —— —— 每个方框的宽就是 size(六边形同理) 两个放款之间的间隔就是 gap (六边形同理) The width of each box is size (same for hexagons) The gap between two boxes is gap (same for hexagons) |
java.util.Collection<WeightedLatLng> |
getData()
获取经纬度数据
Get latitude and longitude data |
float |
getGap()
获取间隔
Get interval |
Gradient |
getGradient()
获取颜色处理
Get color processing |
double |
getMaxIntensity()
获取最大权重,0表示没有设置
Get maximum weight, 0 means not set |
float |
getMaxZoom()
获取最大显示级别
Get the maximum display level |
float |
getMinZoom()
获取最小显示级别
Get the minimum display level |
float |
getOpacity()
获取透明度
Get opacity |
float |
getSize()
获取大小
Get size |
int |
getType()
获取热力图类型
Get the heatmap type |
float |
getZIndex()
获取的Z轴值
The obtained Z-axis value |
HeatMapLayerOptions |
gradient(Gradient val)
设置热力图渐变,有默认值 DEFAULT_GRADIENT,可不设置该接口
Set the gradient of the heatmap, with default value DEFAULT_GRADIENT, this interface can be omitted |
boolean |
isVisible()
获取的可见属性
The obtained visibility property |
HeatMapLayerOptions |
maxIntensity(double val)
权重的最大值,默认为0,表示不填,不填则取数据集权重最大值
对颜色选择有影响,计算颜色比例是,权重最大使用此接口设置的值
Maximum weight, default is 0, meaning not filled, if not filled, the maximum weight of the dataset is used Affects color selection, when calculating color ratio, the maximum weight uses the value set by this interface |
HeatMapLayerOptions |
maxZoom(float val)
最大缩放级别
Maximum zoom level |
HeatMapLayerOptions |
minZoom(float val)
最小缩放级别
Minimum zoom level |
HeatMapLayerOptions |
opacity(float val)
设置热力图层透明度,默认 0.6,可不设置该接口
Set the opacity of the heatmap layer, default is 0.6, this interface can be omitted |
HeatMapLayerOptions |
size(float val)
设置热力图点大小,单位为米,默认为2000米
Set the size of heatmap points in meters, default is 2000 meters —— —— —— —— 丨 丨 丨 丨 丨 丨 丨 丨 —— —— —— —— 每个方框的宽就是 size(六边形同理) 两个放款之间的间隔就是 gap (六边形同理) The width of each box is size (same for hexagons) The gap between two boxes is gap (same for hexagons) |
HeatMapLayerOptions |
type(int val)
设置热力图类型
Set the heatmap type |
HeatMapLayerOptions |
visible(boolean isVisible)
设置可见性。
|
HeatMapLayerOptions |
weightedData(java.util.Collection<WeightedLatLng> val)
设置热力图绘制的数据,带权值的位置点集合,data 或 weightedData接口必须设置其中之一
Set the data for drawing the heatmap, a collection of weighted points, either data or weightedData interface must be set |
HeatMapLayerOptions |
zIndex(float zIndex)
设置Z轴的值。
|
public static final int DEFAULT_RADIUS
public static final double DEFAULT_OPACITY
public static final int TYPE_NORMAL
public static final int TYPE_GRID
public static final int TYPE_HEXAGON
public static final Gradient DEFAULT_GRADIENT
public HeatMapLayerOptions data(java.util.Collection<LatLng> val)
val - 热力图绘制数据,不能为null,大小不能为 0.
public HeatMapLayerOptions weightedData(java.util.Collection<WeightedLatLng> val)
val - 热力图绘制数据,不能为null,大小不能为 0.
public HeatMapLayerOptions size(float val)
val - 热力图点
public HeatMapLayerOptions gradient(Gradient val)
val - 热力图渐变
public HeatMapLayerOptions opacity(float val)
val - 热力图层透明度 [0, 1]
public HeatMapLayerOptions maxIntensity(double val)
val - public HeatMapLayerOptions maxZoom(float val)
val - public HeatMapLayerOptions minZoom(float val)
val - public HeatMapLayerOptions gap(float val)
val - public HeatMapLayerOptions type(int val)
val - public HeatMapLayerOptions zIndex(float zIndex)
zIndex - 要设置的Z轴的值。
public HeatMapLayerOptions visible(boolean isVisible)
isVisible - 一个表示是否可见的布尔值,true表示可见,false表示不可见。
public Gradient getGradient()
public java.util.Collection<WeightedLatLng> getData()
public float getSize()
public float getOpacity()
public double getMaxIntensity()
public float getMaxZoom()
public float getMinZoom()
public float getGap()
public int getType()
public float getZIndex()
public boolean isVisible()