Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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.v24.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