DisplayDataMap method

Displays the set of data as a DataMap object. Any parameters that are not set will have the default values that would be used in the Data Mapping Wizard in the user interface. When you change one or more parameters using this method, the other parameters do not change. Fails for DataSet objects with a DataMapType property of geoDataMapTypeTerritory.

Applies to

Objects:  DataSet

Syntax

Click a parameter to jump to its description below.

object .DisplayDataMap([DataMapType], [DataField], [ShowDataBy], [CombineDataBy], [DataRangeType], [DataRangeOrder], [ColorScheme], [DataRangeCount], [ArrayOfCustomValues], [ArrayOfCustomNames], [DivideByField], [ArrayOfDataFieldLabels], [ArrayOfPushpinSymbols])

Parameters

Part Description
object Required. An expression that returns a DataSet object.
DataMapType Optional GeoDataMapType. The type of data map to display. Default is geoDataMapTypeDefault.
GeoDataMapType Value Description
geoDataMapTypeCategoricalColumn
8
Column Chart Map
geoDataMapTypeDefault
–1
MapPoint will select the map type
geoDataMapTypeMultipleSymbol
5
Multiple Symbol Map
geoDataMapTypeNone
0
Not valid for use with the DisplayDataMap method
geoDataMapTypePushpin
4
Pushpin Map
geoDataMapTypeSeriesColumn
9
Series Column Chart Map
geoDataMapTypeShadedArea
1
Shaded Area Map
geoDataMapTypeShadedCircle
3
Shaded Circle Map
geoDataMapTypeSizedCircle
2
Sized Circle Map
geoDataMapTypeSizedPie
6
Sized Pie Chart Map
geoDataMapTypeTerritory
10
Not valid for use with the DisplayDataMap method
geoDataMapTypeUnsizedPie
7
Unsized Pie Chart Map
DataField

Optional Variant. A Field object or an array of Field objects of the data set to be mapped. String fields are invalid for Unsized Pie Chart, Sized Pie Chart, Column Chart, and Series Column Chart maps. Default is the first valid field in the data set.

ShowDataBy Optional GeoShowDataBy. The geographical entity by which the data is to be shown on the map. See [GeoShowDataBy values](aa493407\(v=msdn.10\).md) for a list of values and descriptions. Default is geoShowByDefault.
CombineDataBy

Optional GeoCombineDataBy. Used only if data aggregration is required. Data aggregation is required when the geographical entity designated by GeoShowDataBy is bigger than the set of data to be mapped. Is ignored (geoCombineByNone) if not needed or if the DataSet object has a HowCreated property of geoDataSetDemographic. Default is geoCombineByDefault.

GeoCombineDataBy Value Description
geoCombineByAdd
1
Data is combined by adding
geoCombineByAverage
2
Data is combined by calculating an average
geoCombineByCount
3
Data is combined by a count
geoCombineByDefault
–1
MapPoint will determine how to combine the data
geoCombineByNone
0
Data is not combined
DataRangeType Optional GeoDataRangeType. Determines the appearance of data on the map by range type. Default is geoRangeTypeDefault.
GeoDataRangeType Value Description
geoRangeTypeContinuous
1
Continuous range of data (used by all map types except Multiple Symbol and Unsized Pie Chart maps)
geoRangeTypeContinuousLog
2
Continuous logarithmic range of data (used by all map types except Multiple Symbol and Unsized Pie Chart maps)
geoRangeTypeDefault
–1
MapPoint will determine a range type
geoRangeTypeDiscreteEqualRanges
3
Discrete equal ranges of data (used by Shaded Area, Shaded Circle, Sized Circle, Multiple Symbol, and Sized Pie Chart maps)
geoRangeTypeDiscreteLogRanges
5
Discrete logarithmic ranges of data (used by Shaded Area, Shaded Circle, Sized Circle Maps, Multiple Symbol, and Sized Pie Chart maps)
geoRangeTypeEqualDataPoints
4
Equal data points (used by Shaded Area, Shaded Circle, Sized Circle, Multiple Symbol, and Sized Pie Chart maps)
geoRangeTypeNone
7
Data is not mapped as a range (used for Unsized Pie Chart maps)
geoRangeTypeUniqueValues
6
Data that contains text strings, categories, or classes of data (used by Shaded Area, Shaded Circle, Sized Circle, and Multiple Symbol maps)
DataRangeOrder

Optional GeoDataRangeOrder. Determines the order in which data is displayed. Ignored for Unsized Pie Chart, Column Chart, and Series Column Chart maps. Default is geoRangeOrderDefault.

GeoDataRangeOrder Value Description
geoRangeOrderDefault
–1
MapPoint will determine a range order
geoRangeOrderHighToLow
2
Display data in high to low order
geoRangeOrderLowToHigh
1
Display data in low to high order
ColorScheme

Optional Long. An integer that determines the color scheme used for mapped data. See the ColorScheme property topic for color schemes and integer values associated with different data map types. Default is geoColorSchemeDefault (-1).

DataRangeCount Optional Long. An integer (1–8) that indicates the number of data ranges. Ignored for continuous data ranges and Unsized Pie Chart, Column Chart, and Series Column Chart maps.

ArrayOfCustomValues

Optional Variant. An array of the custom value for each data range. If used, this parameter sets the [IsCustomized property](aa493184\(v=msdn.10\).md) of a [DataRanges collection](aa493052\(v=msdn.10\).md), which will be cleared if the user changes the range type. Ignored for Unsized Pie Chart maps.

For continuous and continuous logarithmic ranges, the array size is 3. Only the first and last values should be set (similar to the user interface where the middle value is disabled).

For unique values, the array size is equal to the DataRangeCount parameter.

For discrete equal ranges, discrete logarithmic ranges, and equal data points, the array size is equal to the DataRangeCount parameter +1. Contains the low values of each range plus the high value of the top range.

For Column Chart and Series Column Chart maps, the array size is 5 to match the ArrayOfCustomNames parameter, but only the first and last values are used (similar to the user interface where the middle three values are disabled).

ArrayOfCustomNames Optional Variant. An array that contains labels for the map legend. Ignored for Unsized Pie Chart maps.

For continuous ranges, the array size is 3.

For Column Chart and Series Column Chart maps, the array size is 5.

For all others, the array size is determined by the DataRangeCount parameter.

DivideByField Optional Variant. The field or column to which the [DataFields property](aa493121\(v=msdn.10\).md) of the DataMap object is compared. If this parameter is not provided, then the current DivideByField is used. To clear the DivideByField, pass in an empty variant.
ArrayOfDataFieldLabels Optional Variant. An array that contains color labels for the legend. For Series Column Chart maps, the array size is 1. For the other map types, the array size is equal to the number of data fields.
ArrayOfPushpinSymbols Optional Variant. An array that establishes the Pushpin symbols used with Multiple Symbol maps. The array size is equal to the DataRangeCount parameter, and values are 0–335, or if custom symbols are used, 0 to the highest [ID property](aa493169\(v=msdn.10\).md) of a custom [Symbol object](aa493080\(v=msdn.10\).md).

Remarks

To open the Data Mapping Wizard for user input, use the ShowDataMappingWizard method on the DataSets collection.

To learn more about mapping data, see the Getting started with data sets and data mapping reference topic.

Example

  [Microsoft Visual Basic 6.0]
Sub CreateShadedAreaMapUsingMapPointDemographics()   Dim objApp As New MapPoint.Application   Dim objDataSet As MapPoint.DataSet   Dim objDataMap As MapPoint.DataMap   Dim objField As MapPoint.Field
  'Set up application and objects to use   objApp.Visible = True   objApp.UserControl = True   Set objDataSet = objApp.ActiveMap.DataSets.GetDemographics()   Set objField = objDataSet.Fields("Households (2000)")
  'Create the data map, and give it a name   Set objDataMap = _     objDataSet.DisplayDataMap(geoDataMapTypeShadedArea, _     objField, geoShowByRegion1, geoCombineByDefault, _     geoRangeTypeDiscreteEqualRanges, geoRangeOrderDefault, 15)   objDataMap.LegendTitle = "State Households" End Sub
[C#]
void CreateShadedAreaMapUsingMapPointDemographics() { MapPoint.ApplicationClass objApp = new MapPoint.ApplicationClass(); MapPoint.DataSet objDataSet; MapPoint.DataMap objDataMap; MapPoint.Field objField; //Set up application objApp.Visible = true; objApp.UserControl = true; //Get a new demographics set to DataMap objDataSet = objApp.ActiveMap.DataSets.GetDemographics(MapPoint.GeoCountry.geoCountryDefault); //Get a field from the demographics object key = "Households (2000)"; object missing = System.Type.Missing; objField = objDataSet.Fields.get_Item(ref key); //Create the data map and give it a name objDataMap = objDataSet.DisplayDataMap(MapPoint.GeoDataMapType.geoDataMapTypeShadedArea, objField, MapPoint.GeoShowDataBy.geoShowByRegion1, MapPoint.GeoCombineDataBy.geoCombineByDefault, MapPoint.GeoDataRangeType.geoRangeTypeDiscreteEqualRanges, MapPoint.GeoDataRangeOrder.geoRangeOrderDefault, 15, 0, missing, missing, missing, missing, missing); objDataMap.LegendTitle = "State Households"; }

Note  This sample code is specifically for use in MapPoint North America; it is for illustration purposes only.