When closing the map editor, it prompts to save the file, which is great. However, it also prompts if you have no changed the default map in any way. This is akin to a text editor prompting you to save when you haven't typed any text (and most modern text editors will not prompt for an empty file).
The method of detecting if the file has been changed varies. One method would be to compare the file to an empty map. If it's a match, the map cannot have been edited. Another method would be to set a flag the moment the user makes a change to the map. The latter would be faster, but if the user undos their change, the map is still recognized as changed, so the former method would be more accurate (if you type in a text editor, then remove the text, it won't prompt you to save, since saving an empty file is rarely desirable).