View Single Post

  #2 (permalink)  
Old 05-06-2004
John Meyer's Avatar
John Meyer John Meyer is offline
Senior Member
Blue Belt
 
Join Date: Jul 2002
Posts: 479
Consider this example. You define 'objloc' as a mappoint location object. You now use the Getlocation method to 'set' a location to objloc. Now that objloc represents a location in mappoint we will add a pushpin to the map and use 'objloc' to tell it what location to put the pushpin.

To extract the lat/lon here is a link to an article here at MP2KMag
A More Compact Method for Obtaining Lat/Long
http://www.mp2kmag.com/articles.asp?ArticleID=13

Code:
Dim objmap As MapPoint.Map
Set objmap = MappointControl1.ActiveMap
Dim objLoc As MapPointctl.Location

'Get the location of Los Angeles, CA, using latitude and longitude
Set objLoc = objmap.GetLocation(34.055, -118.24, 100)
objmap.AddPushpin objLoc, "MyPushpin"
__________________
John
http://www.support-pc.com

Order MapPoint 2006 Here
https://secure.mp2kmag.com/?refer=support-PC
Reply With Quote