Back to Devexpress

MapControl.CoordinateSystem Property

windowsforms-devexpress-dot-xtramap-dot-mapcontrol-363e9c7b.md

latest4.0 KB
Original Source

MapControl.CoordinateSystem Property

Gets or sets the map coordinate system used by a map control.

Namespace : DevExpress.XtraMap

Assembly : DevExpress.XtraMap.v25.2.dll

NuGet Package : DevExpress.Win.Map

Declaration

csharp
public MapCoordinateSystem CoordinateSystem { get; set; }
vb
Public Property CoordinateSystem As MapCoordinateSystem

Property Value

TypeDescription
MapCoordinateSystem

A MapCoordinateSystem class descendant object.

|

Example

View Example

csharp
void SetGeoMapGeoData() {
    imageLayer.Visible = false;

    Uri baseUri = new Uri(System.Reflection.Assembly.GetEntryAssembly().Location);
    Adapter.FileUri = new Uri(baseUri, geoMapGeoDataFile);
    Adapter.SourceCoordinateSystem = new GeoSourceCoordinateSystem();

    mapControl.CoordinateSystem = new GeoMapCoordinateSystem();
}
vb
Private Sub SetGeoMapGeoData()
    imageLayer.Visible = False

    Dim baseUri As New Uri(System.Reflection.Assembly.GetEntryAssembly().Location)
    Adapter.FileUri = New Uri(baseUri, geoMapGeoDataFile)
    Adapter.SourceCoordinateSystem = New GeoSourceCoordinateSystem()

    mapControl.CoordinateSystem = New GeoMapCoordinateSystem()
End Sub

The following code snippets (auto-collected from DevExpress Examples) contain references to the CoordinateSystem 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.

winforms-map-customize-coordinate-systems-of-a-map/CS/CoordinateSystems/Form1.cs#L32

csharp
mapControl.CoordinateSystem = new GeoMapCoordinateSystem();
}

chart-for-winforms-specify-a-map-projection/CS/MapProjections/Form1.cs#L23

csharp
GeoMapCoordinateSystem CoordinateSystem { get { return mapControl.CoordinateSystem as GeoMapCoordinateSystem; } }

winforms-map-customize-coordinate-systems-of-a-map/VB/CoordinateSystems/Form1.vb#L36

vb
Adapter.SourceCoordinateSystem = New GeoSourceCoordinateSystem()
    mapControl.CoordinateSystem = New GeoMapCoordinateSystem()
End Sub

chart-for-winforms-specify-a-map-projection/VB/MapProjections/Form1.vb#L27

vb
Get
    Return TryCast(mapControl.CoordinateSystem, GeoMapCoordinateSystem)
End Get

See Also

MapControl Class

MapControl Members

DevExpress.XtraMap Namespace