Back to Devexpress

HeatmapProvider Class

wpf-devexpress-dot-xpf-dot-map-c4fd8dc1.md

latest4.2 KB
Original Source

HeatmapProvider Class

Allows you to draw a heatmap on the Map Control surface.

Namespace : DevExpress.Xpf.Map

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

NuGet Package : DevExpress.Wpf.Map

Declaration

csharp
public class HeatmapProvider :
    FullRequestedImageDataProvider,
    IHeatImageContextProvider,
    IFullRequestedContextProvider,
    IUnitConverterProvider,
    IWeakEventListener,
    ILegendDataProvider
vb
Public Class HeatmapProvider
    Inherits FullRequestedImageDataProvider
    Implements IHeatImageContextProvider,
               IFullRequestedContextProvider,
               IUnitConverterProvider,
               IWeakEventListener,
               ILegendDataProvider

Remarks

The following image shows a sample heatmap:

Run Demo: Heat Map

Follow the steps below to create a heatmap:

  • Begin with an ImageLayer object and add it to the MapControl.Layers collection.

  • Assign a HeatmapProvider object to the ImageLayer.DataProvider property.

  • Initialize the PointSource property to configure a source of heatmap points. Each heatmap point can be defined by its geo location and weight value (optional).

  • Specify an algorithm the Map Control should use to create a heatmap. Set the Algorithm property to a HeatmapDensityBasedAlgorithm object. At this time, this is the only available algorithm and it builds heatmaps based on point density. Additional algorithms will be implemented in future versions of this product.

Tip

The following help topic describes the algorithm used to color heatmap points: HeatmapPoint.Value.

Add a Legend

Use the code below to add a legend with a gradient scale.

xaml
<dxm:MapControl.Legends>
  <dxm:ColorScaleLegend Layer="{Binding ElementName=heatmapLayer}"
                        EnableGradientScale="True" 
                        Header="Seismic Density">
  </dxm:ColorScaleLegend>
</dxm:MapControl.Legends>

Related API members

Inheritance

Object DispatcherObject DependencyObject Freezable MapDependencyObject MapImageDataProviderBase DevExpress.Xpf.Map.FullRequestedImageDataProvider HeatmapProvider

See Also

HeatmapProvider Members

DevExpress.Xpf.Map Namespace