| 程序包 | 说明 |
|---|---|
| com.amap.api.maps | |
| com.amap.api.maps.model |
| 限定符和类型 | 方法和说明 |
|---|---|
HeatMapLayer |
AMap.addHeatMapLayer(HeatMapLayerOptions options)
在地图上添加一个热力图对象。
|
| 限定符和类型 | 方法和说明 |
|---|---|
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 |
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) |
HeatMapLayerOptions |
HeatMapLayer.getOptions()
获取热力图属性,如果初始化传入的null 则返回也是null
Get Heatmap Properties, returns null if initialized with null |
HeatMapLayerOptions |
HeatMapLayerOptions.gradient(Gradient val)
设置热力图渐变,有默认值 DEFAULT_GRADIENT,可不设置该接口
Set the gradient of the heatmap, with default value DEFAULT_GRADIENT, this interface can be omitted |
HeatMapLayerOptions |
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 |
HeatMapLayerOptions.maxZoom(float val)
最大缩放级别
Maximum zoom level |
HeatMapLayerOptions |
HeatMapLayerOptions.minZoom(float val)
最小缩放级别
Minimum zoom level |
HeatMapLayerOptions |
HeatMapLayerOptions.opacity(float val)
设置热力图层透明度,默认 0.6,可不设置该接口
Set the opacity of the heatmap layer, default is 0.6, this interface can be omitted |
HeatMapLayerOptions |
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 |
HeatMapLayerOptions.type(int val)
设置热力图类型
Set the heatmap type |
HeatMapLayerOptions |
HeatMapLayerOptions.visible(boolean isVisible)
设置可见性。
|
HeatMapLayerOptions |
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 |
HeatMapLayerOptions.zIndex(float zIndex)
设置Z轴的值。
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
HeatMapLayer.setOptions(HeatMapLayerOptions options)
更新热力图属性
更新时会重新计算热力图数据,建议不要频繁更新
Update Heatmap Properties Updating will recalculate heatmap data, it is recommended not to update frequently |