Community of MapPoint and Virtual Earth Users and Developers
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 ...
| |||||||
| Today's Posts | Twitter Feed | Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| DisplayDataMap 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 |
| |||
| 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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ![]() |
![]() |
| Tags |
| displaydatamap |
| ||||
| 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 | |
| |
| ||||
| 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 |
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.