Skip to main content
A newer version of this page is available. .

MapEllipse.CreateInPixelsByCenter(MapControl, CoordPoint, Int32, Int32) Method

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

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v20.1.dll

NuGet Package: DevExpress.Win.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 Form1_Load(object sender, EventArgs e) {
    MapItemStorage storage = new MapItemStorage();
    MapEllipse ellipse = MapEllipse.CreateInPixelsByCenter(mapControl1, new GeoPoint(53.3026, 0.739), 100, 100);
    storage.Items.Add(ellipse);

    VectorItemsLayer vectorlayer = new VectorItemsLayer();
    vectorlayer.Data = storage;
    mapControl1.Layers.Add(vectorlayer);
}
See Also