You need 3 global variables e.g. "X", "Y", "Layout". X - is X position where player is spawned at the start of layout, Y - is Y position and Layout - will be number of layout where player is spawned. Also you'll have to create objects which will have same private variables(x,y,layout). Place them in the building entraces/exits. If player interact with them set global varaibles to private variables, player should go to layout number global('layout').
Well it's a solution which I used in my project. I think there are other ways to solve your problem.