MapPoint Forums

MapForums

Community of MapPoint and Virtual Earth Users and Developers




DisplayDataMap

This is a discussion on DisplayDataMap within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hello all, I am using the code below to import data from a text file and map it. I get ...


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

Today's Posts Twitter Feed Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack (3) Thread Tools Display Modes
  3 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 05-04-2008
Junior Member
Yellow Belt
 
Join Date: Apr 2007
Posts: 29
DisplayDataMap

Hello all,

I am using the code below to import data from a text file and map it. I get the data on the map if I set map type to Pushpin, but if I try and map any other type of map - say, a pie chart with the 3 zips and associated data I have in the text file for each - I get a mapping error (something like NA - 13, type mismatch)...any ideas?

Thanks
MM
Dim missing AsObject = System.Reflection.Missing.Value
''Fill the generic map dataset with US map info
Dim MapDS As MapPoint.DataSet
MapDS = AxMappointControl1.ActiveMap.DataSets.ImportData(
"C:\Maps\ZipsMetricTemp.txt", missing, MapPoint.GeoCountry.geoCountryUnitedStates, MapPoint.GeoDelimiter.geoDelimiterTab, MapPoint.GeoImportFlags.geoImportFirstRowIsHeading s)
''
Dim Metric1 AsObject = 2 ' set which fields of the imput text file to use
Dim Metric2 AsObject = 3
Dim Metric3 AsObject = 4
Dim objFields(3) AsObject
objFields(0) = MapDS.Fields(Metric1) 'put the fileds into order in the DS fields array
objFields(1) = MapDS.Fields(Metric2)
objFields(2) = MapDS.Fields(Metric3)
''Set the main demo fields based on the array sent in "demo" and the total # in NoOfDemos of the arguments of this sub
Dim objmap As MapPoint.DataMap
Try'***************Main map display call
'
objmap = MapDS.DisplayDataMap( _
MapPoint.GeoDataMapType.geoDataMapTypeUnsizedPie, _
objFields, _
MapPoint.GeoShowDataBy.geoShowByRegion1, _
MapPoint.GeoCombineDataBy.geoCombineByDefault, _
MapPoint.GeoDataRangeType.geoRangeTypeDefault, _
MapPoint.GeoDataRangeOrder.geoRangeOrderDefault, _
15, _
0, _
missing, _
missing, _
missing, _
missing, _
missing)
Catch ex As Exception
MsgBox(
"A map error has occured; please re-select map configuration items and try again" & ex.Source & ex.Message)
EndTry
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 05-05-2008
Administrator
Green Belt
 
Join Date: Sep 2007
Posts: 100
Re: DisplayDataMap

The book Programming MapPoint in .NET has a good long section on using the DisplayDataMap method.. it's very fidgety. If you have just one parameter that is incorrect or was not exactly as expected, it will through that error. But there's no way (I'm aware of) to tell what parameter was messed up. I pull out the Programming MapPoint in .NET book every time I work with DisplayDataMap. The examples are all in C# (slight differences from VB6/VBA syntax).
Eric
__________________
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contribute and Learn at our New MapPoint and Virtual Earth Wiki - http://www.MapElves.com
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
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

Tags
displaydatamap


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/displaydatamap-7641.html

Posted By For Type Date
Programming MapPoint in .NET - MP2K Magazine This thread Refback 05-07-2008 08:11 AM
Latitude / Longitude DMS -> Decimal Converter - MP2K Magazine This thread Refback 05-05-2008 11:55 PM
Programming with Microsoft MapPoint Location Server, Version 1.0 - MapPoint Articles - MP2K Magazine This thread Refback 05-05-2008 06:59 AM

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 and ArrayOfCustomValues PGLRepDev MapPoint 2006/2009 Discussion 5 06-21-2006 03:35 PM
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 06:52 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0 RC2
MP2K Magazine
Visitor Map

Zante Holidays
Enjoy lovely sandy beaches when you take your Zante holidays booked through UlookUbook!

Restaurants London...
Qype makes it easy for you to find the right restaurants in London, every time.



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 48 49 50 51 52 53 54 55 56 57 58 59