Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

How to: Load a Vector Cartesian Map

To load a vector Cartesian map, do the following.

  1. Crete a ShapefileDataAdapter object.
  2. Set its CoordinateSystemDataAdapterBase.SourceCoordinateSystem property to a CartesianSourceCoordinateSystem object.
  3. Specify its ShapefileDataAdapter.FileUri property.
  4. Assign this object to the VectorLayer.Data property.
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();
        }
    }
}