Community of VE/MapPoint Users and Developers
This is a discussion on Problems using CalcPos within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi all, I'm quite new to VB and very new to using VB with MapPoint I recently created a database ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Problems using CalcPos I recently created a database that looks up customer shipping address and displays them in MapPoint along with the address etc in the balloon I'd like to be a able to geocode but that are a lack of free resources in the UK, especially for the amount of locations that I'd like to do Earlier today I read about using CalcPos to give the long and lat of a location but I'm stuck as to how to implement it and output the data This is the code I'm using currently Code: Private Sub Command0_Click()
'Dim FilePathAndName As String
Dim objMap As MapPoint.Map
Dim objDataSet As MapPoint.DataSet
Dim objDataSet1 As MapPoint.DataSet
Dim objPushpin As MapPoint.Pushpin
'FilePathAndName = Application.Path &
' "C:\Documents and Settings\pete.gaulton\My Documents\ServiceExchange_MapPoint.xls!Sheet1"
Set objMap = MappointControl1.ActiveMap
DoCmd.Hourglass True
' Field Service records - blue dots
Set objDataSet = objMap.DataSets.ImportData("I:\Warehousing_Distribution\_Databases\Service_Exchange\ServiceExchange_FieldService.xls")
arArray = Array(objDataSet.Fields(1), objDataSet.Fields(2), objDataSet.Fields(4), objDataSet.Fields(3), objDataSet.Fields(6), objDataSet.Fields(7), objDataSet.Fields(8), objDataSet.Fields(9), objDataSet.Fields(10), objDataSet.Fields(11))
objDataSet.SetFieldsVisibleInBalloon arArray
objDataSet.Symbol = 20
Me.txtUnmatched_FieldService = objDataSet.UnmatchedRecordCount
' Customer records - red dots
Set objDataSet1 = objMap.DataSets.ImportData("I:\Warehousing_Distribution\_Databases\Service_Exchange\ServiceExchange_excFieldService.xls")
arArray = Array(objDataSet1.Fields(1), objDataSet1.Fields(2), objDataSet1.Fields(4), objDataSet1.Fields(3), objDataSet1.Fields(6), objDataSet1.Fields(7), objDataSet1.Fields(8), objDataSet1.Fields(9), objDataSet1.Fields(10), objDataSet1.Fields(11))
objDataSet1.SetFieldsVisibleInBalloon arArray
objDataSet1.Symbol = 17
objDataSet1.ZoomTo
Me.txtUnmatched_Customer = objDataSet1.UnmatchedRecordCount
DoCmd.Hourglass False
End Sub
As a side note, all the data it can't map is added in one location on the map just outside Lancaster |
| |||
|
Hi, I'm not sure I understeand what you ask. CalcPos takes a Location object as an argument and returns the geocoordinates of it. But I dont see the assosation with the question and the code you post. Please clarify.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| ||||
|
As an aside, you only need to use CalcPos with MapPoint 2002 & 2004. 2006 supports this functionality as properties of the Location object. 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 |
| |||
| Quote:
|
| |||
|
Hi, Quote:
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
| Tags |
| calcpos, problems |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Has anyone had any problems setting the value of t.... | Anonymous | MapPoint 2006/2009 Discussion | 2 | 10-26-2006 08:43 AM |
| Some concerns about calcpos sub | lucci56 | MapPoint 2006/2009 Discussion | 5 | 07-18-2006 11:44 AM |
| Use CalcPos on a map with EXISTING pushpins ?? | Sonicman_ | MapPoint 2006/2009 Discussion | 5 | 02-20-2006 05:05 PM |
| Confused with calcpos :s | Matrices | MapPoint 2006/2009 Discussion | 4 | 09-25-2003 10:30 AM |
| Nothing but problems | Anonymous | MapPoint 2006/2009 Discussion | 0 | 06-22-2003 10:40 AM |