Map1 Help

thestar19

Member
Licensed User
Longtime User
Hey guys

So,I created a new app just to try the "Map" function.
Howewer,When I press save data,close the app,and later press open data,I get "null",What am I doing wrong :confused:

Code:
B4X:
'Activity module
Sub Process_Globals
   'These global variables will be declared once when the application starts.
   'These variables can be accessed from all modules.

End Sub

Sub Globals
   'These global variables will be redeclared each time the activity is created.
   'These variables can only be accessed from this module.

   Dim open_button As Button
   Dim save_button As Button
   Dim map1 As Map
   
End Sub

Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("main")
map1.Initialize()
End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub
Sub save_button_Click
map1.Put("Save","Kruger Rules")
Msgbox("Data is Saved!","Info")
End Sub
Sub open_button_Click
Msgbox(map1.Get("Save"),"Info")
End Sub

And yes,I have a layout called "main" :sign0104:

Thank you
Thestar19
 
Top