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 07:43 AM |
| Some concerns about calcpos sub | lucci56 | MapPoint 2006/2009 Discussion | 5 | 07-18-2006 10:44 AM |
| Use CalcPos on a map with EXISTING pushpins ?? | Sonicman_ | MapPoint 2006/2009 Discussion | 5 | 02-20-2006 04:05 PM |
| Confused with calcpos :s | Matrices | MapPoint 2006/2009 Discussion | 4 | 09-25-2003 09:30 AM |
| Nothing but problems | Anonymous | MapPoint 2006/2009 Discussion | 0 | 06-22-2003 09:40 AM |
Bulgaria Ski Holidays
First time skier? Looking for something a little different? Bulgaria Ski holidays could be the perfect remedy to your winter blues. Bulgaria prices are great value.
Travelcounselors
TravelCounsellors are a Queens award winning Travel Agent. Have a personal Travel Counselor help with your travel plans.
Holidays Thailand
Holidays in Thailand are hugely diverse with wonderful luxury resorts and beaches but also some lovely forested mountains with interesting hill tribes. See dealchecker.co.uk.
Cyprus Holidays
Cyprus holidays will offer you a wealth of activities all in the most beautiful surroundings. Relish the beauty of Cyprus on a short break.
Balearics
Before booking to the Balearics Islands make sure you check out our travel guide online. The Balearics are renowned for their vibrant nightlife but there are also some stunning Gothic cathedrals, Stone Age ruins and fishing villages.
Bargain family holidays
We can help you find family holidays at bargain prices when you check out the options at Travel.co.uk
Holidays to Fuerteventura
Come on; jump on the plane to the Canary Islands. Get information on cheap holidays to Fuerteventura at On The Beach.