mirror of
https://github.com/KeymonSoft/Marquez_Reparto.git
synced 2026-04-19 13:49:15 +00:00
- VERSION 4.07.28
- Se agregó el nuevo ruteo dinamico
This commit is contained in:
@@ -113,14 +113,8 @@ Sub Activity_Create(FirstTime As Boolean)
|
||||
End Sub
|
||||
|
||||
Sub MapFragment1_Ready
|
||||
' Msgbox("111","AVISO")
|
||||
gmap = MapFragment1.GetMap
|
||||
gmap.IsInitialized
|
||||
|
||||
'todos= 1
|
||||
'permisos
|
||||
' Msgbox("11","AVISO")
|
||||
|
||||
rp.CheckAndRequest(rp.PERMISSION_ACCESS_FINE_LOCATION)
|
||||
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
|
||||
gmap.MyLocationEnabled = Result
|
||||
@@ -128,16 +122,12 @@ Sub MapFragment1_Ready
|
||||
Dim JavaMapsObject As JavaObject
|
||||
JavaMapsObject = gmap.GetUiSettings
|
||||
JavaMapsObject.RunMethod("setMapToolbarEnabled", Array As Object(True))
|
||||
|
||||
' Msgbox("12","AVISO")
|
||||
|
||||
'''''''----------------------------MARKER AZUL - POR ENTREGAR
|
||||
Private esteAzul As Int = 0
|
||||
Private esteAzul2 As String
|
||||
If azul = 1 Or todos = 1 Then
|
||||
c.IsInitialized
|
||||
c=Starter.skmt.ExecQuery("select CAT_CL_CODIGO, SECUENCIA, CAT_CL_NOMBRE, CAT_CL_LAT, CAT_CL_LONG, CAT_CL_RUTA 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 order by CAT_CL_RUTA")
|
||||
' Msgbox("2","AVISO")
|
||||
c = Starter.skmt.ExecQuery("select CAT_CL_CODIGO, SECUENCIA, CAT_CL_NOMBRE, CAT_CL_LAT, CAT_CL_LONG, CAT_CL_RUTA 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 order by CAT_CL_RUTA")
|
||||
rutaAnt = ""
|
||||
For i = 0 To c.RowCount -1
|
||||
c.Position = i
|
||||
@@ -147,14 +137,19 @@ Sub MapFragment1_Ready
|
||||
Tienda= c.GetString("CAT_CL_NOMBRE")
|
||||
ruta = c.GetString("CAT_CL_RUTA")
|
||||
NumSerie = c.GetString("SECUENCIA")
|
||||
Private s As Cursor = Starter.skmt.ExecQuery($"select indice from waypoints where codigo = '${CODIGO}'"$)
|
||||
If s.RowCount > 0 Then
|
||||
s.Position = 0
|
||||
NumSerie = s.GetString("indice")
|
||||
End If
|
||||
If rutaAnt <> ruta Then esteAzul = esteAzul + 1
|
||||
If esteAzul = 1 Then esteAzul2= NumSerie&"maker-azul.png"
|
||||
If esteAzul = 2 Then esteAzul2= NumSerie&"maker-azul1.png"
|
||||
If esteAzul = 3 Then esteAzul2= NumSerie&"maker-azul2.png"
|
||||
If esteAzul = 4 Then esteAzul2= NumSerie&"maker-azul3.png"
|
||||
If esteAzul = 5 Then esteAzul2= NumSerie&"maker-azul4.png"
|
||||
Log(ruta & "|" & esteAzul & "|" & esteAzul2)
|
||||
Log(NumSerie&" "& Tienda&" --------"& esteAzul2&" --------"&esteAzul)
|
||||
' Log(ruta & "|" & esteAzul & "|" & esteAzul2)
|
||||
MARK_AZUL = gmap.AddMarker3(LatitudRu,LongitudRU,CODIGO,LoadBitmap(File.DirAssets, esteAzul2))
|
||||
MARK_AZUL.Snippet = "R: " & ruta & " - " & Tienda
|
||||
rutaAnt = ruta
|
||||
@@ -162,9 +157,7 @@ Sub MapFragment1_Ready
|
||||
c .Close
|
||||
If MARK_AZUL.IsInitialized Then LIST_AZUL.Add(MARK_AZUL)
|
||||
End If
|
||||
' Msgbox("3","AVISO")
|
||||
'''''''----------------------------MARKER VERDE- ENTREGADO
|
||||
|
||||
If verde = 1 Or todos = 1 Then
|
||||
rutaAnt = ""
|
||||
c2.IsInitialized
|
||||
@@ -177,6 +170,11 @@ Sub MapFragment1_Ready
|
||||
Tienda= c2.GetString("CAT_CL_NOMBRE")
|
||||
ruta = c2.GetString("CAT_CL_RUTA")
|
||||
NumSerie = c2.GetString("SECUENCIA")
|
||||
Private s As Cursor = Starter.skmt.ExecQuery($"select indice from waypoints where codigo = '${CODIGO}'"$)
|
||||
If s.RowCount > 0 Then
|
||||
s.Position = 0
|
||||
NumSerie = s.GetString("indice")
|
||||
End If
|
||||
MARK_VERDE = gmap.AddMarker3(LatitudRu,LongitudRU,CODIGO,LoadBitmap(File.DirAssets, NumSerie&"marker-verde.png"))
|
||||
MARK_VERDE.Snippet = "R:" & ruta & ", " & Tienda
|
||||
Next
|
||||
@@ -199,7 +197,6 @@ Sub MapFragment1_Ready
|
||||
If MARK_VERDE.IsInitialized Then LIST_VERDE.Add(MARK_VERDE)
|
||||
End If
|
||||
End If
|
||||
|
||||
' '''''''----------------------------MARKER ROJO - NO ENTREGADO
|
||||
Private esteRojo As Int = 0
|
||||
Private esteRojo2 As String
|
||||
@@ -215,6 +212,11 @@ Sub MapFragment1_Ready
|
||||
ruta = c3.GetString("CAT_CL_RUTA")
|
||||
CODIGO=c3.GetString("CAT_CL_CODIGO")
|
||||
NumSerie = c3.GetString("SECUENCIA")
|
||||
Private s As Cursor = Starter.skmt.ExecQuery($"select indice from waypoints where codigo = '${CODIGO}'"$)
|
||||
If s.RowCount > 0 Then
|
||||
s.Position = 0
|
||||
NumSerie = s.GetString("indice")
|
||||
End If
|
||||
MARK_ROJO = gmap.AddMarker3(LatitudRu,LongitudRU,CODIGO,LoadBitmap(File.DirAssets, NumSerie&"marker-rojo.png"))
|
||||
MARK_ROJO.Snippet= "R:" & ruta & ", " & Tienda
|
||||
Next
|
||||
@@ -253,7 +255,6 @@ Sub MapFragment1_Ready
|
||||
End Sub
|
||||
|
||||
''''-------------------------- PRUEBA CON MARKER _CLICK
|
||||
|
||||
Sub OnInfoWindowClickListener1_click(Marker1 As Marker)
|
||||
Starter.skmt.ExecNonQuery("delete from CUENTAA")
|
||||
Starter.skmt.ExecNonQuery2("INSERT INTO CUENTAA VALUES (?) ", Array As Object(Marker1.Title))
|
||||
|
||||
Reference in New Issue
Block a user