If File.Exists(Connector.mainDos.dirdataExcel, kmlArchivo & ".xls") = True Then
Dim m As Marker
Dim txt As String
Dim TAB2 As String
w1.Initialize(Connector.mainDos.dirdataExcel, kmlArchivo & ".xls")
Sheet = w1.GetSheet(0)
TAB2 = TAB & TAB
For i = 1 To Sheet.RowsCount-1
If Sheet.GetCellValue(11, i) <> 0 And Sheet.GetCellValue(11, i) <> "" Then
m = gmap2.AddMarker2(Sheet.GetCellValue(6, i) & "1",Sheet.GetCellValue(7, i) & "1", "Transformador: ",File.GetUri(File.DirAssets, "trafo.png"))
AttachInfoWindow(m, "Transformador: " & Sheet.GetCellValue(11, i) & " kva")
End If
If Sheet.GetCellValue(1, i) = 70 Then
m = gmap2.AddMarker2(Sheet.GetCellValue(6, i),Sheet.GetCellValue(7, i), "Marker #" & i,File.GetUri(File.DirAssets, "blue-pushpin.png"))
Else
If Sheet.GetCellValue(1, i) = 150 Then
m = gmap2.AddMarker2(Sheet.GetCellValue(6, i),Sheet.GetCellValue(7, i), "Marker #" & i,File.GetUri(File.DirAssets, "grn-pushpin.png"))
Else
If Sheet.GetCellValue(1, i) = 250 Then
m = gmap2.AddMarker2(Sheet.GetCellValue(6, i),Sheet.GetCellValue(7, i), "Marker #" & i,File.GetUri(File.DirAssets, "red-pushpin.png"))
Else
If Sheet.GetCellValue(1, i) = 400 Then
m = gmap2.AddMarker2(Sheet.GetCellValue(6, i),Sheet.GetCellValue(7, i), "Marker #" & i,File.GetUri(File.DirAssets, "pink-pushpin.png"))
Else
If Sheet.GetCellValue(1, i) = 1000 Then
m = gmap2.AddMarker2(Sheet.GetCellValue(6, i),Sheet.GetCellValue(7, i), "Marker #" & i,File.GetUri(File.DirAssets, "wht-pushpin.png"))
Else
m = gmap2.AddMarker2(Sheet.GetCellValue(6, i),Sheet.GetCellValue(7, i), "Marker #" & i,File.GetUri(File.DirAssets, "ylw-pushpin.png"))
End If
End If
End If
End If
End If
txt = "Potencia W: "& Sheet.GetCellValue(1, i)
txt = txt & TAB2 & "Código: " & Sheet.GetCellValue(2, i)
txt = txt & TAB2 & "Dirección: "& Sheet.GetCellValue(0, i)
txt = txt & TAB2 & "Tipo: "& Sheet.GetCellValue(4, i)
txt = txt & TAB2 & "Observaciones: "& Sheet.GetCellValue(5, i)
txt = txt & TAB2 & "Hora: "& Sheet.GetCellValue(8, i)
txt = txt & TAB2 & "Fecha: " & Sheet.GetCellValue(9, i)
AttachInfoWindow(m, txt)
MarkerList.Add(m)
Next