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