Back to Devexpress

CoordinateSystemDataAdapterBase.SourceCoordinateSystem Property

windowsforms-devexpress-dot-xtramap-dot-coordinatesystemdataadapterbase.md

latest5.3 KB
Original Source

CoordinateSystemDataAdapterBase.SourceCoordinateSystem Property

Gets or sets the coordinate system of a data adapter.

Namespace : DevExpress.XtraMap

Assembly : DevExpress.XtraMap.v25.2.dll

NuGet Package : DevExpress.Win.Map

Declaration

csharp
public SourceCoordinateSystem SourceCoordinateSystem { get; set; }
vb
Public Property SourceCoordinateSystem As SourceCoordinateSystem

Property Value

TypeDescription
SourceCoordinateSystem

A SourceCoordinateSystem 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 SourceCoordinateSystem 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#L30

csharp
Adapter.FileUri = new Uri(baseUri, geoMapGeoDataFile);
Adapter.SourceCoordinateSystem = new GeoSourceCoordinateSystem();

winforms-map-convert-a-cartesian-data-shapefile-to-geo-coordinates/CS/MapSample/Form1.cs#L81

csharp
{
    shapefileDataAdapter1.SourceCoordinateSystem= ShapefileDataAdapter.LoadPrjFile(new Uri(dialog.FileName));
    btnSave.Enabled = true;

winforms-map-load-cartesian-data-to-a-map-control-with-a-coordinate-converter/CS/BuildInCoordinateConverters/Form1.cs#L95

csharp
adapter.FileUri = fileUri;
    adapter.SourceCoordinateSystem = data.CoordinateSystem;
}

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

vb
Adapter.FileUri = New Uri(baseUri, geoMapGeoDataFile)
Adapter.SourceCoordinateSystem = New GeoSourceCoordinateSystem()
mapControl.CoordinateSystem = New GeoMapCoordinateSystem()

winforms-map-convert-a-cartesian-data-shapefile-to-geo-coordinates/VB/MapSample/Form1.vb#L69

vb
If dialog.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
    shapefileDataAdapter1.SourceCoordinateSystem= ShapefileDataAdapter.LoadPrjFile(New Uri(dialog.FileName))
    btnSave.Enabled = True

winforms-map-load-cartesian-data-to-a-map-control-with-a-coordinate-converter/VB/BuildInCoordinateConverters/Form1.vb#L48

vb
adapter.FileUri = fileUri
    adapter.SourceCoordinateSystem = data.CoordinateSystem
End Sub

See Also

CoordinateSystemDataAdapterBase Class

CoordinateSystemDataAdapterBase Members

DevExpress.XtraMap Namespace