Back to Devexpress

MapControl.CenterPoint Property

windowsforms-devexpress-dot-xtramap-dot-mapcontrol-9e7836c6.md

latest4.6 KB
Original Source

MapControl.CenterPoint Property

Gets or sets the center point of a map control.

Namespace : DevExpress.XtraMap

Assembly : DevExpress.XtraMap.v25.2.dll

NuGet Package : DevExpress.Win.Map

Declaration

csharp
public CoordPoint CenterPoint { get; set; }
vb
Public Property CenterPoint As CoordPoint

Property Value

TypeDescription
CoordPoint

A CoordPoint class descendant object.

|

Remarks

csharp
mapControl.CenterPoint = new GeoPoint(-21.1685, -175.1343);
vb
mapControl.CenterPoint = New GeoPoint(-21.1685, -175.1343)
csharp
mapControl.CenterPoint = new CartesianPoint(-100, -50);
vb
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

csharp
void PopulateTable(int pointCount) {
    GeoPoint centerPoint = (GeoPoint)mapControl1.CenterPoint;
    Random r = new Random();

winforms-map-execute-the-search-operation-for-multiple-locations/CS/GetSearchLocationAdditionalInfo/Form1.cs#L75

csharp
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

vb
Private Sub PopulateTable(ByVal pointCount As Integer)
    Dim centerPoint As GeoPoint = CType(mapControl1.CenterPoint, GeoPoint)
    Dim r As New Random()

winforms-map-execute-the-search-operation-for-multiple-locations/VB/GetSearchLocationAdditionalInfo/Form1.vb#L69

vb
Private Sub NavigateTo(ByVal geoPoint As GeoPoint)
    map.CenterPoint = geoPoint
    map.ZoomLevel = 15

See Also

How to: Create a Map Control at Runtime

Map Coordinate Systems

MapControl Class

MapControl Members

DevExpress.XtraMap Namespace