Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mappoint AddPolyLine Method
Message
 
 
To
10/03/2005 15:01:54
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
00994592
Message ID:
00995347
Views:
27
>I am trying to add lines to a mappoint map using the mappoint control and cannot get the addpolylines method to work. Can anyone give me a hand with this.

Phil,

You've to pass array by reference. I tested code below in VFP8SP1 and VFP9 with Mappoint 2004.
oApp = CREATEOBJECT("MapPoint.Application")
oMap = oApp.ActiveMap
oApp.Visible = .T.
oApp.UserControl = .T.
DIMENSION aoLoc[4]
aoLoc[1] = oMap.FindResults("Seattle, WA").Item(1)
aoLoc[2] = oMap.FindResults("Redmond, WA").Item(1)
aoLoc[3] = oMap.FindResults("Tacoma, WA").Item(1)
aoLoc[4] = aoLoc[1]
oMap.Location = aoLoc[1]
oMap.Shapes.AddPolyline(@aoLoc)
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform