Community of VE/MapPoint Users and Developers
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 ...
| |||||||
| 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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ![]() |
![]() |
| ||||
| 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 | |
| |
| ||||
| 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 |
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.