MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Problems using CalcPos

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 ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-15-2006
Junior Member
White Belt
 
Join Date: Dec 2005
Posts: 3
Problems using CalcPos

Hi all, I'm quite new to VB and very new to using VB with MapPoint

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
Any suggestions would be greatly welcomed

As a side note, all the data it can't map is added in one location on the map just outside Lancaster
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 06-15-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,112
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 06-15-2006
Winwaed's Avatar
Mapping-Tools.com
Red Belt
 
Join Date: Feb 2004
Posts: 890
Blog Entries: 9
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 06-16-2006
Junior Member
White Belt
 
Join Date: Dec 2005
Posts: 3
Quote:
Originally Posted by Wilfried
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.
I thought that might be the case from what I'd read, got to find out how to use that instead
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 06-21-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,112
Hi,

Quote:
thought that might be the case from what I'd read, got to find out how to use that instead
Please clarify your question. I dont understeand it clearly !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
calcpos, problems


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -5. The time now is 06:44 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54