mirror of
https://github.com/KeymonSoft/ADM.git
synced 2026-04-17 19:36:18 +00:00
- VERSION 5.08.31
- Se modificó el codigo de MAPA_RUTAS para que muestre bien los marcadores
This commit is contained in:
@@ -97,6 +97,6 @@ ModuleClosedNodes6=4,6,7,8,9,10,11,12,13,15,19,21
|
||||
ModuleClosedNodes7=
|
||||
ModuleClosedNodes8=
|
||||
ModuleClosedNodes9=
|
||||
NavigationStack=C_Principal,B4XPage_Created,239,6,C_Principal,p_transResumenDia_Click,2826,1,C_Principal,B4XPage_CloseRequest,2091,4,C_Principal,JobDone,2088,0,C_Principal,B4XPage_Appear,416,5,Starter,Process_Globals,18,0,Starter,ENVIA_ULTIMA_GPS,98,6,Diseñador Visual,principal.bal,-100,6,C_Principal,resdia_Click,2426,6,Main,Activity_Create,29,0,Main,Process_Globals,20,0
|
||||
NavigationStack=Main,Process_Globals,20,0,B4XMainPage,Class_Globals,69,0,Diseñador Visual,principal.bal,-100,6,C_Principal,resdia_Click,2419,6,C_Principal,B4XPage_Created,316,0,Diseñador Visual,login.bal,-100,1,C_Principal,B4XPage_Appear,374,5,MAPA_RUTAS,Activity_Resume,197,0,CameraExClass,FindCamera,48,0,MAPA_RUTAS,MapFragment1_Ready,301,6
|
||||
SelectedBuild=0
|
||||
VisibleModules=30,2,14,5,6,19,31,27,18
|
||||
VisibleModules=30,2,14,5,6,19,31,27,18,21
|
||||
|
||||
@@ -321,9 +321,6 @@ Private Sub B4XPage_Created (Root1 As B4XView)
|
||||
SCROLL_RESDIA.Top = 0 : SCROLL_RESDIA.Left = 0
|
||||
SCROLL_RESDIA.Height = Root.Height * 0.9
|
||||
SCROLL_RESDIA.Left = (Root.Width / 2) - (SCROLL_RESDIA.Width / 2)
|
||||
p_transResumenDia.Left = 0 : p_transResumenDia.top = 0
|
||||
p_transResumenDia.Height = Root.Height : p_transResumenDia.Width = Root.Width
|
||||
Subs.centraPanel(p_resumenDia, Root.Width)
|
||||
Starter.Skmt.ExecNonQuery($"create table if not exists kmt_info2 (${getTableColumnList(Starter.skmt, "kmt_info")})"$)
|
||||
End Sub
|
||||
|
||||
@@ -385,6 +382,11 @@ Sub B4XPage_Appear
|
||||
rd.respaldaInventarios
|
||||
rd.respaldaPaquetes
|
||||
HORAINGRESO ="000000"
|
||||
|
||||
p_transResumenDia.Left = 0 : p_transResumenDia.top = 0
|
||||
p_transResumenDia.Height = Root.Height : p_transResumenDia.Width = Root.Width
|
||||
Subs.centraPanel(p_resumenDia, Root.Width)
|
||||
|
||||
' Private inicioL As Float = (nvo_cliente.Left + nvo_cliente.Width)
|
||||
' Private finR As Float = Panel9.Left
|
||||
' Btn_Ubicar.Left = ((nvo_cliente.Left + nvo_cliente.Width)) - (Btn_Ubicar.Width / 2) + ((finR - inicioL)/2) + 15
|
||||
@@ -2423,6 +2425,7 @@ Sub CARGA_Click
|
||||
End Sub
|
||||
|
||||
Sub resdia_Click
|
||||
|
||||
Private totalPesoActual As String = 0
|
||||
Private conVenta As String = 0
|
||||
Private visitados As String = 0
|
||||
|
||||
@@ -208,7 +208,7 @@ Sub MapFragment1_Ready
|
||||
gmap.IsInitialized
|
||||
' todos = 1
|
||||
'permisos
|
||||
|
||||
|
||||
rp.CheckAndRequest(rp.PERMISSION_ACCESS_FINE_LOCATION)
|
||||
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
|
||||
gmap.MyLocationEnabled = Result
|
||||
@@ -219,7 +219,7 @@ Sub MapFragment1_Ready
|
||||
'''''''----------------------------MARKER AZUL - POR VISITAR
|
||||
If azul = 1 Or todos = 1 Then
|
||||
c.IsInitialized
|
||||
c=skmt.ExecQuery("select CAT_CL_CODIGO,CAT_CL_NOMBRE,CAT_CL_LAT,CAT_CL_LONG from kmt_info where gestion = 0 and CAT_CL_LAT is not null and CAT_CL_LONG is not null and CAT_CL_LAT <> 0 and CAT_CL_LONG <> 0 and CAT_CL_LAT <> ' ' and CAT_CL_LONG <> ' ' and CAT_CL_CODIGO <> 0 and CAT_CL_CODIGO <> 1")
|
||||
c=skmt.ExecQuery("select CAT_CL_CODIGO, CAT_CL_NOMBRE, CAT_CL_LAT, CAT_CL_LONG from kmt_info where gestion = 0 and CAT_CL_LAT is not null and CAT_CL_LONG is not null and CAT_CL_LAT <> 0 and CAT_CL_LONG <> 0 and CAT_CL_LAT <> ' ' and CAT_CL_LONG <> ' ' and CAT_CL_CODIGO <> 0 and CAT_CL_CODIGO <> 1")
|
||||
' skmt.Initialize(ruta,"kmt.db", True)
|
||||
Log($"============== Resultados = ${c.RowCount}"$)
|
||||
If c.RowCount > 0 Then
|
||||
@@ -227,88 +227,119 @@ Sub MapFragment1_Ready
|
||||
c.Position = i
|
||||
' Log($"|${c.GetString("CAT_CL_LONG")}|${c.GetString("CAT_CL_LAT")}|"$)
|
||||
' Log(i&"|"&c.GetString("CAT_CL_LAT")&"|")
|
||||
LatitudRu = 0
|
||||
Log(c.GetString("CAT_CL_CODIGO")&" "& c.GetString("CAT_CL_LAT"))
|
||||
If c.GetString("CAT_CL_LAT") <> "" Then LatitudRu = c.GetString("CAT_CL_LAT")
|
||||
LongitudRU = 0
|
||||
If c.GetString("CAT_CL_LONG") <> "" Then LongitudRU = c.GetString("CAT_CL_LONG")
|
||||
CODIGO=c.GetString("CAT_CL_CODIGO")
|
||||
Tienda= c.GetString("CAT_CL_NOMBRE")
|
||||
MARK_AZUL = gmap.AddMarker2(LatitudRu, LongitudRU, CODIGO, gmap.HUE_BLUE)
|
||||
MARK_AZUL.Snippet = Tienda
|
||||
' LatitudRu = 0
|
||||
If c.GetString("CAT_CL_LAT") = Null Or c.GetString("CAT_CL_LAT") = "null" Or c.GetString("CAT_CL_LAT") = "NULL" _
|
||||
Or c.GetString("CAT_CL_LONG") = Null Or c.GetString("CAT_CL_LONG") = "null" Or c.GetString("CAT_CL_LONG") = "NULL" _
|
||||
Then
|
||||
ToastMessageShow($"Tienda con coordenadas incorrectas (${c.GetString("CAT_CL_CODIGO")})"$, False)
|
||||
Else
|
||||
Log(c.GetString("CAT_CL_CODIGO")&" "& c.GetString("CAT_CL_LAT")&", "&c.GetString("CAT_CL_LAT"))
|
||||
If c.GetString("CAT_CL_LAT") <> "" Then LatitudRu = c.GetString("CAT_CL_LAT")
|
||||
LongitudRU = 0
|
||||
If c.GetString("CAT_CL_LONG") <> "" Then LongitudRU = c.GetString("CAT_CL_LONG")
|
||||
CODIGO=c.GetString("CAT_CL_CODIGO")
|
||||
Tienda= c.GetString("CAT_CL_NOMBRE")
|
||||
MARK_AZUL = gmap.AddMarker2(LatitudRu, LongitudRU, CODIGO, gmap.HUE_BLUE)
|
||||
MARK_AZUL.Snippet = Tienda
|
||||
Log(LatitudRu & "," & LongitudRU)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
c .Close
|
||||
' Log("4")
|
||||
|
||||
If MARK_AZUL.IsInitialized Then LIST_AZUL.Add(MARK_AZUL)
|
||||
End If
|
||||
'''''''----------------------------MARKER VERDE - VENTA
|
||||
If verde = 1 Or todos = 1 Then
|
||||
c2.IsInitialized
|
||||
c2=skmt.ExecQuery("select CAT_CL_CODIGO, CAT_CL_NOMBRE,CAT_CL_LONG,CAT_CL_LAT from kmt_info where gestion = 2 and CAT_CL_LAT is not null and CAT_CL_LONG is not null and CAT_CL_LAT <> 0 and CAT_CL_LONG <> 0 and CAT_CL_CODIGO <> 0 and CAT_CL_CODIGO <> 1 UNION select CAT_CL_CODIGO, CAT_CL_NOMBRE,CAT_CL_LONG,CAT_CL_LAT from kmt_info2 where gestion = 2 and CAT_CL_LAT is not null and CAT_CL_LONG is not null and CAT_CL_LAT <> 0 and CAT_CL_LONG <> 0 and CAT_CL_CODIGO <> 0 and CAT_CL_CODIGO <> 1")
|
||||
c2=skmt.ExecQuery("select CAT_CL_CODIGO, CAT_CL_NOMBRE, CAT_CL_LONG, CAT_CL_LAT from kmt_info where gestion = 2 and CAT_CL_LAT is not null and CAT_CL_LONG is not null and CAT_CL_LAT <> 0 and CAT_CL_LONG <> 0 and CAT_CL_CODIGO <> 0 and CAT_CL_CODIGO <> 1 UNION select CAT_CL_CODIGO, CAT_CL_NOMBRE, CAT_CL_LONG, CAT_CL_LAT from kmt_info2 where gestion = 2 and CAT_CL_LAT is not null and CAT_CL_LONG is not null and CAT_CL_LAT <> 0 and CAT_CL_LONG <> 0 and CAT_CL_CODIGO <> 0 and CAT_CL_CODIGO <> 1")
|
||||
Log($"============== Resultados = ${c2.RowCount}"$)
|
||||
For i = 0 To c2.RowCount -1
|
||||
c2.Position = i
|
||||
' Log($"|${c2.GetString("CAT_CL_LONG")}|${c2.GetString("CAT_CL_LAT")}|"$)
|
||||
If IsNumber(c2.GetString("CAT_CL_LONG")) Then
|
||||
If c2.GetString("CAT_CL_LAT") = Null Or c2.GetString("CAT_CL_LAT") = "null" Or c2.GetString("CAT_CL_LAT") = "NULL" _
|
||||
Or c2.GetString("CAT_CL_LONG") = Null Or c2.GetString("CAT_CL_LONG") = "null" Or c2.GetString("CAT_CL_LONG") = "NULL" _
|
||||
Then
|
||||
ToastMessageShow($"Tienda con coordenadas incorrectas (${c.GetString("CAT_CL_CODIGO")})"$, False)
|
||||
Else
|
||||
LongitudRU = c2.GetString("CAT_CL_LONG")
|
||||
LatitudRu = c2.GetString("CAT_CL_LAT")
|
||||
CODIGO=c2.GetString("CAT_CL_CODIGO")
|
||||
Tienda= c2.GetString("CAT_CL_NOMBRE")
|
||||
MARK_VERDE = gmap.AddMarker2(LatitudRu, LongitudRU, CODIGO,gmap.HUE_GREEN)
|
||||
MARK_VERDE.Snippet = Tienda
|
||||
Log(LatitudRu & "," & LongitudRU)
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
If verde = 1 Or todos = 1 Then
|
||||
c2.IsInitialized
|
||||
c2=skmt.ExecQuery("select CAT_CL_CODIGO, CAT_CL_NOMBRE,CAT_CL_LONG,CAT_CL_LAT from kmt_info where gestion = 2 and CAT_CL_LAT is not null and CAT_CL_LONG is not null and CAT_CL_LAT <> 0 and CAT_CL_LONG <> 0 and CAT_CL_CODIGO <> 0 and CAT_CL_CODIGO <> 1")
|
||||
c2=skmt.ExecQuery("select CAT_CL_CODIGO, CAT_CL_NOMBRE, CAT_CL_LONG,CAT_CL_LAT from kmt_info where gestion = 2 and CAT_CL_LAT is not null and CAT_CL_LONG is not null and CAT_CL_LAT <> 0 and CAT_CL_LONG <> 0 and CAT_CL_CODIGO <> 0 and CAT_CL_CODIGO <> 1")
|
||||
Log($"============== Resultados = ${c2.RowCount}"$)
|
||||
For i = 0 To c2.RowCount -1
|
||||
c2.Position = i
|
||||
' Log($"|${c2.GetString("CAT_CL_LONG")}|${c2.GetString("CAT_CL_LAT")}|"$)
|
||||
LongitudRU = c2.GetString("CAT_CL_LONG")
|
||||
LatitudRu = c2.GetString("CAT_CL_LAT")
|
||||
CODIGO=c2.GetString("CAT_CL_CODIGO")
|
||||
Tienda= c2.GetString("CAT_CL_NOMBRE")
|
||||
MARK_VERDE = gmap.AddMarker2(LatitudRu, LongitudRU, CODIGO,gmap.HUE_GREEN)
|
||||
MARK_VERDE.Snippet = Tienda
|
||||
If c2.GetString("CAT_CL_LAT") = Null Or c2.GetString("CAT_CL_LAT") = "null" Or c2.GetString("CAT_CL_LAT") = "NULL" _
|
||||
Or c2.GetString("CAT_CL_LONG") = Null Or c2.GetString("CAT_CL_LONG") = "null" Or c2.GetString("CAT_CL_LONG") = "NULL" _
|
||||
Then
|
||||
ToastMessageShow($"Tienda con coordenadas incorrectas (${c.GetString("CAT_CL_CODIGO")})"$, False)
|
||||
Else
|
||||
LongitudRU = c2.GetString("CAT_CL_LONG")
|
||||
LatitudRu = c2.GetString("CAT_CL_LAT")
|
||||
CODIGO=c2.GetString("CAT_CL_CODIGO")
|
||||
Tienda= c2.GetString("CAT_CL_NOMBRE")
|
||||
MARK_VERDE = gmap.AddMarker2(LatitudRu, LongitudRU, CODIGO,gmap.HUE_GREEN)
|
||||
MARK_VERDE.Snippet = Tienda
|
||||
Log(LatitudRu & "," & LongitudRU)
|
||||
End If
|
||||
Next
|
||||
c2 .Close
|
||||
If MARK_VERDE.IsInitialized Then LIST_VERDE.Add(MARK_VERDE)
|
||||
End If
|
||||
End If
|
||||
' '''''''----------------------------MARKER ROJO - NO VENTA
|
||||
|
||||
|
||||
If rojo = 1 Or todos = 1 Then
|
||||
c3.IsInitialized
|
||||
c3=skmt.ExecQuery("select CAT_CL_CODIGO, CAT_CL_NOMBRE,CAT_CL_LONG,CAT_CL_LAT from kmt_info where gestion = 3 and CAT_CL_LAT is not null and CAT_CL_LONG is not null and CAT_CL_LAT <> 0 and CAT_CL_LONG <> 0 and CAT_CL_CODIGO <> 0 and CAT_CL_CODIGO <> 1")
|
||||
c3=skmt.ExecQuery("select CAT_CL_CODIGO, CAT_CL_NOMBRE,CAT_CL_LONG,CAT_CL_LAT from kmt_info where gestion = 3 and CAT_CL_LAT is not null and CAT_CL_LONG is not null and CAT_CL_LAT <> 0 and CAT_CL_LONG <> 0 and CAT_CL_CODIGO <> 0 and CAT_CL_CODIGO <> 1")
|
||||
Log($"============== Resultados = ${c3.RowCount}"$)
|
||||
For i = 0 To c3.RowCount -1
|
||||
c3.Position = i
|
||||
' Log($"|${c3.GetString("CAT_CL_LONG")}|${c3.GetString("CAT_CL_LAT")}|"$)
|
||||
LongitudRU = c3.GetDouble("CAT_CL_LONG")
|
||||
LatitudRu = c3.GetDouble("CAT_CL_LAT")
|
||||
CODIGO = c3.GetString("CAT_CL_CODIGO")
|
||||
Tienda= c3.GetString("CAT_CL_NOMBRE")
|
||||
MARK_ROJO = gmap.AddMarker2(LatitudRu, LongitudRU, CODIGO, gmap.HUE_RED)
|
||||
MARK_ROJO.Snippet = Tienda
|
||||
Next
|
||||
Else
|
||||
If rojo = 1 Or todos = 1 Then
|
||||
c3.IsInitialized
|
||||
c3=skmt.ExecQuery("select CAT_CL_CODIGO, CAT_CL_NOMBRE,CAT_CL_LONG,CAT_CL_LAT from kmt_info where gestion = 3 and CAT_CL_LAT is not null and CAT_CL_LONG is not null and CAT_CL_LAT <> 0 and CAT_CL_LONG <> 0 and CAT_CL_CODIGO <> 0 and CAT_CL_CODIGO <> 1")
|
||||
Log($"============== Resultados = ${c3.RowCount}"$)
|
||||
For i = 0 To c3.RowCount -1
|
||||
c3.Position = i
|
||||
' Log($"|${c3.GetString("CAT_CL_LONG")}|${c3.GetString("CAT_CL_LAT")}|"$)
|
||||
If c3.GetString("CAT_CL_LAT") = Null Or c3.GetString("CAT_CL_LAT") = "null" Or c3.GetString("CAT_CL_LAT") = "NULL" _
|
||||
Or c3.GetString("CAT_CL_LONG") = Null Or c3.GetString("CAT_CL_LONG") = "null" Or c3.GetString("CAT_CL_LONG") = "NULL" _
|
||||
Then
|
||||
ToastMessageShow($"Tienda con coordenadas incorrectas (${c.GetString("CAT_CL_CODIGO")})"$, False)
|
||||
Else
|
||||
LongitudRU = c3.GetDouble("CAT_CL_LONG")
|
||||
LatitudRu = c3.GetDouble("CAT_CL_LAT")
|
||||
CODIGO = c3.GetString("CAT_CL_CODIGO")
|
||||
Tienda= c3.GetString("CAT_CL_NOMBRE")
|
||||
MARK_ROJO = gmap.AddMarker2(LatitudRu, LongitudRU, CODIGO, gmap.HUE_RED)
|
||||
MARK_ROJO.Snippet = Tienda
|
||||
Log(LatitudRu & "," & LongitudRU)
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
If rojo = 1 Or todos = 1 Then
|
||||
c3.IsInitialized
|
||||
c3=skmt.ExecQuery("select CAT_CL_CODIGO, CAT_CL_NOMBRE,CAT_CL_LONG,CAT_CL_LAT from kmt_info where gestion = 3 and CAT_CL_LAT is not null and CAT_CL_LONG is not null and CAT_CL_LAT <> 0 and CAT_CL_LONG <> 0 and CAT_CL_CODIGO <> 0 and CAT_CL_CODIGO <> 1")
|
||||
Log($"============== Resultados = ${c3.RowCount}"$)
|
||||
For i = 0 To c3.RowCount -1
|
||||
c3.Position = i
|
||||
' Log($"|${c3.GetString("CAT_CL_LONG")}|${c3.GetString("CAT_CL_LAT")}|"$)
|
||||
If c3.GetString("CAT_CL_LAT") = Null Or c3.GetString("CAT_CL_LAT") = "null" Or c3.GetString("CAT_CL_LAT") = "NULL" _
|
||||
Or c3.GetString("CAT_CL_LONG") = Null Or c3.GetString("CAT_CL_LONG") = "null" Or c3.GetString("CAT_CL_LONG") = "NULL" _
|
||||
Then
|
||||
ToastMessageShow($"Tienda con coordenadas incorrectas (${c.GetString("CAT_CL_CODIGO")})"$, False)
|
||||
Else
|
||||
LongitudRU = c3.GetDouble("CAT_CL_LONG")
|
||||
LatitudRu = c3.GetDouble("CAT_CL_LAT")
|
||||
CODIGO = c3.GetString("CAT_CL_CODIGO")
|
||||
Tienda= c3.GetString("CAT_CL_NOMBRE")
|
||||
MARK_ROJO = gmap.AddMarker2(LatitudRu, LongitudRU, CODIGO, gmap.HUE_RED)
|
||||
Log(LatitudRu & "," & LongitudRU)
|
||||
MARK_ROJO.Snippet = Tienda
|
||||
End If
|
||||
Next
|
||||
If MARK_ROJO.IsInitialized Then LIST_ROJO.Add(MARK_ROJO)
|
||||
c3.Close
|
||||
@@ -320,7 +351,7 @@ Sub MapFragment1_Ready
|
||||
' If MARK_VERDE.Visible Or MARK_ROJO.Visible Then
|
||||
' MARK_CEDIS.Remove
|
||||
' End If
|
||||
' Log("Centramos camara " & LatitudRu & ", " & LongitudRU)
|
||||
Log("Centramos camara " & LatitudRu & ", " & LongitudRU)
|
||||
Dim aa As CameraPosition
|
||||
aa.Initialize(LatitudRu, LongitudRU, 15) ''' RECOMENDABLE CAMBIAR A 10 PARA QUE SE VEAN MAS MARCADORES
|
||||
gmap.AnimateCamera(aa)
|
||||
|
||||
Reference in New Issue
Block a user