MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




DisplayDataMap

This is a discussion on DisplayDataMap within the MapPoint 2006 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 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  3 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 1 Week Ago
Junior Member
Yellow Belt
 
Join Date: Apr 2007
Posts: 27
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 6 Days Ago
Administrator
Yellow Belt
 
Join Date: Sep 2007
Posts: 22
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


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 4 Days Ago 08:11 AM
Latitude / Longitude DMS -> Decimal Converter - MP2K Magazine This thread Refback 5 Days Ago 11:55 PM
Programming with Microsoft MapPoint Location Server, Version 1.0 - MapPoint Articles - MP2K Magazine This thread Refback 6 Days Ago 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 Discussion 8 09-21-2006 06:13 AM
DisplayDatamap and ArrayOfCustomValues PGLRepDev MapPoint 2006 Discussion 5 06-21-2006 03:35 PM
DisplayDataMap in Delphi 7 Anonymous MapPoint 2006 Discussion 0 12-17-2004 05:59 AM
DisplayDataMap with delphi ? seb24 MapPoint 2006 Discussion 0 01-29-2004 09:49 AM
DisplayDataMap and C# Anonymous MapPoint 2006 Discussion 0 07-04-2003 01:15 PM


All times are GMT -5. The time now is 08:51 PM.


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

Cheap Flights from Manchester
Book cheap flights from Manchester Airport from a range of Tour Operators and airlines. Holiday Hypermarket will help you jet off. Visit online to find useful airport information too.

Flights to Italy
Find and book flights to Italy. Travel Counsellors can help with travel to Italy including flights and accommodation.

Cuba Holidays
After years of neglect by the western world, Cuba is coming back onto the holiday scene. Cuba Holidays are a unique and enjoyable experience. Book at dealchecker.co.uk.

Jamaica Holidays
Jamaica holidays give you the chance to enjoy the vibrant cultural heritage and wonderful laid back atmosphere of the Caribbean. Book here!

Egypt
In Egypt you find an ancient city buzzing with life. There is an abundance of historical sites to see, not just the pyramids. The Opera House is certainly worth a visit and you can enjoy some open-air theatre too.

All inclusive holidays
To plan all inclusive holidays, use Travel.co.uk to explore all the possibilities.

Cheap Holidays in Goa
Visit the unique blend of east and west in India! Get information on cheap holidays in Goa, 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