Re: Passing Map to Remote App
- Posted by euphoric (admin) Mar 12, 2019
- 1249 views
irv said...
You can probably use save_map() and load_map():
I had considered the save/load method before deciding to not go that way, but only because there are file reads and writes that can otherwise be eliminated.
- load saved map file as a raw file
- send it to the client
- client saves it as a file
- client uses load_map()
or I guess you could
- send url of saved map file to client
- client retrieves it (e.g., HttpGet(url_of_map_file)) and saves it as a file
- client uses load_map()
What I'm doing for now is:
- load_map()
- var = pairs( my_map )
- send it to client
- client uses map_from_kv_pairs()
That seems to be the quickest and easiest so far.
Best case scenario might be:
- var = save_map(my_map) -- just like sprint() but for maps
- send it to client
- var = load_map(data) -- just like value() but for maps