MV Map Name

Is there a script call or some way to get the name of a map? I can get the ID number, but I'd like to be able to retrieve the text entered in the map name field. I tried $gameMap.name(), but either that's not a function that exists, or I did something wrong. The script call list didn't specify any way I could find, and searching has been unhelpful (although the search function removing the word map from a search doesn't help).
Instead of guessing which functions do exist and which don't you could also check this reference:

According to that I believe $gameMap.displayName() should give you the desired result.
$dataMapInfos[X].name

Gives you the name name, not the display name [X = map ID]
Instead of guessing which functions do exist and which don't you could also check this reference:

According to that I believe $gameMap.displayName() should give you the desired result.
Thanks for the resource. The code wasn't working for me, but then I saw rpgLord69's post and realised I didn't have anything in the Map Display field, onl;y the Map Name Field! It now works, so thank you!
also Keep in mind that $gameMap.displayName() = is for the ingame that
shows when the player transfers to that map, (you can disable it with a plugin),
as it is also used for menu part if they add it.

the other one with "name" is for your view only when to see which map
you work on.

so for example, you call the map name "big church entrance" and the
the displayname "church", for them, they see church while you see in
the editor big church entrance.

those are also 2 different things to keep in mind, so if you want the name
of the map to show to the players, use "$gameMap.displayName()".

Original thread: https://forums.rpgmakerweb.com/threads/map-name.156552/