Sub FindMarkerButton_Click
Dim Dlg As InputDialog
Dlg.Hint = "Buscar Marcador"
Dlg.InputType = Dlg.INPUT_TYPE_TEXT
Dlg.Show("Ingrese el nombre del Marcador a buscar", "Buscar Marcador", "Aceptar", "Cancelar", "", Null)
If Dlg.Response = DialogResponse.POSITIVE Then
If Dlg.Input <> "" Then
Dim Cursor1 As Cursor
Dim Sf As StringFunctions
Sf.Initialize
Cursor1 = Starter.SQL1.ExecQuery("SELECT LAT, LON, [DESC] FROM MARKERS WHERE [DESC] LIKE '%" & Dlg.Input.ToUpperCase & "%'")
If Cursor1.RowCount > 0 Then
For i = 0 To Cursor1.RowCount - 1
Cursor1.Position = i
Dim Busqueda As String = Cursor1.GetString("DESC")
Log("Busqueda: " & Busqueda)
Dim Pos As CameraPosition
Pos.Initialize(Cursor1.GetString("LAT"), Cursor1.GetString("LON"), gmap.CameraPosition.Zoom)
gmap.MoveCamera(Pos)
Dim m1 As Marker = gmap.AddMarker2(Cursor1.GetString("LAT"), Cursor1.GetString("LON"), Cursor1.GetString("DESC"), gmap.HUE_BLUE)
Next
Else
Log("No se han encontrado resultados")
End If
Cursor1.Close
Else
Msgbox("Debe establecer un nombre para la busqueda el Marcador", "Error")
End If
End If
End Sub