Skip to main content
All docs
V25.1
  • HeatmapPoint Class

    A particular heatmap point.

    Namespace: DevExpress.Xpf.Map

    Assembly: DevExpress.Xpf.Map.v25.1.dll

    NuGet Package: DevExpress.Wpf.Map

    Declaration

    public class HeatmapPoint :
        IHeatmapPoint

    Remarks

    Use the Location property to specify the point position. To set the point’s weight value, use the Value property.

    Example

    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));
            }
        }
    }
    

    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>
    

    Inheritance

    Object
    HeatmapPoint
    See Also