Japt -R
, 40 bytes
Æ=Vg"|\\/";²i1S+iX%2?S:U)iSp[TZÊ-YY]gVÃw
Explanation:
Æ=Vg"|\\/";²i1S+iX%2?S:U)iSp[TZÊ-YY]gVÃw
// U = road size
// V = direction
Æ Ã // Loop X through [0...U]
= ; // Set U to:
"|\\/" // "|\/"
Vg // [V]
² // Double U
i1 ) // Insert at index 1:
S+ // " " +
X%2?S:U // X%2?" ":U
i // + " "
i // Insert at index 0:
Sp // " " repeated this many times:
[TZÊ-YY] // [0,U.length - X,X]
gV // [V]
w // Reverse output