At what point in your project do you do the mapping?

Do you do it after you have the basic overview of the story, but still pretty early on?  Or do you sometimes just map out a "world" (towns dungeons etc.) and then connect everything in more detail after that?   Especially curious about the process of people who have actually completed/released games.  
Story first, in great detail, which then provides a list of needed locations along with some details as to the layout.  If I get side quests done first, that also gives me an idea of how many people need to be homed in each town and what other little things I might need to add to maps for the side quests.
Pretty much like Shaz's approach, though I think she sounds better organised than I am.  I tend to leave a fair number of the smaller details of the story vague so that I can adapt, amend as I go along and as my characters develop their personalities in front of my eyes.  I am also plotting in 'secret' rooms and I need to ensure that they are fairly evenly spread throughout the game.

I do find, though, that my maps change as I make them, and as I do more and more edits to get exactly what I want in the way of environment and objects.  This makes my map planning more fluid than some people's approach, or (ahem) more chaotic, depending on how you want to look at it.

I tend to do things like enemy skills and strengths/weaknesses as I go along, so those are being done in parallel with the mapping.  That is because, although I have a general outline of what they will be and how they will work, I like to see how the party's skills etc. actually work together in frequent play testing of each area, and don't want to waste time redoing too much in the way of enemy AI.  Some people throw up their hands in horror at that, but it suits my way of working. 
Envision the world first, quests and the plot blossom from the world. You can map and story whenever you feel like you want, you could write out the entire story before even touching maps or think up part of the story and then map until you run out. Then repeat the process until the game is done. Honestly, I prefer to think of my theme, atmosphere and world before even going into the actual story. You need to connect so many aspects of your game together, to make it a pleasing experience for the player.
I start out with a shell of a story at least before mapping. In fact, my current game is using (rough verison of) a story I hashed out in word about 4 years ago.
I've done both. There are times when I have a very clear idea of the story I want to tell. For example in Blacksword Chronicles, the entire story outline was written and all the locations roughly drafted in PowerPoint before any of the maps were done. This way I know what needs to happen where, and the specific locations and scenes I needed.

In my other, more open world style game, Guild of 5 Magics, all the maps were placed FIRST. And then I looked at the maps and go hmmm...what kinda story can we weave outta this?

So it really depends on what you want to do. Either is fine.
I mapped my entire world first on the idea of:  The world existed before it's people or any conflicts amongst them.  My current project would not be as awesome as it is had I started with anything other than mapping.

Original thread: https://forums.rpgmakerweb.com/threads/at-what-point-in-your-project-do-you-do-the-mapping.52716/