I have the example MapViewer and have attempted several ways to add multiple Pins using a text string in LocationField.
Here is the latest modification
[code]If CurrentLocation<>Nil Then
// If we already have a location, remove it from the map
CurrentLocation.Visible = False
End If
// Update the CurrentLocation object to reflect the entered address
If LocationField.Text = “” Then
MsgBox “You need to add a location in the location field”
Else
Dim my_arr(-1) As String = LocationField.Text.Split(",")
Dim x As Integer
'my_arr = LocationField.Text.Split(",")
If Ubound(my_arr) > 0 Then
For x = 0 to Ubound(my_arr)
Try
CurrentLocation = New WebMapLocation(my_arr(x))
'CurrentLocation.Visible = True
'MapLocation.AddLocation(CurrentLocation)
Dim loc As New WebMapLocation(MapLocation.latitude, MapLocation.longitude, CStr(Ticks))
If UseCustomIconCheck.Value Then
loc.Icon = pin
End If
If UseAnimationCheck.Value Then
loc.Animated = True
End If
loc.Visible = True
MapLocation.AddLocation(loc)
If x = 0 Then MapLocation.GoToLocation(CurrentLocation)
CurrentLocation.Visible = False
Catch err As NilObjectException
MsgBox " The address " + my_arr(x) + " was not found"
End Try
Next
Else
Try
CurrentLocation = New WebMapLocation(LocationField.Text)
CurrentLocation.Visible = True
MapLocation.AddLocation(CurrentLocation)
MapLocation.GoToLocation(CurrentLocation)
Catch err As NilObjectException
MsgBox "You need to add a location in the location field"
End Try
End
End[/code]
I used the info from the Click event however this does not display any locations. I am using a ‘,’ as a separator field and am forcing all to CAPS
Any suggestions?
Thanks