This topic provides information on how to bind the UltraGeographicMap™ control to models that contain geographic data.
The following table lists the topics required as a prerequisite to understanding this topic.
This topic contains the following sections
The UltraGeographicMap control is designed to display geo-spatial data from shape files and/or geographic locations from data models on geographic imagery maps. The DataSource property of geographic series is used for the purpose of binding to data models. This property can be bound to any object that implements the IEnumerable interface (e.g. List, Collection, Queue, Stack). However, some types of geographic series require that each data item must have properties with specific data structures.
The following table summarized data structures required for each type of geographic series :
The following is a preview of the UltraGeographicMap control with GeographicSymbolSeries bound to a data model that contains locations of some cities of the world.
The following code shows how to bind the GeographicSymbolSeries to a data model that contains geographic locations of some cities of the world stored using the IEnumerable<Infragistics.Win.DataVisualization.Point> .
In Visual Basic:
Dim series = New GeographicSymbolSeries()
series.LongitudeMemberPath="X"
series.LatitudeMemberPath="Y"
Dim geoLocations = New List<Infragistics.Win.DataVisualization.Point>()
geoLocations.Add(New Point() With { .X = 0.12, .Y = 51.5 })
geoLocations.Add(New Point() With { .X = 37.51, .Y = 55.75 })
geoLocations.Add(New Point() With { .X = 151.2, .Y = -33.83 })
geoLocations.Add(New Point() With { .X = 139.6917, .Y = 35.6895 })
geoLocations.Add(New Point() With { .X = 77.225, .Y = 28.6353 })
geoLocations.Add(New Point() With { .X = -99.1276, .Y = 19.427 })
geoLocations.Add(New Point() With { .X = -73.987, .Y = 40.7561 })
geoLocations.Add(New Point() With { .X = -118.2434, .Y = 34.0522 })
geoLocations.Add(New Point() With { .X = -46.6388, .Y = -23.5489 })
series.DataSource = geoLocations
Me.GeoMap.Series.Add(series)
In C#:
var series = new GeographicSymbolSeries();
series.LongitudeMemberPath="X";
series.LatitudeMemberPath="Y";
var geoLocations = new List<Infragistics.Win.DataVisualization.Point>();
geoLocations.Add(new Point() { X = 0.12, Y = 51.50 });
geoLocations.Add(new Point() { X = 37.51, Y = 55.75 });
geoLocations.Add(new Point() { X = 151.2, Y = -33.83 });
geoLocations.Add(new Point() { X = 139.6917, Y = 35.6895 });
geoLocations.Add(new Point() { X = 77.2250, Y = 28.6353 });
geoLocations.Add(new Point() { X = -99.1276, Y = 19.4270 });
geoLocations.Add(new Point() { X = -73.9870, Y = 40.7561 });
geoLocations.Add(new Point() { X = -118.2434, Y = 34.0522 });
geoLocations.Add(new Point() { X = -46.6388, Y = -23.5489 });
series.DataSource = geoLocations;
this.GeoMap.Series.Add(series);
The following topics provide additional information related to this topic.