Version

Using Geographic Shape Series

Purpose

This topic provides information on how to use the GeographicShapeSeries element in the UltraGeographicMap™ control.

Required background

The following table lists the topics required as a prerequisite to understanding this topic.

Topic Purpose

This topic provides information on how to add the UltraGeographicMap control to an application page.

This topic provides information about layout of map elements in the UltraGeographicMap control.

This topic provides resources with information about maps, shape files, and geo-spatial related material. Use these resources to learn about and obtain geo-spatial shape files as well as tools for their editing.

This topic provides information on how to bind shape files with geo-spatial data to the UltraGeographicMap control.

This topic provides information about supported types of geographic series in the UltraGeographicMap control.

In this topic

This topic contains the following sections:

Geographic Shape Series

Overview

In the UltraGeographicMap control, the GeographicShapeSeries is a visual map element that displays geo-spatial data using shape polygons in a geographic context. This type of geographic series is often used to render shapes of countries or regions defined by geographic locations. The GeographicShapeSeries works a lot like the GeographicPolylineSeries except that geo-spatial data is rendered with polygons instead of polylines.

Preview

The following is a preview of the UltraGeographicMap control with GeographicShapeSeries plotting countries of the world.

GeographicMap Using Geographic Shape Series 1.png

Data Requirements

Similarly to other types of geographic series in the UltraGeographicMap control, the GeographicShapeSeries has the DataSource property for the purpose of data binding. This property can be bound to an object that implements IEnumerable interface. In addition, each item in this object must have one data column that stores geographic locations (longitude and latitude) of a shape using the IEnumerable<> or IEnumerable<IEnumerable<>> structure. The latter is the standard data structure used by shape files and the ShapefileConverter class. This data column is then mapped to the ShapeMemberPath property. The GeographicShapeSeries uses points of this mapped data column to plot polygons in the UltraGeographicMap control.

Example

The following code shows how to bind the GeographicShapeSeries to shapes of countries in the world loaded from a shape file using the ShapefileConverter.

In Visual Basic:

' create and set data binding to the GeographicShapeSeries
Dim geoSeries = New GeographicShapeSeries()
geoSeries.DataSource = shapefileConverter
geoSeries.ShapeMemberPath = "Points"
' add the GeographicShapeSeries to the the UltraGeographicMap
Me.GeoMap.Series.Add(geoSeries)

In C#:

// create and set data binding to the GeographicShapeSeries
var geoSeries = new GeographicShapeSeries();
geoSeries.DataSource = shapefileConverter;
geoSeries.ShapeMemberPath = "Points";
// add the GeographicShapeSeries to the the UltraGeographicMap
this.GeoMap.Series.Add(geoSeries);

Related Content

The following topics provide additional information related to this topic.

Topic Purpose

This topic provides information on how to add the UltraGeographicMap control to an application page.

This topic provides information about layout of map elements in the UltraGeographicMap control.

This topic provides resources with information about maps, shape files, and geo-spatial related material. Use these resources to learn about and obtain geo-spatial shape files as well as tools for their editing.

This topic provides information on how to bind shape files with geo-spatial data to the UltraGeographicMap control.

This topic provides information about supported types of geographic series in the UltraGeographicMap control.