The map information is stored in "DataInfos" (located in the Data folder). The script is the same, but the extensions are different for RMXP (rxdata) and RMVX (rvdata).
So, to insert the location in a new window, the following is used:
RMXP
map_name = load_data("Data/MapInfos.rxdata")
self.contents.draw_text (0, 0, self.contents.width, 32, data[$game_map.map_id].name, 2)
self.contents.draw_text (0, 0, self.contents.width, 32, data[$game_map.map_id].name, 2)
RMVX
map_name = load_data("Data/MapInfos.rvdata")[$game_map.map_id].name
contents.draw_text(x, y, self.contents.width, WLH, map_name, 2)
contents.draw_text(x, y, self.contents.width, WLH, map_name, 2)