' start with a base map - Put( 6, GetStopVeh ) accepts the hex / serialized (string) data
tmap.Put(1,pk+i) ' pk
tmap.Put(2,pk) 'mastid
tmap.Put(3,i+1)
tmap.Put(4,0) ' Use 6,7,8 for panel values in a serialized map...
tmap.Put(5,0)
tmap.Put(6,GetStopVeh) ' stopped vehicles map
tmap.Put(7,"") ' herd size map
tmap.Put(8,"") ' dir_dist of herd
tmap.Put(9,0)
tmap.Put(10,0)
tmap.Put(11,DefCM.Company_id)
Log(" Get Key 6 values as Hex: "&tmap.Get( 6))
Dim bc As ByteConverter
Dim val() As Byte = bc.HexToBytes(tmap.Get(6))
Dim myser As B4XSerializator
Dim serr As Object = myser.ConvertBytesToObject( val )
Dim mm As Map
mm.Initialize
mm = serr
Log(" Show MyMap of maps...: "&mm)
Sub GetStopVeh() As Object
Dim m, v As Map
m.Initialize
v.Initialize
v.Put("etcon",etcon.Text)
v.Put("etfreight",etfreight.Text)
v.Put("etfuel",etfuel.Text)
v.Put("etlight",etlight.Text)
v.Put("etsurface",etsurface.Text)
' other side
v.Put("etothcon",etothcon.Text)
v.Put("etothfreight",etothfreight.Text)
v.Put("etothfuel",etothfuel.Text)
v.Put("etothlight",etothlight.Text)
v.Put("etothsurface",etothsurface.Text)
v.Put("rbstop1",rbstop1.Checked)
v.Put("rbstop2",rbstop2.Checked)
For Each vals As String In v.Values
Log(" Each Value: "&vals)
Next
m.Put("stopveh",v)
Dim myser As B4XSerializator
Dim serialized() As Byte = myser.ConvertObjectToBytes( m )
Dim bc As ByteConverter
Dim val As String = bc.HexFromBytes(serialized)
Log(" What is val obj: "&val)
Return val
End Sub