MapCustomElement Class
The class used to draw any custom element on a map.
Namespace: DevExpress.Xpf.Map
Assembly: DevExpress.Xpf.Map.v18.2.dll
Declaration
public class MapCustomElement :
MapItem,
ISupportCoordLocation,
IPointCore,
IClusterable,
IClusterItemCore,
IClusterItem,
IColorizerElement
Related API Members
The following members return MapCustomElement objects:
Remarks
The following image shows an example of a map custom element.
Example
Note
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-add-different-types-of-vector-items-to-a-vector-layer-t145602.
<dxm:MapCustomElement>
<dxm:MapCustomElement.ContentTemplate>
<DataTemplate>
<Border Name="border" BorderBrush="DarkGray"
Background="LightGray" BorderThickness="1"
Padding="5" Margin="5" CornerRadius="5">
<StackPanel Orientation="Horizontal">
<Image Source="DevExpress.png" Width="40"
Height="40" Margin="5"/>
<TextBlock Text="This is a custom element."
TextAlignment="Center" FontSize="18"
VerticalAlignment="Center" Margin="5"/>
</StackPanel>
</Border>
</DataTemplate>
</dxm:MapCustomElement.ContentTemplate>
</dxm:MapCustomElement>
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the MapCustomElement class.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.