MapEllipse.CreateInPixelsByCenter(MapControl, CoordPoint, Int32, Int32) Method
In This Article
Creates a map ellipse with dimensions in pixels and the center with specified coordinates.
Namespace: DevExpress.XtraMap
Assembly: DevExpress.XtraMap.v24.2.dll
NuGet Package: DevExpress.Win.Map
#Declaration
public static MapEllipse CreateInPixelsByCenter(
MapControl map,
CoordPoint center,
int pixelWidth,
int pixelHeight
)
#Parameters
Name | Type | Description |
---|---|---|
map | Map |
The map control that will contain the newly created ellipse. |
center | Coord |
The ellipse center. |
pixel |
Int32 | The ellipse’s width in pixels. |
pixel |
Int32 | The ellipse’s height in pixels. |
#Returns
Type | Description |
---|---|
Map |
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