windowsforms-devexpress-dot-xtramap-dot-mapcontrol-9e7836c6.md
Gets or sets the center point of a map control.
Namespace : DevExpress.XtraMap
Assembly : DevExpress.XtraMap.v25.2.dll
NuGet Package : DevExpress.Win.Map
public CoordPoint CenterPoint { get; set; }
Public Property CenterPoint As CoordPoint
| Type | Description |
|---|---|
| CoordPoint |
A CoordPoint class descendant object.
|
Use a GeoPoint object to specify MapControl.CenterPoint when MapControl.CoordinateSystem is set to a GeoMapCoordinateSystem object:
mapControl.CenterPoint = new GeoPoint(-21.1685, -175.1343);
mapControl.CenterPoint = New GeoPoint(-21.1685, -175.1343)
Use a CartesianPoint object to specify MapControl.CenterPoint when MapControl.CoordinateSystem is set to a CartesianMapCoordinateSystem object:
mapControl.CenterPoint = new CartesianPoint(-100, -50);
mapControl.CenterPoint = New CartesianPoint(-100, -50)
The following code snippets (auto-collected from DevExpress Examples) contain references to the CenterPoint property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
how-to-colorize-pushpin-items-based-on-data-source-data-t423869/CS/ColorPushpinFactory/Form1.cs#L24
void PopulateTable(int pointCount) {
GeoPoint centerPoint = (GeoPoint)mapControl1.CenterPoint;
Random r = new Random();
void NavigateTo(GeoPoint geoPoint) {
map.CenterPoint = geoPoint;
map.ZoomLevel = 15;
how-to-colorize-pushpin-items-based-on-data-source-data-t423869/VB/ColorPushpinFactory/Form1.vb#L26
Private Sub PopulateTable(ByVal pointCount As Integer)
Dim centerPoint As GeoPoint = CType(mapControl1.CenterPoint, GeoPoint)
Dim r As New Random()
Private Sub NavigateTo(ByVal geoPoint As GeoPoint)
map.CenterPoint = geoPoint
map.ZoomLevel = 15
See Also