The heatmap can visually show the density or frequency of spatial data. The HeatLayer object defines the relevant attributes in the heatmap.
Attribute | Type | Description |
layerType |
string |
[Required] The layer type. Fixed constant: "HEAT". |
name |
string |
[Required] The layer name. |
visible |
boolean |
[Required] The visibility of the layer. |
dataSource |
DataSource |
[Required] The data source of the heat map is one of the following five data sources: |
featureType |
string |
[Required] The feature type of the layer. The feature type of the heat map is "POINT". |
projection |
string |
[Required] The projected coordinate system of the map. Optional value: EPSG or WKT universal coordinate system description standard. |
xyField |
string |
[Required] Composed of two sub-attributes "xField" and "yField". |
themeSetting | HeatLayerThemeSetting |
[Required] The theme setting of the heatmap. |
captions |
object |
[Optional] The key is the field name, and the value is the user-defined string type field display name, for example: {"ADDRESS":"ADDRESS display name"}. |
autoUpdateTime |
number |
[Optional] The time for the layer data to be automatically refreshed, in milliseconds. |
filterCondition | string |
[Optional] The filter condition of the attribute field, for example, "province=\"Anhui \"". |
legendSetting |
LegendSetting |
[Optional] Legend settings for the heatmap. |
opacity |
number |
[Optional] The opacity of the layer. The maximum value is 1 and the minimum value is 0. |
visibleScale |
[Optional] Stores the visible scale range of the current layer. |
Create a heatmap layer that conforms to the WebMap specification.
{
"layers": [
{
"layerType": "HEAT",
"name": "China Meteorological Observatory",
"visible": true,
"featureType": "POINT",
"xyField": {
"xField": "Longitude",
"yField": "Latitude"
},
"projection": "EPSG:4326",
"filterCondition": "Province=\"Anhui\"",
"themeSetting": {
"colors": [
"#0000ff",
"#00ffff",
"#00ff00",
"#ffff00",
"#ff0000"
],
"weight": "Air pressure sensor altitude (m)",
"radius": 5,
"customSettings": {}
},
"dataSource": {
"type": "SAMPLE_DATA",
"name": "ChinaMeteorologicalObservationStation"
}
}
],
}