wpf-devexpress-dot-xpf-dot-map-6aca95e7.md
A particular heatmap point.
Namespace : DevExpress.Xpf.Map
Assembly : DevExpress.Xpf.Map.v25.2.dll
NuGet Package : DevExpress.Wpf.Map
public class HeatmapPoint :
IHeatmapPoint
Public Class HeatmapPoint
Implements IHeatmapPoint
Use the Location property to specify the point position. To set the point’s weight value, use the Value property.
This example shows how to use a HeatmapPointStorage object to create a heatmap layer.
Markup:
<dxm:MapControl>
<dxm:ImageLayer>
<dxm:HeatmapProvider>
<dxm:HeatmapProvider.PointSource>
<dxm:HeatmapPointStorage x:Name="storage"/>
</dxm:HeatmapProvider.PointSource>
<dxm:HeatmapProvider.Algorithm>
<dxm:HeatmapDensityBasedAlgorithm PointRadius="50"/>
</dxm:HeatmapProvider.Algorithm>
<dxm:HeatmapProvider.Colorizer>
<dxm:ChoroplethColorizer RangeStops="0.1, 0.2, 0.7, 1.0"
ApproximateColors="True">
<dxm:ChoroplethColorizer.Colors>
<Color A="50" R="128" G="255" B="0"/>
<Color A="255" R="255" G="255" B="0"/>
<Color A="255" R="234" G="72" B="58"/>
<Color A="255" R="162" G="36" B="25"/>
</dxm:ChoroplethColorizer.Colors>
</dxm:ChoroplethColorizer>
</dxm:HeatmapProvider.Colorizer>
</dxm:HeatmapProvider>
</dxm:ImageLayer>
</dxm:MapControl>
Code-Behind:
using System.Windows;
using DevExpress.Xpf.Map;
namespace HeatmapPointStorage {
public partial class MainWindow : Window {
public MainWindow() {
InitializeComponent();
storage.Points.Add(new HeatmapPoint(new GeoPoint(23.5309, -0.4211), 1));
storage.Points.Add(new HeatmapPoint(new GeoPoint(32.3248, 21.0537), 0.5));
storage.Points.Add(new HeatmapPoint(new GeoPoint(14.1503, 16.3626), 1));
storage.Points.Add(new HeatmapPoint(new GeoPoint(7.2144, 34.2711), 1));
storage.Points.Add(new HeatmapPoint(new GeoPoint(-4.5456, 10.1143), 0.5));
}
}
}
Imports System.Windows
Imports DevExpress.Xpf.Map
Namespace HeatmapPointStorage
Public Partial Class MainWindow
Inherits Window
Public Sub New()
InitializeComponent()
storage.Points.Add(New HeatmapPoint(New GeoPoint(23.5309, -0.4211), 1))
storage.Points.Add(New HeatmapPoint(New GeoPoint(32.3248, 21.0537), 0.5))
storage.Points.Add(New HeatmapPoint(New GeoPoint(14.1503, 16.3626), 1))
storage.Points.Add(New HeatmapPoint(New GeoPoint(7.2144, 34.2711), 1))
storage.Points.Add(New HeatmapPoint(New GeoPoint(-4.5456, 10.1143), 0.5))
End Sub
End Class
End Namespace
You can also create heatmap points in XAML:
<dxm:HeatmapProvider.PointSource>
<dxm:HeatmapPointStorage>
<dxm:HeatmapPointStorage.Points>
<dxm:HeatmapPoint Value="0.5">
<dxm:HeatmapPoint.Location>
<dxm:GeoPoint Latitude="32.3248" Longitude="21.0537"/>
</dxm:HeatmapPoint.Location>
</dxm:HeatmapPoint>
<!-- Other heatmap points. -->
</dxm:HeatmapPointStorage.Points>
</dxm:HeatmapPointStorage>
</dxm:HeatmapProvider.PointSource>
Object HeatmapPoint
See Also