Defina o mapa para JavaScript de armazenamento local
localStorage.myMap = JSON.stringify(Array.from(map.entries()));
Daniel Jantulík
localStorage.myMap = JSON.stringify(Array.from(map.entries()));