Inserting Arrows

Anonymous
01-22-2003, 06:07 PM
I want Mappoint to insert arrows between different points on the map. If I have the lat/long of each point, can I write a program to make Mappoint draw these arrows in automatically? I'm trying to avoid drawing 376 arrows by hand. Thanks

John Meyer
01-25-2003, 05:36 AM
Vanja,

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

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

 
Web mp2kmag.com
mapforums.com