Class Info |
|---|
public class HeatMap Modifies the HeatMap attributes. An instance of this type will be returned when the addHeatMap method in the HuaweiMap class is called. |
Qualifier and Type | Method Name and Description |
|---|---|
void | changeDataSet(String jsonData) Modifies the heatmap dataset based on the passed GeoJSON-format string. |
void | changeDataSet(Context clientContext, int resourceId) Modifies the heatmap dataset based on the passed context and resource ID. |
String | getId() Obtains the heatmap ID. |
| Obtains the heatmap radius unit. | |
void | remove() Removes the heatmap overlay from the map. |
void | setColor(Map<Float, Integer> color) Modifies the heatmap color. |
void | setIntensity(Float intensity) Modifies the heatmap intensity for all zoom levels. |
void | setIntensity(Map<Float, Float> intensity) Modifies the heatmap intensity for specified zoom levels. |
void | setOpacity(Float opacity) Modifies the heatmap transparency for all zoom levels. |
void | setOpacity(Map<Float, Float> opacity) Modifies the heatmap transparency for specified zoom levels. |
void | setRadius(Float radius) Modifies the heatmap radius for all zoom levels. |
void | setRadius(Map<Float, Float> radius) Modifies the heatmap radius for specified zoom levels. |
void | setRadiusUnit(HeatMapOptions.RadiusUnit unit) Modifies the heatmap radius unit. |
void | setVisible(boolean isVisible) Sets whether the heatmap is visible. |
Method |
|---|
public void changeDataSet(String jsonData) Modifies the heatmap dataset based on the passed GeoJSON-format string. |
Parameters
Name | Description |
|---|---|
jsonData | GeoJSON-format dataset. NOTE:
|
Method |
|---|
public void changeDataSet(Context clientContext, int resourceId) Modifies the heatmap dataset based on the passed context and resource ID. |
Parameters
Name | Description |
|---|---|
clientContext | Context. |
resourceId | Resource ID of the heatmap dataset file, in GeoJSON format. NOTE:
|
Method |
|---|
public String getId() Obtains the heatmap ID. |
Returns
Type | Description |
|---|---|
String | Heatmap ID. |
Method |
|---|
public HeatMapOptions.RadiusUnit getRadiusUnit() Obtains the heatmap radius unit. |
Returns
Type | Description |
|---|---|
Heatmap radius unit. The options are specified by RadiusUnit. The default value is PIXEL. |
Method |
|---|
public void setColor(Map<Float, Integer> color) Modifies the heatmap color. |
Parameters
Name | Description |
|---|---|
color |
Default colors for different densities:
|
Method |
|---|
public void setIntensity(Float intensity) Modifies the heatmap intensity for all zoom levels. |
Parameters
Name | Description |
|---|---|
intensity | Heatmap intensity. The value must be greater than 0. The default value is 1.0. |
Method |
|---|
public void setIntensity(Map<Float, Float> intensity) Modifies the heatmap intensity for specified zoom levels. |
Parameters
Name | Description |
|---|---|
intensity |
|
Method |
|---|
public void setOpacity(Float opacity) Modifies the heatmap transparency for all zoom levels. |
Parameters
Name | Description |
|---|---|
opacity | Heatmap transparency. The value ranges from 0 to 1.
A larger value indicates a higher transparency. The default value is 0. |
Throws
Name | Description |
|---|---|
IllegalArgumentException | If the value does not range from 0 to 1. |
Method |
|---|
public void setOpacity(Map<Float, Float> opacity) Modifies the heatmap transparency for specified zoom levels. |
Parameters
Name | Description |
|---|---|
opacity |
|
Method |
|---|
public void setRadius(Float radius) Modifies the heatmap radius for all zoom levels. |
Parameters
Name | Description |
|---|---|
radius | Heatmap radius. The unit is specified by RadiusUnit. The value must be greater than or equal to 1. The default value is 10. |
Method |
|---|
public void setRadius(Map<Float, Float> radius) Modifies the heatmap radius for specified zoom levels. |
Parameters
Name | Description |
|---|---|
radius |
|
Method |
|---|
public void setRadiusUnit(HeatMapOptions.RadiusUnit unit) Modifies the heatmap radius unit. |
Parameters
Name | Description |
|---|---|
unit | Heatmap radius unit. The options are specified by RadiusUnit. The default value is PIXEL. |