MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




DisplayDatamap and ArrayOfCustomValues

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 ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-16-2005
Junior Member
White Belt
 
Join Date: Mar 2005
Posts: 2
DisplayDatamap and ArrayOfCustomValues

I'm really at wits end here. I'm trying to display sized pie charts showing the balance of inbound and outbound shipments into an area. I'm outputting graphs for each state, and I'd like to equalize them so that all maps range between 1 and 3000.

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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 03-17-2005
Junior Member
White Belt
 
Join Date: Mar 2005
Posts: 2
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."
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 03-18-2005
Eric Frost's Avatar
Administrator
Black Belt
 
Join Date: Jul 1992
Posts: 2,210
Blog Entries: 1
I've had a lot of trouble with DisplayDataMap.. it always seems like a minor miracle once it works.

There is a lot of good content in the articles section.. also try using the Search just below the MP2K above, also try the Google search at the bottom.

Eric
__________________
Order MapPoint 2006 | Read Programming MapPoint in .NET | Start Using the Pushpin Tool - Free Trial Download - click here.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 04-15-2005
Junior Member
White Belt
 
Join Date: Jan 2005
Posts: 8
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 05-12-2005
Junior Member
White Belt
 
Join Date: May 2005
Posts: 1
Re: Two Possibilities...

Quote:
Originally Posted by PGLRepDev
1. No one has an answer.
2. No one (statistcally speaking) develops in this monster, so no one has an answer.
Hi kdulaney!

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";
  }
}
Example.xls!Sheet1 has following columns:
Name Description Lat Long Inquiries

Let me know if this was useful to anyone.

CU Roman
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 06-21-2006
Junior Member
White Belt
 
Join Date: Jun 2006
Posts: 1
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -5. The time now is 04:33 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5
MP2K Magazine
Visitor Map

Ski Deals
Book first-rate ski holidays from the leading travel brands at exceptionally competitive prices. Check out the latest range of ski deal online at Holiday Hypermarket.

Portugal Holidays
Find and book Portugal Holidays with Travel Counsellors. Holiday destinations around the world including Portugal.

Holiday Cuba
Most of all though, you will remember your Holiday in Cuba for the people. Naturally open and friendly with the warmest welcome in the Caribbean. Book at dealchecker.co.uk today.

All Inclusive Maldives
Visit The Holiday Place.co.uk for great deals on all inclusive holidays to the Maldives. Book a holiday to the outstandingly beautiful Maldives.

Balearics
Before booking to the Balearics Islands make sure you check out our travel guide online. The Balearics are renowned for their vibrant nightlife but there are also some stunning Gothic cathedrals, Stone Age ruins and fishing villages.

Inclusive late deals
For inclusive late deals, check out your options at Travel.co.uk and have fun!

Holidays to Cyprus
Take the plunge into a world of summer splendour! Find information on holidays to Cyprus online, only at On The Beach.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47