every drawing change (view.on("immediate-click") updates the object in local storage
checks for existing object in local storage on map load
changed load button to import button which prompts for .json file and loads it
changed save button to export button which automatically downloads the map as json
loading the map object into local storage on every change might cause performance issues if there are many drawings, but I doubt it would very be noticeable unless there was an unreasonable amount of them
Overall I really like the approach, it gives us the full functionality of having multiple maps, but outsources it to the local file system and file manager via exporting which was needed anyway. 👍
10
view.on("immediate-click"
) updates the object in local storageloading the map object into local storage on every change might cause performance issues if there are many drawings, but I doubt it would very be noticeable unless there was an unreasonable amount of them