Skip to content

Commit d7051a0

Browse files
authored
Merge pull request #174775 from stevemunk/SM-Fix-heatmaplayer-brokenLink
Fix broken link in map-add-heat-map-layer.md
2 parents 787e478 + 93f4cff commit d7051a0

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

articles/azure-maps/map-add-heat-map-layer.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
22
title: Add a heat map layer to a map | Microsoft Azure Maps
33
description: Learn how to create a heat map. See how to use the Azure Maps Web SDK to add a heat map layer to a map. Find out how to customize heat map layers.
4-
author: anastasia-ms
5-
ms.author: v-stharr
6-
ms.date: 07/29/2019
7-
ms.topic: conceptual
4+
author: stevemunk
5+
ms.author: v-munksteve
6+
ms.date: 10/06/2021
7+
ms.topic: how-to
88
ms.service: azure-maps
99
ms.custom: codepen, devx-track-js
1010
---
1111

12-
# Add a heat map layer
12+
# Add a heat map layer to a map
1313

1414
Heat maps, also known as point density maps, are a type of data visualization. They're used to represent the density of data using a range of colors and show the data "hot spots" on a map. Heat maps are a great way to render datasets with large number of points.
1515

@@ -60,14 +60,14 @@ Here's the complete running code sample of the preceding code.
6060

6161
The previous example customized the heat map by setting the radius and opacity options. The heat map layer provides several options for customization, including:
6262

63-
* `radius`: Defines a pixel radius in which to render each data point. You can set the radius as a fixed number or as an expression. By using an expression, you can scale the radius based on the zoom level, and represent a consistent spatial area on the map (for example, a 5-mile radius).
64-
* `color`: Specifies how the heat map is colorized. A color gradient is a common feature of heat maps. You can achieve the effect with an `interpolate` expression. You can also use a `step` expression for colorizing the heat map, breaking up the density visually into ranges that resemble a contour or radar style map. These color palettes define the colors from the minimum to the maximum density value.
63+
- `radius`: Defines a pixel radius in which to render each data point. You can set the radius as a fixed number or as an expression. By using an expression, you can scale the radius based on the zoom level, and represent a consistent spatial area on the map (for example, a 5-mile radius).
64+
- `color`: Specifies how the heat map is colorized. A color gradient is a common feature of heat maps. You can achieve the effect with an `interpolate` expression. You can also use a `step` expression for colorizing the heat map, breaking up the density visually into ranges that resemble a contour or radar style map. These color palettes define the colors from the minimum to the maximum density value.
6565

6666
You specify color values for heat maps as an expression on the `heatmap-density` value. The color of area where there's no data is defined at index 0 of the "Interpolation" expression, or the default color of a "Stepped" expression. You can use this value to define a background color. Often, this value is set to transparent, or a semi-transparent black.
6767

6868
Here are examples of color expressions:
6969

70-
| Interpolation color expression | Stepped color expression |
70+
| Interpolation color expression | Stepped color expression |
7171
|--------------------------------|--------------------------|
7272
| \[<br/>&nbsp;&nbsp;&nbsp;&nbsp;'interpolate',<br/>&nbsp;&nbsp;&nbsp;&nbsp;\['linear'\],<br/>&nbsp;&nbsp;&nbsp;&nbsp;\['heatmap-density'\],<br/>&nbsp;&nbsp;&nbsp;&nbsp;0, 'transparent',<br/>&nbsp;&nbsp;&nbsp;&nbsp;0.01, 'purple',<br/>&nbsp;&nbsp;&nbsp;&nbsp;0.5, '#fb00fb',<br/>&nbsp;&nbsp;&nbsp;&nbsp;1, '#00c3ff'<br/>\] | \[<br/>&nbsp;&nbsp;&nbsp;&nbsp;'step',<br/>&nbsp;&nbsp;&nbsp;&nbsp;\['heatmap-density'\],<br/>&nbsp;&nbsp;&nbsp;&nbsp;'transparent',<br/>&nbsp;&nbsp;&nbsp;&nbsp;0.01, 'navy',<br/>&nbsp;&nbsp;&nbsp;&nbsp;0.25, 'green',<br/>&nbsp;&nbsp;&nbsp;&nbsp;0.50, 'yellow',<br/>&nbsp;&nbsp;&nbsp;&nbsp;0.75, 'red'<br/>\] |
7373

@@ -114,19 +114,21 @@ The `zoom` expression can only be used in `step` and `interpolate` expressions.
114114

115115
> [!TIP]
116116
> When you enable clustering on the data source, points that are close to one another are grouped together as a clustered point. You can use the point count of each cluster as the weight expression for the heat map. This can significantly reduce the number of points to be rendered. The point count of a cluster is stored in a `point_count` property of the point feature:
117+
>
117118
> ```JavaScript
118119
> var layer = new atlas.layer.HeatMapLayer(datasource, null, {
119120
> weight: ['get', 'point_count']
120121
> });
121122
> ```
123+
>
122124
> If the clustering radius is only a few pixels, there would be a small visual difference in the rendering. A larger radius groups more points into each cluster, and improves the performance of the heatmap.
123125
124126
## Next steps
125127
126128
Learn more about the classes and methods used in this article:
127129
128130
> [!div class="nextstepaction"]
129-
> [HeatMapLayer](/javascript/api/azure-maps-control/atlas.htmlmarker)
131+
> [HeatMapLayer](/javascript/api/azure-maps-control/atlas.layer.heatmaplayer)
130132
131133
> [!div class="nextstepaction"]
132134
> [HeatMapLayerOptions](/javascript/api/azure-maps-control/atlas.heatmaplayeroptions)

0 commit comments

Comments
 (0)