Skip to main content
All docs
V25.2
  • MapEllipse.CreateInPixelsByCenter(MapControl, CoordPoint, Int32, Int32) Method

    Creates a map ellipse with dimensions in pixels and the center with specified coordinates.

    Namespace: DevExpress.Xpf.Map

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

    NuGet Package: DevExpress.Wpf.Map

    Declaration

    public static MapEllipse CreateInPixelsByCenter(
        MapControl map,
        CoordPoint center,
        int pixelWidth,
        int pixelHeight
    )

    Parameters

    Name Type Description
    map MapControl

    The map control that will contain the newly created ellipse.

    center CoordPoint

    The ellipse center.

    pixelWidth Int32

    The ellipse’s width in pixels.

    pixelHeight Int32

    The ellipse’s height in pixels.

    Returns

    Type Description
    MapEllipse

    The created ellipse.

    Remarks

    The following example shows how to create a map ellipse:

    private void Window_Loaded(object sender, RoutedEventArgs e) {
        MapItemStorage storage = new MapItemStorage();
        MapEllipse ellipse = MapEllipse.CreateInPixelsByCenter(mapControl1, new GeoPoint(53.3026, 0.739), 100, 100);
        storage.Items.Add(ellipse);
    
        VectorLayer vectorlayer = new VectorLayer();
        vectorlayer.Data = storage;
        mapControl1.Layers.Add(vectorlayer);
    }
    
    See Also