wpf-devexpress-dot-xpf-dot-map-d7cd6a84.md
This class allows use of the Cartesian coordinate system for the Map Control.
Namespace : DevExpress.Xpf.Map
Assembly : DevExpress.Xpf.Map.v25.2.dll
NuGet Package : DevExpress.Wpf.Map
public class CartesianMapCoordinateSystem :
MapCoordinateSystem
Public Class CartesianMapCoordinateSystem
Inherits MapCoordinateSystem
An object of the CartesianMapCoordinateSystem class can be assigned to the MapControl.CoordinateSystem property.
To load a vector Cartesian map, do the following.
using System.Windows;
using DevExpress.Xpf.Map;
namespace CartesianMap {
public partial class MainWindow : Window {
public MainWindow() {
InitializeComponent();
}
private void VectorLayer_DataLoaded(object sender, DataLoadedEventArgs e) {
mapControl.ZoomToFitLayerItems();
}
}
}
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dxm="http://schemas.devexpress.com/winfx/2008/xaml/map"
x:Class="CartesianMap.MainWindow"
Title="MainWindow" Height="720" Width="1280">
<Grid>
<dxm:MapControl x:Name="mapControl">
<dxm:MapControl.CoordinateSystem>
<dxm:CartesianMapCoordinateSystem/>
</dxm:MapControl.CoordinateSystem>
<dxm:VectorLayer DataLoaded="VectorLayer_DataLoaded">
<dxm:ShapefileDataAdapter FileUri="Data/Hotel1.shp">
<dxm:ShapefileDataAdapter.SourceCoordinateSystem>
<dxm:CartesianSourceCoordinateSystem/>
</dxm:ShapefileDataAdapter.SourceCoordinateSystem>
</dxm:ShapefileDataAdapter>
</dxm:VectorLayer>
</dxm:MapControl>
</Grid>
</Window>
Imports System.Windows
Imports DevExpress.Xpf.Map
Namespace CartesianMap
Partial Public Class MainWindow
Inherits Window
Public Sub New()
InitializeComponent()
End Sub
Private Sub VectorLayer_DataLoaded(ByVal sender As Object, ByVal e As DataLoadedEventArgs)
mapControl.ZoomToFitLayerItems()
End Sub
End Class
End Namespace
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CartesianMapCoordinateSystem class.
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.
wpf-map-load-vector-cartesian-data/CS/MapLesson2/MainWindow.xaml#L24
<dxm:MapControl.CoordinateSystem>
<dxm:CartesianMapCoordinateSystem/>
</dxm:MapControl.CoordinateSystem>
Object DispatcherObject DependencyObject Freezable MapDependencyObject MapCoordinateSystem CartesianMapCoordinateSystem
See Also