Restoring save function for the map page