Skip to main content

MapEllipse Class

The class used to draw an ellipse on a map.

Namespace: DevExpress.Xpf.Map

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

NuGet Package: DevExpress.Wpf.Map

Declaration

public class MapEllipse :
    MapShape,
    IEllipseCore,
    ISupportRectangle,
    ISupportCoordLocation,
    IPolygonCore,
    IPointContainerCore

Remarks

The following image shows an example of a map ellipse shape.

MapEllipse

Note

The MapEllipse.Width and MapEllipse.Height properties are measured in kilometers by default.

Example

View Example

<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:dxm="http://schemas.devexpress.com/winfx/2008/xaml/map" 
        xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol" 
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
        mc:Ignorable="d" 
        x:Class="DXMapExample.MainWindow"
        Title="MainWindow" Width="640" Height="480" >


    <Grid>
        <dxm:MapControl>
            <dxm:MapControl.Layers>
                <dxm:ImageTilesLayer>
                    <dxm:ImageTilesLayer.DataProvider>
                        <dxm:OpenStreetMapDataProvider/>
                    </dxm:ImageTilesLayer.DataProvider>
                </dxm:ImageTilesLayer>
                <dxm:VectorLayer x:Name="vectorLayer">
                        <dxm:MapItemStorage>
                            <!--region #MapDot-->
                            <dxm:MapDot Location="-80, -90" Size="20"/>
                            <!--endregion #MapDot-->

                            <!--region #MapEllipse-->
                            <dxm:MapEllipse Location="-60, -90" Width="2000" Height="1000"/>
                            <!--endregion #MapEllipse-->

                            <!--region #MapLine-->
                            <dxm:MapLine Point1="-40, -90" Point2="-50, -70"/>
                            <!--endregion #MapLine-->

                            <!--region #MapPath-->
                            <dxm:MapPath>
                                <dxm:MapPath.Data>
                                    <dxm:MapPathGeometry>
                                        <dxm:MapPathGeometry.Figures>
                                            <dxm:MapPathFigure>
                                                <dxm:MapPathFigure.StartPoint>
                                                    <dxm:GeoPoint>-35, 40</dxm:GeoPoint>
                                                </dxm:MapPathFigure.StartPoint>
                                                <dxm:MapPathFigure.Segments>
                                                    <dxm:MapPolyLineSegment>
                                                        <dxm:MapPolyLineSegment.Points>
                                                            <dxm:GeoPoint>-50, 60</dxm:GeoPoint>
                                                            <dxm:GeoPoint>-55, 55</dxm:GeoPoint>
                                                            <dxm:GeoPoint>-50, 65</dxm:GeoPoint>
                                                        </dxm:MapPolyLineSegment.Points>
                                                    </dxm:MapPolyLineSegment>
                                                </dxm:MapPathFigure.Segments>
                                            </dxm:MapPathFigure>
                                        </dxm:MapPathGeometry.Figures>
                                    </dxm:MapPathGeometry>
                                </dxm:MapPath.Data>
                            </dxm:MapPath>
                            <!--endregion #MapPath-->

                            <!--region #MapPolygon-->
                            <dxm:MapPolygon>
                                <dxm:MapPolygon.Points>
                                    <dxm:GeoPoint>10, 10</dxm:GeoPoint>
                                    <dxm:GeoPoint>20, 10</dxm:GeoPoint>
                                    <dxm:GeoPoint>10, 20</dxm:GeoPoint>
                                </dxm:MapPolygon.Points>
                            </dxm:MapPolygon>
                            <!--endregion #MapPolygon-->

                            <!--region #MapPolyline-->
                            <dxm:MapPolyline>
                                <dxm:MapPolyline.Points>
                                    <dxm:GeoPoint>0, 0</dxm:GeoPoint>
                                    <dxm:GeoPoint>-20, -10</dxm:GeoPoint>
                                    <dxm:GeoPoint>-10, -20</dxm:GeoPoint>
                                </dxm:MapPolyline.Points>
                            </dxm:MapPolyline>
                            <!--endregion #MapPolyline-->

                            <!--region #MapPushpin-->
                            <dxm:MapPushpin Location="80, 80" Text="A"/>
                            <!--endregion #MapPushpin-->

                            <!--region #MapRectangle-->
                            <dxm:MapRectangle Location="60, 80" Width="2000" Height="1000"/>
                            <!--endregion #MapRectangle-->

                            <!--region #MapCustomElement-->
                            <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>
                            <!--endregion #MapCustomElement-->
                        </dxm:MapItemStorage>
                    </dxm:VectorLayer>
            </dxm:MapControl.Layers>
        </dxm:MapControl>

    </Grid>

</Window>

Implements

See Also