Community of VE/MapPoint Users and Developers
This is a discussion on i want to use this example but it don't work within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hello, I use Mappointcontrol and visual basic 6. I want to use this code but when i execute my program ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| i want to use this example but it don't work I use Mappointcontrol and visual basic 6. I want to use this code but when i execute my program it tell : "Erreur d'execution : -2147024809" on the line "Set mpDataSet = mpDatasets.ImportData......" Can someone help me ?? Sorry for my bad english but i'm french My excel file structure is : A1:Latitude A2:48°52 B1:Longitude B2:2°20 C1:City C2:Paris My code is : Dim mpApp As MapPoint.Application Dim mpDatasets As MapPoint.DataSets Dim mpDataSet As MapPoint.DataSet Dim myExampleArray(3, 2) 'Start MapPoint Set mpApp = New MapPoint.Application mpApp.Visible = True mpApp.UserControl = True 'Get the DataSets collection Set mpDatasets = mpApp.NewMap.DataSets 'Create the ArrayOfFields descriptions 'Field is specified by name myExampleArray(1, 1) = "Latitude" 'tells MapPoint to use this field as the latitude field myExampleArray(1, 2) = geoFieldLatitude 'Field again specifed by name myExampleArray(2, 1) = "Longitude" 'tells MapPoint to use this field as the longitude field myExampleArray(2, 2) = geoFieldLongitude 'Field is listed by index, rather than name myExampleArray(3, 1) = 1 'tells MapPoint to use this field as additional (non geocoding) information myExampleArray(3, 2) = geoFieldData 'Perform the import Set mpDataSet = mpDatasets.ImportData("c:\foo.xls!Feuil1!A1:B3", myExampleArray) 'The (x,2) elements are of the type GeoFieldType or string. 'If string, then they set the new name of the field, and 'MapPoint assumes that the field is a nongeocoding data field. |
| ||||
|
Stephane, well your English beats my French and I sat through yers of it at school! Have you tried putting the longitudes and latitudes as decimal angles? eg. Latitude = 48 + (52 / 60) = 48.866667 (the 52 being minutes of arc, so divide by 60) MapPoint seems to work in decimal angles rather arc-minutes and arc-seconds. Richard
__________________ Winwaed Software Technology LLC http://www.winwaed.com See http://www.mapping-tools.com for MapPoint Tools Pre-Order MapPoint 2009 today: http://www.mapping-tools.com/mappoint2009 |
![]() |
| Tags |
| work |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Work with mapinfo by VB6, help me!!! | Anonymous | Other Mapping Platforms | 6 | 08-07-2008 01:09 PM |
| Will MapPoint Work for Me | budzinsk | MapPoint 2006/2009 Discussion | 2 | 06-07-2005 07:47 PM |
| .Net frame work ?? | pratap | MapPoint 2006/2009 Discussion | 4 | 01-21-2005 06:09 AM |
| does mappoint2002 work with win 95 | Anonymous | MapPoint 2006/2009 Discussion | 0 | 06-24-2003 08:45 AM |
| UDL to SQLServer doesn't work (C#) | Anonymous | MapPoint 2006/2009 Discussion | 0 | 04-03-2003 06:50 AM |