export default function SubwayMap() { const lines = [ { id: 1, name: "Marunouchi", color: "#e11d48", code: "M" }, { id: 2, name: "Ginza", color: "#f59e0b", code: "G" }, { id: 3, name: "Yamate", color: "#10b981", code: "Y" }, { id: 4, name: "Tozai", color: "#0ea5e9", code: "T" }, { id: 5, name: "Hibiya", color: "#6366f1", code: "H" }, { id: 6, name: "Oedo", color: "#ec4899", code: "O" }, ]; type S = { x: number; y: number; name: string; lines: string[]; label?: "L"|"R"|"T"|"B" }; const S: Record = { m1: { x: 120, y: 220, name: "Nerima", lines: ["M"], label: "L" }, m2: { x: 240, y: 220, name: "Ikebukuro", lines: ["M","Y"], label: "T" }, m3: { x: 360, y: 220, name: "Ochanomizu", lines: ["M"], label: "T" }, m4: { x: 480, y: 220, name: "Otemachi", lines: ["M","T","H"], label: "T" }, m5: { x: 600, y: 220, name: "Ginza-Itchome", lines: ["M","G"], label: "T" }, m6: { x: 720, y: 340, name: "Shimbashi", lines: ["M","Y","O"], label: "R" }, m7: { x: 840, y: 340, name: "Hamamatsucho", lines: ["M"], label: "R" }, g1: { x: 600, y: 100, name: "Asakusa", lines: ["G"], label: "T" }, g2: { x: 600, y: 160, name: "Ueno", lines: ["G","Y"], label: "L" }, g3: { x: 540, y: 280, name: "Ginza", lines: ["G","H"], label: "L" }, g4: { x: 540, y: 400, name: "Roppongi", lines: ["G","O"], label: "L" }, g5: { x: 540, y: 500, name: "Shibuya", lines: ["G","Y"], label: "L" }, y1: { x: 240, y: 340, name: "Shinjuku", lines: ["Y","T","O"], label: "L" }, y4: { x: 720, y: 500, name: "Tokyo", lines: ["Y","H"], label: "R" }, t1: { x: 120, y: 400, name: "Nakano", lines: ["T"], label: "L" }, t3: { x: 360, y: 400, name: "Kagurazaka", lines: ["T"], label: "B" }, t5: { x: 840, y: 160, name: "Nishi-Funabashi", lines: ["T"], label: "R" }, h1: { x: 300, y: 540, name: "Naka-Meguro", lines: ["H"], label: "B" }, h3: { x: 420, y: 340, name: "Hibiya", lines: ["H","O"], label: "B" }, h5: { x: 840, y: 500, name: "Kita-Senju", lines: ["H"], label: "R" }, o1: { x: 120, y: 500, name: "Hikarigaoka", lines: ["O"], label: "L" }, o_end: { x: 840, y: 400, name: "Daimon", lines: ["O"], label: "R" }, }; type PT = { x: number; y: number }; const resolve = (p: string | PT): PT => typeof p === "string" ? { x: S[p].x, y: S[p].y } : p; const paths: { id: string; color: string; pts: (string | PT)[] }[] = [ { id: "M", color: lines[0].color, pts: ["m1","m2","m3","m4","m5","m6","m7"] }, { id: "G", color: lines[1].color, pts: ["g1","g2", {x:600,y:220}, "m5","g3","g4","g5"] }, { id: "Y", color: lines[2].color, pts: ["m2", {x:360, y:220}, "g2", {x:720, y:160}, "m6", "y4", {x:540, y:500}, "g5", {x:240, y:500}, "y1", "m2"] }, { id: "T", color: lines[3].color, pts: ["t1","y1","t3","m4", {x:600,y:400}, {x:720,y:280}, "t5"] }, { id: "H", color: lines[4].color, pts: ["h1", "g3", "h3","m4", {x:600,y:340}, "y4", "h5"] }, { id: "O", color: lines[5].color, pts: ["o1", {x:240,y:500}, "y1", {x:360,y:340}, "h3", "g4", "m6", "o_end"] }, ]; const W = 960, H = 620; const poly = (pts: (string | PT)[]) => pts.map(p => { const q = resolve(p); return `${q.x},${q.y}`; }).join(" "); return (
Transit Authority · Schematic · Ed. VII
Shinkai Metro network
Six lines · 22 stations · 11 interchanges
Effective · 16 Apr 2026
{paths.map((p) => ( ))} {Object.entries(S).map(([k, s]) => { const isInt = s.lines.length > 1; const r = isInt ? 12 : 7; const lx = s.label === "L" ? s.x - r - 8 : s.label === "R" ? s.x + r + 8 : s.x; const ly = s.label === "T" ? s.y - r - 8 : s.label === "B" ? s.y + r + 16 : s.y + 4; const anchor = s.label === "L" ? "end" : s.label === "R" ? "start" : "middle"; return ( {s.name} ); })} {paths.map((p, i) => { const first = resolve(p.pts[0]); const last = resolve(p.pts[p.pts.length - 1]); const L = lines[i]; const endpoints = p.id === "Y" ? [] : [first, last]; return endpoints.map((pt, j) => ( {L.code} )); })}
{lines.map((l) => (
{l.code}
{l.name} Line
Route {String(l.id).padStart(2, "0")}
))}
Schematic only · not drawn to scale · © Transit Authority ◯ Interchange · ● Local stop
); }