View Single Post

  #2 (permalink)  
Old 01-25-2003
John Meyer's Avatar
John Meyer John Meyer is offline
Senior Member
Blue Belt
 
Join Date: Jul 2002
Posts: 479
Vanja,

Here is a code sample to get you started. This example assumes VB6 using the ActiveX Control.

Code:
Dim objmap As MapPointCtl.Map
Set objmap = MappointControl1.ActiveMap
Dim objLoc1 As MapPointCtl.Location
Dim objLoc2 As MapPointCtl.Location
Dim objShape As MapPointCtl.Shape

Set objLoc1 = objmap.GetLocation(37.78, -122.42)
Set objLoc2 = objmap.GetLocation(38.9, -77.02)
Set objmap.Location = objLoc1

  'Add a Line from one location to the other
Set objShape = objmap.Shapes.AddLine(objLoc1, objLoc2)
objShape.Line.BeginArrowhead = True
objShape.Line.EndArrowhead = True
 'Ensure Visible
objmap.Union(Array(objLoc1, objLoc2)).GoTo
__________________
John
http://www.support-pc.com

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