A mod that lets you view map contents in the tooltip with some extra customisation.

To toggle this mod on and off in game type /modernmaptooltip toggle
To change the scale of the map in the tooltip type /modernmaptooltip scale <1 to 15>
To view the current scale type /modernmaptooltip scale with no arguments (only for versions 1.2+)
This mod provides more customisability, but if you want a similar mod for Fabric, Forge and Neoforge for almost any version you can think of, try Map Tooltip
Config
A configuration file is saved at <your minecraft directory>/modernmaptooltip.config but all the customisation can be done in game as well.
Note
The contents of maps are only usually only sent to the client when the map is in your inventory, and consequently unknown maps in chests will not display.
