Community of MapPoint and Virtual Earth Users and Developers
This is a discussion on importdata to shaded areas within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi, I'm new to Mappoint 2004. I'm trying to use importdata from a query in an access mdb to create ...
| |||||||
| Today's Posts | Twitter Feed | Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| importdata to shaded areas I'm new to Mappoint 2004. I'm trying to use importdata from a query in an access mdb to create shaded areas with visual basic6. I obtain always a map with pushpin. I'm aggregating regional datas that i'm able to create in a shaded area with manual wizard. Do you know why? Thanks Max |
| |||
|
The code is something like this, but i always receive "parameter is incorrect" in method DisplayDataMap. Thanks for help!! myExampleArray(0, 0) = "tot" myExampleArray(0, 1) = geoFieldInformation myExampleArray(1, 0) = "PROVINCIA_AVV" myExampleArray(1, 1) = geoFieldRegion2 Set objDs = objMap.DataSets.ImportData("C:\Mp.mdb!Query_SinApe ", myExampleArray, geoCountryItaly, geoDelimiterDefault, geoImportAccessQuery) Set obField = objDs.Fields("provincia_avv") Set objMap = _ objDs.DisplayDataMap(geoDataMapTypeShadedArea, _ obField, geoShowByCity, geoCombineByDefault, _ geoRangeTypeDiscreteEqualRanges, geoRangeOrderDefault, 15) |
| ||||
| DataMaps
After a quick look max 1) I always run the subscripts on the Fields Array from 1 to n and not 0 to n-1 2) are you declaring your varriables? Maybe something is set by default to variant when it needs to be a specific type. Here is some code that does work: Public Sub example() Dim this_datamap As MapPoint.DataMap Dim this_field As MapPoint.Field Dim wk_DSs As MapPoint.DataSets Dim wk_ds As MapPoint.DataSet Dim wk_dbs As Database Dim wk_dsname As String Dim wk_fields(1 To 8, 1 To 2) As Variant wk_fields(1, 1) = "Name" wk_fields(2, 1) = "EventID" wk_fields(3, 1) = "wk_DateTime" wk_fields(4, 1) = "Latitude" wk_fields(5, 1) = "Longitude" wk_fields(6, 1) = "AVLID" wk_fields(7, 1) = "Speed" wk_fields(8, 1) = "Heading" wk_fields(1, 2) = geoFieldData wk_fields(2, 2) = geoFieldData wk_fields(3, 2) = geoFieldName wk_fields(4, 2) = geoFieldLatitude wk_fields(5, 2) = geoFieldLongitude wk_fields(6, 2) = geoFieldData wk_fields(7, 2) = geoFieldData wk_fields(8, 2) = geoFieldData wk_dsname = "my Truck" 'Opens a map and sets the global myobj as a MapPoint.Map wk_istat2 = Open_Map("...\My Documents\test.ptm") Set wk_dbs = CurrentDb() wk_qry = wk_dbs.Name & "!avlhistory" Set wk_DSs = myobj.DataSets Set wk_ds = wk_DSs.LinkData(wk_qry, "eventid", wk_fields, geoCountryCanada, , geoImportAccessQuery) wk_DSs.item(1).Name = wk_dsname Set this_field = wk_ds.Fields.item( 8 ) Set this_datamap = wk_ds.DisplayDataMap(geoDataMapTypeShadedArea, _ this_field, geoShowByCensus1, geoCombineByCount, _ geoRangeTypeDiscreteEqualRanges, geoRangeOrderDefault, 3, 4) End Sub Ciao,
__________________ Calv1ns |
| |||
| Importing Data
Hi, I am trying to work with the awesome code sample you posted but there is one bit I do not understand. and that is Open_Map("...\My Documents\test.ptm") Is Open)Map a function you built if so can you post that or explain what sysntax you use to open a map, Thanks Bruce Quote:
|
![]() |
| Tags |
| areas, importdata, shaded |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Deleting a dataset and shaded area on a map... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 04-10-2005 06:25 AM |
| Adding and Removing Shaded Areas... | jonny0311 | MapPoint 2006/2009 Discussion | 0 | 04-06-2005 09:44 AM |
| Pushpin and Shaded Circle Size | Anonymous | MapPoint 2006/2009 Discussion | 1 | 11-19-2004 08:23 AM |
| Using the shaded circle map and linked data, can I.... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 10-10-2001 07:28 AM |
| When using the shaded circles to plot a sum of net.... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 09-05-2001 06:08 AM |
Majorca Holiday
Enjoy a Majorca holiday at a good price when you check out the offers on UlookUbook for this popular destination!