Load Vector Data from a Shapefile

  • 2 min to read

This document describes the basics of working with Shapefiles using the Map Control.

This subject consists of the following sections.

Overview

A Shapefile (Esri Shapefile) is a vector format that represents geographic data (e.g., rivers, lakes, and countries) using geometries (e.g., points, polylines, and polygons). Data in this format is usually stored in two files:

  • a .shp file that contains data about geometries;
  • a .dbf file that contains data associated with geometries from the corresponding .shp file.
NOTE

To learn more about the Shapefile format, refer to Shapefile (Wikipedia).

The image below illustrates country shapes, along with supplemental information (country names in a tooltip) loaded from a Shapefile.

ShapefilesSupport

Load Shapefile Data

To load shapes from a Shapefile, do the following.

When data is loaded from a Shapefile, the Map control generates a collection of vector items objects stored in a VectorLayer.

NOTE

Note that in this case, data from a .dbf file is stored as attributes in each vector item object. This approach allows you, for instance, to use this data to colorize shapes or display supplementary information in shape tooltips.

Examples

To learn how to load vector data from a shapefile, see the How to: Load Data from a Shapefile example.