Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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.
Objects: DataSet
Click a parameter to jump to its description below.
object .DisplayDataMap([DataMapType], [DataField], [ShowDataBy], [CombineDataBy], [DataRangeType], [DataRangeOrder], [ColorScheme], [DataRangeCount], [ArrayOfCustomValues], [ArrayOfCustomNames], [DivideByField], [ArrayOfDataFieldLabels], [ArrayOfPushpinSymbols])
Part | Description | |||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
object | Required. An expression that returns a DataSet object. | |||||||||||||||||||||||||||||||||||||||
DataMapType |
Optional GeoDataMapType. The type of data map to display. Default is geoDataMapTypeDefault.
|
|||||||||||||||||||||||||||||||||||||||
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.
|
|||||||||||||||||||||||||||||||||||||||
DataRangeType |
Optional GeoDataRangeType. Determines the appearance of data on the map by range type. Default is geoRangeTypeDefault.
|
|||||||||||||||||||||||||||||||||||||||
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.
|
|||||||||||||||||||||||||||||||||||||||
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.
|
|||||||||||||||||||||||||||||||||||||||
ArrayOfCustomNames |
Optional Variant. An array that contains labels for the map legend. Ignored for Unsized Pie Chart maps.
|
|||||||||||||||||||||||||||||||||||||||
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). |
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.
[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.