Bill Nguyen
2007-01-29 22:57:34 UTC
I tried to use theis example from MSDN but got error in "Array"
arrTri = Array(locFL, locPR, locB, locFL)
Can someone please tell me how to get it run in VB.NET?
Thanks
Bill
Public Shared Sub BermudaTriangle()
Dim oMap As MapPoint.Map
oMap = GetObject(, "MapPoint.Application").ActiveMap
Dim locFL, locPR, locB As MapPoint.Location
locFL = oMap.FindResults("Fort Lauderdale, Florida")(1)
locPR = oMap.FindResults("San Juan, Puerto Rico")(1)
locB = oMap.FindResults("Bermuda")(1)
Dim arrTri
arrTri = Array(locFL, locPR, locB, locFL)
' Go there first
oMap.Union(arrTri).GoTo()
' Create and name the shape
oMap.Shapes.AddPolyline(arrTri).Name = "Bermuda Triangle"
End Sub
arrTri = Array(locFL, locPR, locB, locFL)
Can someone please tell me how to get it run in VB.NET?
Thanks
Bill
Public Shared Sub BermudaTriangle()
Dim oMap As MapPoint.Map
oMap = GetObject(, "MapPoint.Application").ActiveMap
Dim locFL, locPR, locB As MapPoint.Location
locFL = oMap.FindResults("Fort Lauderdale, Florida")(1)
locPR = oMap.FindResults("San Juan, Puerto Rico")(1)
locB = oMap.FindResults("Bermuda")(1)
Dim arrTri
arrTri = Array(locFL, locPR, locB, locFL)
' Go there first
oMap.Union(arrTri).GoTo()
' Create and name the shape
oMap.Shapes.AddPolyline(arrTri).Name = "Bermuda Triangle"
End Sub