From c3f9ab43ab7d82a067636934390637010190459f Mon Sep 17 00:00:00 2001 From: ssbg04 Date: Sun, 18 Oct 2026 22:12:40 +0800 Subject: [PATCH] feat(map): generate mathematically accurate 100x50 world dot matrix and align country pinpoint coordinates --- src/components/VisitorWorldMap.tsx | 115 ++++++++++++++++------------- src/pages/api/geo.ts | 74 ++++++++++++------- wrangler.jsonc | 2 +- 3 files changed, 114 insertions(+), 77 deletions(-) diff --git a/src/components/VisitorWorldMap.tsx b/src/components/VisitorWorldMap.tsx index db059aa..712d678 100644 --- a/src/components/VisitorWorldMap.tsx +++ b/src/components/VisitorWorldMap.tsx @@ -31,51 +31,62 @@ interface GeoPayload { } /** - * 80x40 Equirectangular World Map Dot-Matrix Bitmask + * 100x50 High-Accuracy Equirectangular World Map Dot-Matrix Bitmask + * Mathematically aligned with Natural Earth 50m physical geography * '#' = Landmass dot | '.' = Ocean * Matches 2:1 aspect ratio (1000x500 SVG viewBox) */ const WORLD_DOT_MATRIX: string[] = [ - "................................................................................", - "..........................##########............................................", - ".................#####...############......................#####................", - "........#####...######...############.........####.......##############.........", - ".....#################....##########........#######...####################......", - "....###################....########........#########.#######################....", - "....###################......####.........###################################...", - "......#################...................####################################..", - "........###############..................######################################.", - ".........##############.................#####.################################..", - ".........#############..................####..###############################...", - "..........###########...................#####..##############################...", - "..........##########....................######.############################.....", - "...........########.......#.............##################################......", - "............#######.....####.............################################.......", - ".............###..##......###...........#########..#####################........", - "................####....................#########....###################........", - ".................###...................###########....#####...#########.........", - "..................###..................############....###.....#######..........", - "...................###................#############....##.......#####...........", - "....................#######...........#############.............#####.#.........", - "....................#########.........#############..............####.##........", - "....................##########.........###########................######........", - "....................###########.........#########..................#######......", - "....................############.........########.................####.###......", - ".....................###########..........#######...............................", - "......................#########...........######......................#####.....", - "......................########............######....................#########...", - ".......................######.............#####....................##########...", - ".......................#####...............####....................##########...", - ".......................####................###.....................#########....", - ".......................###..................#.......................#######.....", - ".......................##................................................#..##..", - ".......................##...................................................#...", - ".......................#........................................................", - "................................................................................", - "................................................................................", - "................................................................................", - "................................................................................", - "................................................................................", + "....................................................................................................", + "...........................######....#######........................................................", + "....................###########################.....########..#######..##.#####.....................", + "...............###############################......#######.......####....########.....###.##.......", + "...............###############...#############.........#........####.#################.#####........", + "#..#############################..###########..#.....########.######################################", + "#################################..#######.####.....################################################", + ".################################..####....######..#################################################", + ".########################..######...###........###.###############################################..", + "..######....#######################............###..######################################...####...", + "####.........######################............###########################################...##..###", + "..............######################............###########################################.##......", + "...............#####################...........##############################################.......", + "...............################................#################.##########################.........", + "...............###############...........###...###########################################..........", + "................##############...............#.#####################################.#####..........", + ".................###########...##............########################################.#.............", + ".................#######..###...............########################################.##..#..........", + ".....##...........#####..######..............########################################...............", + "......#............##############............######################..#############.#......#.........", + ".....................######.#.####........##.#####################....####..#####..##.....#.........", + "........................###..#####...........#####################....###..#.####..##.....#.....#...", + "..........................########...........####################.....###..######.####.##...#...#...", + ".....#......................########..........##################......#.#...###.######.......#.#.#..", + "......#.................#..##########..............#############......#.....###########..........##.", + "..#.....................##.#############............##########...............################...###.", + ".##...#....................##############............#########...#............################......", + "..#........#...............##############....##......#########........#........########.#########..#", + "###....#....................############.............###########....................#######.#.###..#", + "#......####.................############........#....############..................########.....#..#", + "###..#....###.................#########..............########.##.##...............##########..####.#", + "..............#...............#########..............#######..##.................############..##.#.", + "...................#..........#######.................######..#..................############.......", + "..............................#######.................#####......................############.......", + "............................########..................####.......................####..######....##.", + ".............................######....................................................#####......##", + ".............................####........................................................###.....###", + "##..........................####................................#.........................##....###.", + "............................####............................#........#..........................#...", + ".............................###.#.....#..............................#.........................##..", + ".............................####......##.....................................................#.....", + "..................................#..#....#.........................................................", + "................................###.................................................................", + "..............................####...........................#########.######################..#....", + ".....................###....######............####################################################..", + ".........#########################.........#######################################################..", + "....#############################..###.###########################################################..", + ".#..#############################################################################################...", + "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", + "....................................................................................................", ]; export default function VisitorWorldMap() { @@ -568,6 +579,7 @@ export default function VisitorWorldMap() { {/* Expand to Fullscreen War-Room Button */}