Depending on whether we are talking about a multiplayer server or a single player world the answer is mixed. Map data is created once the area is loaded around the map so you would need to either explore that area or use some form of an auto mover/camera tool to move through the area. That aside here is some information that may help a bit with trying to do this as efficiently as possible:
On a multiplayer server the view distance on most servers is normally set to about 8 chunks or 128x128 blocks which is the same size as a map with no zoom step (1:1). The max that a server owner can set their server for is 15 chunks or 240x240 blocks which would actually fall one chunk (16 blocks) short around the entire border when viewed on a map with zoom step of +1 (1:2). Beyond this, you would have to load the chunks with the map via actual movement within the area.
On a single player world you could use a tool similar to Optifine which allows you to set your view distance beyond the normal limits of 16 chunks to a "extreme" view distance of 32 chunks or 512x512 blocks. With this view distance on a map with zoom step 4 (1:16) you could fully load the map with as few a four perfectly spaced passes through the area. Of course with the game trying to load this much data all at once the time savings may be negated if you are not doing this on a fair powerful system that can process and load all these chunks quickly.
All right, got it working. I put everything on top of a fill clock.
This block gives all players the objective always.
/scoreboard players add @a visited 0
This block produces the title.
/title @a[x=-153,y=69,z=309,r=10,score_visited=1] title {text:"Place",bold:true}
This block adds points to visited for anyone within a radius of 10.
/scoreboard players add @a[x=-153,y=69,z=309,r=10,score_visited=1] visited 1
This block takes away points so that the title can be reshown to anyone reentering the area.
/scoreboard players remove @a[x=-153,y=69,z=309,rm=10,score_visited_min=1] visited 1
Things to note:
- I made everything originate from one place, so the XYZ values are hard coded.
- Visited is intended to add up to 2 with these precise commands. These command blocks are largely dependent on where the command blocks are placed on the fill clock relative to each other. On 1, the title is shown, then the player is meant to sit at 2 until they leave the area, where it should drop back to 0.
Best Answer
To find what a map actually contains, you need to first mouse over the map in your inventory, which displays the numeric ID of the map.
Once you have that ID, the next step is to read the data from the file system. The relevant file is, relative to the top-level folder the game is saved in,
data/map_<#>.dat
where#
is the ID you found above. This is a NBT file, which has to be read using a special program (the linked question is aboutlevel.dat
but map files use the same file format). The coordinates of the center of the map are then available asxCenter
andzCenter
tags in thedata
folder.See this Minecraft Wiki article for more information on how map items are stored.