Community of MapPoint and Virtual Earth Users and Developers
This is a discussion on DisplayDatamap and ArrayOfCustomValues within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I'm really at wits end here. I'm trying to display sized pie charts showing the balance of inbound and outbound ...
| |||||||
| Today's Posts | Twitter Feed | Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| DisplayDatamap and ArrayOfCustomValues However, the help files are mostly useless in this area. All it says is that only the first and last values should be passed, but doesn't show how. I've seen a handful (okay, 3) posts around the net that are kinda-sorta-related, but nothing substantial -- that works. Every time I try to pass specific values, I recieve the oh-so-helpful "The parameter is incorrect." Below is the main example, with variations following. I've got other issues going on, but this is by far the most frustrating. Help appreciated in advance. Thanks, Anthony. (NOTE: I've tried in all of these both 0 and 1 as the starting value) Main procedure call: objDataSet.DisplayDataMap(geoDataMapTypeSizedPie, varArrayOfFields, , , geoRangeTypeContinuous, , , 3, Array(0,,3000), Array("0","1500","3000")) Var1: .....3, Array(0,1500,3000), Array("0","1500","3000")) Var2: Dim rngValues(1 To 3) As Variant Dim rngNames(1 To 3) As Variant rngValues(1) = 0 rngValues(3) = 3000 rngNames(1) = "0" rngNames(2) = "1500" rngNames(3) = "3000" .....3, rngValues, rngNames) Var2: Dim rngValues(1 To 3) As Variant Dim rngNames(1 To 2) As Variant rngValues(1) = 0 rngValues(3) = 3000 rngNames(1) = "0" rngNames(2) = "1500" rngNames(3) = "3000" .....3, rngValues, rngNames) |
| |||
| Two Possibilities...
1. No one has an answer. 2. No one (statistcally speaking) develops in this monster, so no one has an answer. Seriously, this program is BEAUTIFUL. You can produce some truly amazing maps to represent data. However, if you have a LOT to do with it, and are a programmer, you're gonna wanna take a crack at the object model. The problem? There are no resources out there. There's nothing like a "Developer's Guide to MapPoint Application Development" out there (as I doubt "MapPoint for Dummies" hits code that hard). I just don't get it. Every other MS environment where there's an object model you can hit programmably has some sort of guide to it. MP is well over 5 years old, but there's nothing. I'm just getting tired of telling my boss every day, "I'm not any further." |
| |||
|
PGLRepDev: I had the same problem with DisplayDataMap when passing integer or string arrays in for the legendvalues and legendlabels. I changed them to object[] arrays in C# and viola!. Not sure how that works in VB but thought this might help. KD |
| |||
| Re: Two Possibilities... Quote:
I've faced the same problem yesterday and today for many hours: The last hint I needed, I've found in this article: http://support.microsoft.com/default...b;EN-US;305200 Well, a long hardly commented peace of source, but it helped! For everyone who has the same problems here my peace of code that is working. I'm loading my data from a small Excel-Sheet and display the column "Inquiries" as SizedCircles on the map. Code: object[,] dataArray = { {1, GeoFieldType.geoFieldName}, {
2, GeoFieldType.geoFieldInformation}, {
3, GeoFieldType.geoFieldLatitude}, {
4, GeoFieldType.geoFieldLongitude}, {
5, GeoFieldType.geoFieldData}
};
MapPoint.DataSet dataSet = map.DataSets.ImportData(
"C:\\temp\\Example.xls!Sheet1"
, dataArray
, MapPoint.GeoCountry.geoCountryMultiCountry
, MapPoint.GeoDelimiter.geoDelimiterDefault
, MapPoint.GeoImportFlags.geoImportExcelSheet
);
object key = "inquiries";
Field field = dataSet.Fields.get_Item(ref key);
if(field != null) {
object missing = System.Reflection.Missing.Value;
DataMap dataMap = dataSet.DisplayDataMap(
GeoDataMapType.geoDataMapTypeSizedCircle // DataMapType
, field // DataField
, GeoShowDataBy.geoShowByLatLong // ShowDataBy
, GeoCombineDataBy.geoCombineByNone // CombineDataBy
, GeoDataRangeType.geoRangeTypeDiscreteEqualRanges // DataRangeType
, GeoDataRangeOrder.geoRangeOrderHighToLow // DataRangeOrder
, 8 // ColorScheme
, 6 // DataRangeCount
, missing // ArrayOfCustomValues
, missing // ArrayOfCustomNames
, missing // DivideByField
, missing // ArrayOfDataFieldLabels
, missing // ArrayOfPushpinSymbols
);
if(dataMap != null) {
dataMap.LegendTitle = "some title";
}
}
Name Description Lat Long Inquiries Let me know if this was useful to anyone. CU Roman |
| |||
| sample code
Here's my code where the enduser has given me a comma separated list of values: Code: Dim cvalues() As Object
if _datarangevalues <> "" then
ReDim cvalues(_datarangecount)
For irv As Integer = 0 To _datarangecount -1
cvalues(irv) = _datarangevalues.Split(",")(irv).trim()
Next
odatamap = dsgrid1.DisplayDataMap( _
DataMapType:=_datamaptype, _
DataField:=oField, _
ShowDataBy:=_showbydata , _
DataRangeCount:=_datarangecount, _
DataRangeType:=_datarangetype, _
DataRangeOrder:=_datarangeorder , _
ArrayOfCustomValues:=cvalues , _
ColorScheme:=mappoint.GeoDataConstants.geoColorSchemeDefault )
Else
' _datarangevalues = "" they didn't give me anything so
' I will leave out that parm and MP will split them up automatically
odatamap = dsgrid1.DisplayDataMap( _
DataMapType:=_datamaptype, _
DataField:=oField, _
ShowDataBy:=_showbydata , _
DataRangeCount:=_datarangecount, _
DataRangeType:=_datarangetype, _
DataRangeOrder:=_datarangeorder , _
ColorScheme:=mappoint.GeoDataConstants.geoColorSchemeDefault )
end if
|
![]() |
| Tags |
| arrayofcustomvalues, displaydatamap |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| DisplayDataMap | chpw | MapPoint 2006/2009 Discussion | 8 | 09-21-2006 06:13 AM |
| DisplayDataMap method c# | fletch | MapPoint 2006/2009 Discussion | 1 | 04-08-2005 06:26 AM |
| DisplayDataMap in Delphi 7 | Anonymous | MapPoint 2006/2009 Discussion | 0 | 12-17-2004 05:59 AM |
| DisplayDataMap with delphi ? | seb24 | MapPoint 2006/2009 Discussion | 0 | 01-29-2004 09:49 AM |
| DisplayDataMap and C# | Anonymous | MapPoint 2006/2009 Discussion | 0 | 07-04-2003 01:15 PM |
Madeira Holiday
Why not book a Madeira holiday through UlookUbook and enjoy this warm Portuguese island at a bargain price!