From 7931d426050a01ce0ec1dbee659453994a10fdbb Mon Sep 17 00:00:00 2001 From: Edwin Eames Date: Mon, 29 Dec 2025 23:14:58 -0500 Subject: [PATCH] almost perfect pathd --- .gitignore | 2 +- src/lib/states.ts | 141 +++++++++++++++++++++++++ src/lib/states/connecticut.ts | 105 +++++++++++++++++++ src/lib/states/maine.ts | 179 ++++++++++++++++++++++++++++++++ src/lib/states/massachusetts.ts | 140 +++++++++++++++++++++++++ src/lib/states/newhampshire.ts | 123 ++++++++++++++++++++++ src/lib/states/rhodeisland.ts | 79 ++++++++++++++ src/lib/states/vermont.ts | 159 ++++++++++++++++++++++++++++ 8 files changed, 927 insertions(+), 1 deletion(-) create mode 100755 src/lib/states.ts create mode 100755 src/lib/states/connecticut.ts create mode 100755 src/lib/states/maine.ts create mode 100755 src/lib/states/massachusetts.ts create mode 100644 src/lib/states/newhampshire.ts create mode 100755 src/lib/states/rhodeisland.ts create mode 100755 src/lib/states/vermont.ts diff --git a/.gitignore b/.gitignore index 237b55b..59e8c94 100755 --- a/.gitignore +++ b/.gitignore @@ -36,7 +36,7 @@ dist/ downloads/ eggs/ .eggs/ -lib/ + lib64/ parts/ sdist/ diff --git a/src/lib/states.ts b/src/lib/states.ts new file mode 100755 index 0000000..1c2dd98 --- /dev/null +++ b/src/lib/states.ts @@ -0,0 +1,141 @@ +// src/lib/states.ts +import { writable } from 'svelte/store'; +import { massachusettsCounties } from './states/massachusetts'; +import { maineCounties } from './states/maine'; +import { vermontCounties } from './states/vermont'; +import { newHampshireCounties } from './states/newhampshire'; +import { rhodeIslandCounties } from './states/rhodeisland'; +import { connecticutCounties } from './states/connecticut'; + +export interface NewEnglandState { + id: string; + name: string; + slug: string; + image: string; + pathD: string; + fill: string; + hoverFill: string; +} + +// You can aggregate counties if needed for a detailed map view +export const allCounties: NewEnglandState[] = [ + ...massachusettsCounties, + ...maineCounties, + ...vermontCounties, + ...newHampshireCounties, + ...rhodeIslandCounties, + ...connecticutCounties, +]; + +// Export individual county arrays for dynamic access +export { + massachusettsCounties, + maineCounties, + vermontCounties, + newHampshireCounties, + rhodeIslandCounties, + connecticutCounties, +}; + +export const newEnglandStates: NewEnglandState[] = [ + { + id: 'ME', + name: 'Maine', + slug: 'maine', + image: '/images/states/me.png', + pathD: "M946.8 118.4h-.097l.194.096-.097-.097zm7.182-20.675-.776-1.165v.582l.776.583zm-1.359-1.068v-.97l-.097-.583.097 1.553zm3.495-4.076-.194-.098.097.292.097-.194zm9.706-4.854-.194-1.456-.388.68.582.776zm-2.427.583.097-1.068-1.164.194 1.067.874zm3.592-3.203h-.389v.194l.389-.194zm-4.853 1.456-.874-.195-.097.874.97-.68zm4.95-3.01.873.68-.29-.776-.583.097zm-2.62.098-.874 1.65 1.164-.583-.29-1.067zm-4.175.097-.388.582.291.874.097-1.456zm5.727-3.203-.097-.777-.291.486.388.29zm-.485.388-.874-.777v.68l.874.097zm-5.436 2.232-.194-1.067-.388.873.582.194zm9.221-3.397-1.456 2.136-.097-1.553 1.553-.583zm7.086-6.503-.68-.97-.388.193 1.068.777zm2.62-4.368-.582-.291-.097.291h.68zm1.262-7.57h-.873l.97.29-.097-.29zm1.456.97-.29-1.747-.777-.097 1.067 1.844zm-1.553-1.553-.194-1.844-.68 1.261.874.583zm-56.296 15.239 14.074 33.001.194.68 6.115 7.473v-.097l.97-.29.195-5.533 1.553-1.942.97-5.144-.873-.874 1.65-5.047 5.63-2.62 3.688-4.465 1.359-7.766 5.92-.388-.776-3.98 7.377-2.814.485-4.368 1.747.388 4.854-3.98 2.135-5.144-4.95-4.95-5.242-1.068-1.94-3.98v-2.329l-3.204.97-3.591-1.26v-3.98l-9.707-20.966-7.085-3.689-7.862 6.6-2.136-.387-1.844-3.398-2.524.97-3.591 17.86 1.262 5.824 1.068 11.842-2.815 9.124 1.941 1.456-2.33 4.465-2.523-.388-.194.194z", + fill: 'fill-green-500', + hoverFill: 'fill-green-700' + }, + { + id: 'VT', + name: 'Vermont', + slug: 'vermont', + image: '/images/states/vt.png', + pathD: "m923.02 132.862-4.369-15.919.777-5.823v-6.31l-1.068-5.047 4.174-5.532.194-1.748-2.33-8.735-1.261.485-5.339 1.941-5.241 2.039-12.036 4.368-.68.194 4.368 10.191 1.456 9.61 5.145 8.056 4.853 15.918.194-.097.776-.291 2.233-.68 1.941-.68 5.533-1.65.68-.29z", + fill: 'fill-green-500', + hoverFill: 'fill-green-700' + }, + { + id: 'NH', + name: 'New Hampshire', + slug: 'newhampshire', + image: '/images/states/nh.png', + pathD: "m923.893 75.983-1.262 1.553-1.456-.291-.777 6.406v.097l2.33 8.735-.194 1.748-4.174 5.532 1.068 5.047v6.31l-.777 5.823 4.368 15.919L927 131.6l12.23-4.077 5.532-6.018v-1.553l.291-2.523-.679.29-.097-.582-6.115-7.473-.194-.68-14.074-33.001z", + fill: 'fill-green-500', + hoverFill: 'fill-green-700' + }, + { + id: 'MA', + name: 'Massachusetts', + slug: 'massachusetts', + image: '/images/states/ma.png', + pathD: "m956.312 153.05-.291-.193v.29l.29-.096zm-2.912-2.62.68-.291v-.388l-.68.68zm12.036-7.57-.097-1.36-.194-.776.29 2.135zm-42.417-9.998-.68.29-5.532 1.651-1.941.68-2.233.679-.776.291v.291l.291 5.048.291 4.659.291 4.27.486.292 1.747-.486 7.862-2.33.194.486 13.977-5.338.097.194 1.262-.486 4.465-1.747 4.27 5.145.583-.486.291-1.456-.097 2.33h.97l.292 1.165.874 1.65 4.562-5.533 3.785 1.262.874-1.941 6.212-3.3-2.621-5.145.68 3.3-3.204 2.427-3.591.291-7.183-7.668-3.203-4.853 3.203-3.397-3.3-.194-1.359-3.204-.097-.194-5.532 6.018-12.23 4.077-3.98 1.262z", + fill: 'fill-green-500', + hoverFill: 'fill-green-700' + }, + { + id: 'RI', + name: 'Rhode Island', + slug: 'rhodeisland', + image: '/images/states/ri.png', + pathD: "m946.508 152.08-.097-2.038-.29.776.387 1.262zm1.942-1.553-1.262-2.426-.097 2.523 1.359-.097zm-.583-3.009.68 1.747.873 1.553.583-1.164-.874-1.65-.291-1.165h-.97v.68zm-10.774-3.98.389 1.068 3.009 8.445.582 2.038.097 2.33.194-.291 4.66-3.689-.874-6.6 1.94-.388-4.27-5.145-4.465 1.747-1.262.486z", + fill: 'fill-green-500', + hoverFill: 'fill-green-700' + }, + { + id: 'CT', + name: 'Connecticut', + slug: 'connecticut', + image: '/images/states/ct.png', + pathD: "m936.996 143.345-13.977 5.338-.194-.485-7.862 2.33-1.747.485.194.97 3.688 14.268 1.165 1.456-2.524 3.106 1.748 1.65 5.63-5.435 3.008-4.174.583 1.165 14.17-6.31.292-.29-.097-2.33-.583-2.038-3.008-8.445-.389-1.067-.097-.194z", + fill: 'fill-green-500', + hoverFill: 'fill-green-700' + } +]; + +export const mapViewBox: string = "890 20 95 155"; + +/** + * SVG transform string to apply to the group of states to straighten the map. + * Format: "rotate(angle cx cy)" + * - angle: degrees to rotate (negative for counter-clockwise) + * - cx: x-coordinate of the center of rotation + * - cy: y-coordinate of the center of rotation + * + * You'll need to experiment with these values. + * The approximate center of your current viewBox (890 65 85 110) is: + * cx = 890 + (85 / 2) = 932.5 + * cy = 65 + (110 / 2) = 120 + */ +// export const mapTransform: string = "rotate(-2 932.5 120)"; // Example: Rotate -2 degrees around center +export const mapTransform: string | undefined = undefined; // Start with no transform +// Try uncommenting the line above and adjusting the -2, 932.5, and 120 values. +// For example, if it's tilted 5 degrees clockwise, try "rotate(-5 932.5 120)" +// If it's tilted 3 degrees counter-clockwise, try "rotate(3 932.5 120)" + +export interface User { + id: number; + username: string; + email?: string; + // Add other fields if needed +} + +export const user = writable(null); + +// Dark mode store +export const darkMode = writable(typeof window !== 'undefined' ? localStorage.getItem('darkMode') === 'true' : false); + +// Subscribe to changes and apply/persist +darkMode.subscribe((value) => { + if (typeof window !== 'undefined') { + localStorage.setItem('darkMode', value.toString()); + if (value) { + document.documentElement.classList.add('dark'); + document.documentElement.setAttribute('data-theme', 'dark'); + } else { + document.documentElement.classList.remove('dark'); + document.documentElement.setAttribute('data-theme', 'light'); + } + } +}); diff --git a/src/lib/states/connecticut.ts b/src/lib/states/connecticut.ts new file mode 100755 index 0000000..95da3fc --- /dev/null +++ b/src/lib/states/connecticut.ts @@ -0,0 +1,105 @@ +// src/lib/states/connecticut.ts +export interface NewEnglandState { + id: string; + name: string; + slug: string; + image: string; + pathD: string; + fill: string; + hoverFill: string; +} + +export const connecticutCounties: NewEnglandState[] = [ + { + id: 'fairfield', + name: 'Fairfield County', + slug: 'fairfield', + image: '/images/counties/ct/fairfield.png', + pathD: "M 776.1 12.71 793.94 13.63 902.92 15.76 903.51 24.54 904.53 69.52 904.84 83.14 905.65 118.93 905.65 119.47 906.23 137.24 906.24 138.18 907.54 184.57 907.54 184.67 907.63 232.28 838 235.22 792.97 225.41 775.53 221.43 774.63 221.3 768.46 219.95 754.55 217.86 752.8 222.37 740.56 211.87 718.98 191.09 718.31 190.51 753.32 168.36 753.08 168.18 749.85 122.43 727.49 122.27 727.8 52.78 755.28 52.13 766.69 52.28 767.07 52.32 777.33 52.33 776.1 12.71 Z", + fill: 'fill-green-500', + hoverFill: 'fill-green-700' + }, + { + id: 'hartford', + name: 'Hartford County', + slug: 'hartford', + image: '/images/counties/ct/hartford.png', + pathD: "M 502.69 266.67 421.01 279.09 405.49 232.52 399.06 191.47 393.29 156.16 393.18 156 393.13 154.85 391.49 144.58 391.32 143.15 419.89 138.5 438.01 73.4 445.95 44.32 386.02 48 394.77 7.11 394.77 6.82 455.76 7.76 455.81 7.76 476.88 8.44 475.53 30.47 493.19 27.9 496.56 27.41 496.81 24.75 500.17 17.29 500.46 17.25 501.15 8.61 518.69 8.38 526.35 8.28 604.89 9.51 604.94 10.12 608.87 37.99 609.21 41.62 611.82 58.81 607.47 59.31 603.15 60 603.03 61.36 601.47 102.67 623.94 172.83 646.35 253.79 643.57 260.09 622.75 263.86 590.15 230.78 553.86 236.08 554.99 232.18 518.52 252.38 511.31 257.17 502.37 259.02 502.69 266.67 Z", + fill: 'fill-green-500', + hoverFill: 'fill-green-700' + }, + { + id: 'litchfield', + name: 'Litchfield County', + slug: 'litchfield', + image: '/images/counties/ct/litchfield.png', + pathD: "M 267.86 328.51 266.85 329.3 261 328.12 258.98 326.35 212.76 315.89 185.22 217.77 183.77 217.38 183.45 217.38 181.92 217.72 181.4 217.68 180.79 217.29 183.86 165.43 186.03 128.71 186.06 128.42 193.47 1 274.61 2.5 275.16 2.53 301.26 3.66 301.79 3.7 344.91 5.35 376.05 6.54 394.77 6.82 394.77 7.11 386.02 48 445.95 44.32 438.01 73.4 419.89 138.5 391.32 143.15 391.49 144.58 393.13 154.85 393.18 156 393.29 156.16 399.06 191.47 405.49 232.52 396.75 238.72 389.42 239.55 390.6 246.87 383.24 246.25 374.04 251.01 337.44 278.52 329.18 278.93 332.94 302.42 264.32 308.09 260.86 319.69 267.86 328.51 Z", + fill: 'fill-green-500', + hoverFill: 'fill-green-700' + }, + { + id: 'middlesex', + name: 'Middlesex County', + slug: 'middlesex', + image: '/images/counties/ct/middlesex.png', + pathD: "M 675.44 434.29 672.42 435.78 672.66 440.12 656.44 444.54 651.37 435.37 648.33 435.25 628.98 434.97 620.31 439.89 614.78 439.45 608.95 442.26 605.97 445.49 600.91 444.84 599.79 442.41 596.39 443.07 594.77 444.04 593.3 447.67 592.87 447.98 533.58 348.17 531.98 348.17 521.12 350.61 505.23 354.06 510.38 319.22 506.41 320.49 505.81 312.3 502.69 266.67 502.37 259.02 511.31 257.17 518.52 252.38 554.99 232.18 553.86 236.08 590.15 230.78 622.75 263.86 637.88 297.21 683.24 300.83 690.56 346.77 636.64 353.67 675.44 434.29 Z", + fill: 'fill-green-500', + hoverFill: 'fill-green-700' + }, + { + id: 'newhaven', + name: 'New Haven County', + slug: 'newhaven', + image: '/images/counties/ct/newhaven.png', + pathD: "M 405.49 232.52 421.01 279.09 502.69 266.67 505.81 312.3 506.41 320.49 510.38 319.22 505.23 354.06 521.12 350.61 531.98 348.17 533.58 348.17 592.87 447.98 589.06 450.74 588.89 450.86 579.04 441.21 578.86 441.04 578.84 441.01 573.71 439 572.93 439.21 572.61 439.29 572.3 439.38 571.77 439.52 570.98 439.74 570.5 439.87 567.52 440.68 563.39 439.73 562.39 439.5 559.45 438.83 559.33 438.86 559.13 438.92 553.5 440.46 549.45 441.57 549.22 441.63 548.69 441.69 545.37 442.09 544.05 442.24 544.01 442.22 543.68 442.06 540.53 440.53 540.27 440.4 538.44 440.96 536.55 441.54 536.27 441.63 535.44 442.45 530.97 446.89 530.77 449.68 530.72 450.41 529.07 452.46 528.74 452.88 528.66 452.99 527.39 453.66 526.84 453.95 526.54 453.96 523.87 454.07 522.01 454.15 521.6 454.17 520.99 454.19 520.86 454.2 520.77 454.2 520.18 454.23 520.08 454.04 518.88 451.69 519.92 450.57 519.39 448.81 515.2 446.03 510.83 448.49 501.73 441.68 500.46 441.68 488.4 442.86 474.69 449.88 474.42 448.87 471.26 447.36 462.48 447.4 461.45 448.04 459.83 452.4 456.77 453.77 448.31 455.28 442.43 454.66 440.17 453.45 438.68 452.65 438.3 452.09 439.23 449.57 439.33 449.52 442.72 447.67 442.73 447.64 443.1 445.6 442.04 443.33 439.19 437.26 437.16 432.92 437.06 432.71 433.43 433.21 433.34 433.28 432.07 434.32 431.82 439.07 431.8 439.51 431.74 440.56 427.1 444.91 426.43 445.53 425.52 446.38 416.54 449.5 415.43 449.89 414.71 450.14 414.41 450.24 405.28 459.33 404.72 459.89 369.91 422.6 366.75 420.02 365.79 418.85 365.24 416.66 362 415.04 360.2 412.37 349.76 405.12 341.22 394.48 336.38 385.23 330.62 376.18 325.53 376.32 321.36 371.77 319.39 368.64 320.69 363.59 311.09 355.6 267.86 328.51 260.86 319.69 264.32 308.09 332.94 302.42 329.18 278.93 337.44 278.52 374.04 251.01 383.24 246.25 390.6 246.87 389.42 239.55 396.75 238.72 405.49 232.52 Z", + fill: 'fill-green-500', + hoverFill: 'fill-green-700' + }, + { + id: 'newlondon', + name: 'New London County', + slug: 'newlondon', + image: '/images/counties/ct/newlondon.png', + pathD: "M 907.63 232.28 907.67 256.54 907.67 256.57 904.17 357.64 904.17 357.75 895.46 356.13 886.52 360.33 885.29 361.6 884.91 363.85 885.47 369.73 889.13 375.8 889.9 383.44 890.05 398.15 889.51 400.08 886.46 403.73 878.14 410.61 874.49 405.83 866.89 402.76 854.1 405.11 851.84 403.82 851.34 403.49 845.87 401.9 841.93 401.99 837.26 406.43 831.29 409.42 827.71 406.36 826.56 406.43 824.05 411.63 809.86 413.73 783.53 412.16 779.34 415.22 777.08 419.24 772.04 423.66 762.61 423.49 751.11 417.41 745.91 413.3 744.36 410.56 741.62 409.72 738.72 410.16 734.35 414.37 733.67 415.77 733.25 423.66 729.51 427.99 724.31 423.69 720 422.92 714.69 423.44 713.12 423.93 713.7 426.3 713.36 428.75 709.08 432.71 685.41 435.59 681.28 435.21 678.63 432.72 675.44 434.29 636.64 353.67 690.56 346.77 683.24 300.83 637.88 297.21 622.75 263.86 643.57 260.09 646.35 253.79 718.31 190.51 718.98 191.09 740.56 211.87 752.8 222.37 754.55 217.86 768.46 219.95 774.63 221.3 775.53 221.43 792.97 225.41 838 235.22 907.63 232.28 Z", + fill: 'fill-green-500', + hoverFill: 'fill-green-700' + }, + { + id: 'tolland', + name: 'Tolland County', + slug: 'tolland', + image: '/images/counties/ct/tolland.png', + pathD: "M 776.1 12.71 777.33 52.33 767.07 52.32 766.69 52.28 755.28 52.13 727.8 52.78 727.49 122.27 749.85 122.43 753.08 168.18 753.32 168.36 718.31 190.51 646.35 253.79 623.94 172.83 601.47 102.67 603.03 61.36 603.15 60 607.47 59.31 611.82 58.81 609.21 41.62 608.87 37.99 604.94 10.12 604.89 9.51 651.9 10.25 735.44 11.57 761.98 11.98 762 11.98 776.1 12.71 Z", + fill: 'fill-green-500', + hoverFill: 'fill-green-700' + }, + { + id: 'windham', + name: 'Windham County', + slug: 'windham', + image: '/images/counties/ct/windham.png', + pathD: "M 180.79 217.29 181.4 217.68 181.92 217.72 183.45 217.38 183.77 217.38 185.22 217.77 212.76 315.89 258.98 326.35 261 328.12 266.85 329.3 267.86 328.51 311.09 355.6 320.69 363.59 319.39 368.64 321.36 371.77 325.53 376.32 330.62 376.18 336.38 385.23 341.22 394.48 349.76 405.12 360.2 412.37 362 415.04 365.24 416.66 365.79 418.85 366.75 420.02 369.91 422.6 404.72 459.89 404.23 460.37 399.31 466.41 396.92 470.55 395.27 473.4 392.78 476.04 392.56 476.27 392.16 476.7 389.97 476.81 389.96 476.73 389.95 476.62 389.95 476.55 389.93 476.36 389.85 475.52 388.96 475.08 388.02 474.94 379.27 473.7 377.14 473.4 375.34 474.37 373.48 475.36 365.8 481.8 365.03 482.45 360.08 487.96 359.75 488.32 359.69 488.39 354.56 494.1 354.08 494.64 354.07 494.64 353.03 496.57 352.03 501.62 352.2 503.13 352.87 504.96 351.74 506.6 343.66 508.83 329.31 502.26 326.91 501.16 326.65 498.69 323.67 497.71 313.21 502.52 302.42 511.17 299.58 510.4 294.15 520.22 288.09 525.19 277.83 519.39 273.79 520.62 267.27 525.86 259.36 529.38 241.85 532.72 233.5 541.83 230.13 542.61 224.45 549.88 215.45 559.12 209.01 558.9 201.5 562.11 197.66 570.67 190.94 563.88 181.03 569.14 181.08 574.29 178.6 579.98 175.99 581.6 175.03 578.52 175.44 574.7 174.35 573.08 173.27 572.94 166.48 577.17 162.07 581.37 159.67 584.66 158.66 589.85 152.82 590.24 152.39 584.86 147.88 581.82 144.41 582.35 127.79 589.53 124.55 593.4 121.96 599 123.08 584.22 122.78 583.6 116.43 573.96 112.44 567.43 109.41 562.47 106.42 557.67 92.33 534.57 129.39 511.79 132.55 509.88 140.01 505.36 181.99 479.98 184.15 478.65 195.41 471.97 166.7 425.72 169.32 385.97 169.78 380.14 172.29 348.11 172.38 346.99 172.59 344.07 172.97 338.33 173 337.36 173.04 336.14 173.05 335.87 173.09 335.06 173.68 324.54 173.72 324.26 173.72 323.97 173.77 323.33 173.81 322.82 173.85 322.41 175.49 295.73 179.11 245.56 180.79 217.29 Z", + fill: 'fill-green-500', + hoverFill: 'fill-green-700' + } +]; + +export const mapViewBox: string = "890 20 95 155"; + +/** + * SVG transform string to apply to the group of states to straighten the map. + * Format: "rotate(angle cx cy)" + * - angle: degrees to rotate (negative for counter-clockwise) + * - cx: x-coordinate of the center of rotation + * - cy: y-coordinate of the center of rotation + * + * You'll need to experiment with these values. + * The approximate center of your current viewBox (890 65 85 110) is: + * cx = 890 + (85 / 2) = 932.5 + * cy = 65 + (110 / 2) = 120 + */ +// export const mapTransform: string = "rotate(-2 932.5 120)"; // Example: Rotate -2 degrees around center +export const mapTransform: string | undefined = undefined; // Start with no transform +// Try uncommenting the line above and adjusting the -2, 932.5, and 120 values. +// For example, if it's tilted 5 degrees clockwise, try "rotate(-5 932.5 120)" +// If it's tilted 3 degrees counter-clockwise, try "rotate(3 932.5 120)" diff --git a/src/lib/states/maine.ts b/src/lib/states/maine.ts new file mode 100755 index 0000000..6ba3d84 --- /dev/null +++ b/src/lib/states/maine.ts @@ -0,0 +1,179 @@ +// src/lib/states/maine.ts +export interface NewEnglandState { + id: string; + name: string; + slug: string; + image: string; + pathD: string; + fill: string; + hoverFill: string; +} + +export const maineCounties: NewEnglandState[] = [ + { + id: 'androscoggin', + name: 'Androscoggin County', + slug: 'androscoggin', + image: '/images/counties/maine/androscoggin.png', + pathD: "M 360.15 470.74 368.6 454.57 374.11 446.95 374.95 447.26 380.69 426.63 379.59 420.66 380.39 419.48 379.81 416.23 383.21 413.78 386.8 411.23 393.67 409.99 396.44 423.83 398.94 436.35 398.8 447.56 406.64 450.97 405.06 452.56 403.43 457.64 405.52 458.44 401.09 476.21 401.55 476.59 401.59 476.92 402.56 477.84 402.77 478.24 402.77 478.24 398.32 484.77 384.13 478.45 375.9 469.98 371.26 476.81 360.15 470.74 Z", + fill: 'fill-indigo-500', + hoverFill: 'fill-indigo-700' + }, + { + id: 'aroostook', + name: 'Aroostook County', + slug: 'aroostook', + image: '/images/counties/maine/aroostook.png', + pathD: "M 518.9 149.93 518.71 125.39 432.7 125.18 403.84 125.26 406.32 108.31 423.39 83.21 447.49 48.17 480.18 1 487.64 2.53 496.33 4.87 497.55 5.67 498.49 8.32 498.66 9 497.74 9.71 497.65 9.81 497.88 11.54 497.43 11.74 497.2 11.7 496.49 12.96 496.82 29.66 497.79 31.28 498.44 31.86 503.36 34.77 507.19 36.75 508.67 37.93 511.1 40.65 515.65 38.55 528.1 32.06 541.75 25.38 551.84 23.89 562.67 15.7 565.33 15.07 570.07 15.03 574.27 15.9 575.82 16.71 582.55 21.56 601.47 37.69 601.79 38.17 602.07 40.08 603.36 42.57 607.82 49.05 611.87 52.75 614.79 54.32 617.25 56.19 617.35 56.94 617.36 98.5 617.37 99.52 618.06 166.05 618.15 212.42 619.34 218.06 619.79 227.95 619.81 229.28 618.22 229.84 616.16 231.58 615.72 232.79 614.64 246.62 615.82 248.47 592.64 253.98 557.95 263.08 557.62 263.14 555.83 262.38 555.84 262 555.51 151.82 530.8 151.75 530.8 149.97 518.9 149.93 Z", + fill: 'fill-indigo-500', + hoverFill: 'fill-indigo-700' + }, + { + id: 'cumberland', + name: 'Cumberland County', + slug: 'cumberland', + image: '/images/counties/maine/cumberland.png', + pathD: "M 394.6 508.34 395.24 508.28 396.74 507.2 396.96 507.74 396.46 509.2 395.74 510.2 395.57 510.74 395.63 511.82 394.18 513.67 393.68 513.67 392.84 512.36 392.78 511.13 393.9 509.12 394.6 508.34 Z M 389.67 519.6 389.68 519.63 387.85 522.31 386.36 523.54 386.24 523.54 385.87 522.46 386.91 519.67 388.07 518.24 388.39 518.12 389.67 519.6 Z M 388.24 517.07 388.12 517.59 387.63 518.33 386.22 519.72 385.89 519.84 385.67 519.67 385.59 519.25 386 517.91 386.74 516.69 387.26 516.26 387.78 516.22 388.24 517.07 Z M 390.38 515.78 391.06 515.47 392.08 514.56 393.08 514.69 391.27 517.3 389.96 518.06 389.77 518.02 389.45 516.92 389.66 516.42 390.38 515.78 Z M 397.67 514.79 397.09 515.86 396.52 515.39 394.96 517.02 394.74 516.98 394.75 516.58 394.96 516.2 396.42 513.99 396.89 513.55 397.14 513.38 397.24 513.52 396.75 514.65 397.26 515.02 397.67 514.79 Z M 360.15 470.74 371.26 476.81 375.9 469.98 384.13 478.45 398.32 484.77 402.77 478.24 408.32 486.26 419.71 482.35 416.81 504.58 415.3 505.2 414.11 504.84 413.02 504.17 410.96 506.05 410.51 505.67 410.05 505.81 407.71 508.05 407.08 509.06 406.57 511.01 406.77 511.22 406.75 511.5 405.89 512.44 405.38 512.52 405.55 511.13 405.94 510.36 406.16 509.43 405.88 508.89 402.09 509.74 402.15 508.82 402.76 506.96 403.59 505.58 405.55 503.18 406.21 501.72 406.1 500.87 405.77 499.94 404.99 500.09 403.54 498.55 403.54 497.7 403.82 497 405.38 495.69 405.77 495.15 405.77 494.53 405.1 493.68 404.21 493.76 403.86 494.09 402.98 494.92 400.92 497.78 400.98 498.7 399.86 499.78 399.69 498.94 398.3 498.94 395.79 500.33 392.39 502.64 391.33 504.03 391.33 504.88 389.22 506.73 389.05 506.19 389.55 505.03 389.27 504.57 387.88 505.27 387.43 506.04 387.15 507.74 387.49 508.74 387.43 509.2 385.2 512.13 385.09 512.67 385.43 513.75 385.32 514.14 384.26 514.52 383.87 514.14 381.97 516.99 381.75 517.84 381.86 518.08 382.4 518.48 382.88 518.8 383.15 519.27 383.09 519.44 382.92 519.63 383.01 520.18 384.73 522.83 385.85 524.58 385.29 528.42 385.55 529.25 386.82 529.77 387.22 532.59 386.34 533.58 385.32 533.68 385.03 532.98 383.87 533.12 382.69 534.34 381.01 534.1 379.99 532.92 377.44 534.51 376.62 535.33 373.37 535.84 372.32 536.45 372.26 536.51 359.01 527.09 362.29 522.39 353.47 512.69 342.99 513.33 343.62 503.19 331.2 499.67 336.28 484.53 334.59 482.19 337.65 480.08 327.48 464.76 346.36 452.25 349.9 458.71 349.11 470.75 360.15 470.74 Z", + fill: 'fill-indigo-500', + hoverFill: 'fill-indigo-700' + }, + { + id: 'franklin', + name: 'Franklin County', + slug: 'franklin', + image: '/images/counties/maine/franklin.png', + pathD: "M 412.69 393.41 411.39 403.21 403.12 407.1 401.99 410.26 393.67 409.99 386.8 411.23 383.21 413.78 379.19 407.6 379.21 398.94 353.47 393.43 357.23 391.21 347.25 368.56 332.51 377.09 326.55 305.74 328.77 296.8 328.84 289.69 327.27 287.93 327.12 286.67 329.71 283.34 331.34 282.47 333.97 282.93 334.91 283.84 334.94 285.09 336.26 286.8 337.95 287.99 342.95 289.72 343.72 289.82 345.37 288.94 346.15 285.76 345.29 282.92 343.89 280.76 342.6 280.3 341.43 279.55 337.57 274.87 336.91 272.05 337.06 271.03 339.05 268.61 340.42 266.27 340.25 264.36 343.02 261.23 352.05 251.9 353.37 250.98 366.04 321.49 376.55 318.89 377.96 326.11 390.81 323.6 395.49 348.1 391.79 355.01 393.62 361.13 402.86 359.27 406.41 384.46 412.69 393.41 Z", + fill: 'fill-indigo-500', + hoverFill: 'fill-indigo-700' + }, +{ + id: 'hancock', + name: 'Hancock County', + slug: 'hancock', + image: '/images/counties/maine/hancock.png', + // This long coastal/island-heavy path is Hancock's correct shape + pathD: "M 519.24 383.61 531.18 378.51 535.37 380.94 538.28 375.91 546.7 374.41 554.67 372.95 553.74 367.76 551.54 355.96 549.33 343.58 561.3 341.33 559.29 329.71 571.37 327.43 568.99 315.19 568.2 310.97 591.97 306.76 598.96 346.94 587.19 349.21 597.85 395.92 601.33 419.61 600.9 420 600.9 421.8 599.25 423.41 598.6 423.42 597.49 421.68 597.17 420.79 596.65 420.39 596.2 420.67 595.36 422.08 595.89 422.98 593.96 426.96 593.44 426.9 592.99 427.3 592.95 428.19 593.11 429.2 592.51 430.93 591.46 430.77 590.82 430.27 589.96 428.64 589.78 425.28 588.98 424.83 588.62 425.5 588.34 425.56 587.3 423.66 586.49 421.46 586.45 418.82 586.09 417.75 585.77 415.56 585.81 413.71 586.21 412.58 585.97 411.63 585.45 411.12 582.8 410.64 582 411.03 581.68 411.32 581.64 411.88 580.88 412.27 578.63 412.05 579.11 411.15 579.07 410.3 578.87 409.97 576.79 409.29 575.82 410.02 575.5 410.98 575.78 413.06 575.3 413.17 573.86 412.16 573.09 410.53 572.21 410.42 571.61 412.1 571.37 413.68 570.37 414.8 568.72 415.08 568.64 416.6 569.04 417.27 571.57 416.26 573.58 417.22 573.86 417.67 573.94 418.9 573.33 419.3 573.33 419.69 576.62 422.95 577.19 422.61 577.77 422.69 578.4 423.5 579.59 425.8 580.53 429.21 580.63 431.25 578.88 434.15 574.91 436.56 570.93 436.52 569.56 437.2 568.72 438.2 568.68 439.49 568.78 439.98 569 440.15 569.43 442.03 566.87 445.04 564.78 445.33 564.43 444.45 562.3 443.33 561.88 442.61 561.1 442.04 559.96 442.11 558.87 441.42 557.11 438.43 556.96 437.11 556.5 435.69 556.03 435.22 556.04 433.36 557.85 432.07 558.13 431.62 558.05 431.11 556.93 430.21 556.94 430 558.05 427.52 558.41 427.47 559.32 426.49 559.42 425.74 559.18 424.86 562.09 422.91 562.46 423.15 562.79 423.05 563 422.7 562.9 421.29 561.63 418.5 560.99 417.65 560.17 417.53 559.86 418.01 559.7 419.25 557.42 421.94 556.91 422.15 556.33 422.1 555.75 421.47 555.88 418.11 556.16 416.43 555.24 415.24 554.4 415.05 553.73 415.31 553.26 415.87 552.89 416.77 553.37 420.05 552.86 421.93 552.85 422.86 553.15 423.59 553.15 424.55 552.67 424.72 551.51 424.6 551.03 423.26 551.27 422.02 552.03 421.12 551.31 417.3 550.83 417.08 549.94 417.7 549.46 419.77 548.9 420.11 548.04 419.89 546.57 421.8 546.13 421.96 544.17 421.18 543.6 421.29 543.2 421.8 543.08 422.41 543.24 423.65 543.77 425.11 544.65 425.45 545.09 427.69 544.28 428.86 543.39 430.63 543.03 432.69 543.1 433.3 543.31 433.97 544.06 434.93 545.74 435.05 546.42 436.32 546.35 436.86 546.7 438.23 547.57 439.71 547.54 440.35 546.58 441.77 546.74 442.88 547.19 443.61 547.01 444.71 546.13 444.47 544.58 443.51 544.54 443.27 543.44 441.97 542.48 441.35 539.55 438.42 538.38 438.32 537.38 437.65 537.24 437.12 537 436.88 531.94 435.15 527.86 432.16 527.16 431.25 525.9 430.88 524.39 431.09 523.99 431.43 523.48 432.3 521.23 433.99 518.15 433.42 518.04 432.83 518.32 430.42 518.72 428.41 519.07 427.94 519.34 426.73 518.97 425.01 518.67 420.48 519.29 417.91 520.6 417.01 522.1 413.29 522.31 411.78 521.12 412.11 516.76 393.38 516.27 391.47 518.61 386.27 519.63 385.4 519.24 383.61 Z", + fill: 'fill-indigo-500', + hoverFill: 'fill-indigo-700' + }, + { + id: 'kennebec', + name: 'Kennebec County', + slug: 'kennebec', + image: '/images/counties/maine/kennebec.png', + pathD: "M 456.54 382.38 456.17 384.57 459.29 385.14 457.61 387.4 457.61 388.55 464.06 389.44 463.78 414.03 460.01 413.32 459.05 413.13 453.23 429.31 451.81 437.62 451.14 438.32 450.55 438.75 450.51 439.4 449.81 440.02 449.31 440.25 439.48 437.76 438.02 444.71 438.84 458.32 438.86 458.73 437.94 458.51 429.16 456.47 428.64 454.62 419.91 452.67 415.81 460.69 405.52 458.44 403.43 457.64 405.06 452.56 406.64 450.97 398.8 447.56 398.94 436.35 396.44 423.83 393.67 409.99 401.99 410.26 403.12 407.1 411.39 403.21 412.69 393.41 425.85 397.91 427.43 393.76 430.49 394.52 430.7 395.1 443.73 397.92 446.28 391.24 441.56 385.2 441.13 381.6 456.54 382.38 Z", + fill: 'fill-indigo-500', + hoverFill: 'fill-indigo-700' + }, +{ + id: 'knox', + name: 'Knox County', + slug: 'knox', + image: '/images/counties/maine/knox.png', + // Knox is mostly coastal islands; your original fragmented paths appear correct for the main/island groups + pathD: "M 549.48 458.49 550.11 459.45 550.24 460.4 549.15 461.74 547.8 461.25 547.64 459.95 548.36 458.37 548.77 458.08 549.48 458.49 Z M 562.97 458.37 563.48 457.99 564.08 458.01 565.61 460.3 565.58 460.7 564.92 461.51 562.32 461.51 561.23 460.08 561.23 459.88 561.35 459.52 562.29 458.5 562.97 458.37 Z M 553.9 449.72 555.38 449.96 556.66 449.62 557.42 450.11 558.21 451.54 560.43 454.39 559.31 456.29 556.36 459.14 555.31 459.55 554.34 458.3 554.45 457.25 553.56 455.68 551.35 455.34 550.9 455.52 549.75 455.47 549.23 454.73 549.35 453.71 549.86 453.39 551.88 450.8 553.9 449.72 Z M 532.15 437.81 532.66 437.74 533.35 438.18 534.25 439.23 537.62 440.96 538.76 442.41 539.31 444.28 538.65 447.36 537.48 448.7 537.42 449.08 538 449.8 538.1 450.19 538.07 450.91 535.76 454.03 534.87 454.56 533.18 454.84 533.04 456.57 532.7 456.76 532.04 456.62 531.6 455.42 531.05 454.56 530.22 453.93 529.39 453.88 529.05 453.64 528.74 453.36 528.36 452.49 528.5 450.62 528.88 449.56 528.95 447.88 528.29 446.73 528.12 445.77 528.12 445.24 528.53 444.57 529.19 444.52 530.25 443.85 530.87 441.88 532.18 440.1 532.46 439.19 532.46 438.32 532.15 437.81 Z M 563.27 448.51 565.37 447.41 566.23 447.62 567.02 448.35 567.14 448.76 566.78 448.84 566.53 448.51 565.43 449.43 564.82 452.14 564.02 452.46 561.01 450.49 561.74 449.32 562.39 448.71 563.27 448.51 Z M 552.03 445.75 553.24 446.72 553.84 448.16 553.81 448.45 553.33 448.69 550.91 448 550.65 447.12 551.08 444.78 551.29 444.57 552.27 444.61 552.44 445.18 552.03 445.75 Z M 521.51 443.34 523.64 445.35 523.71 446.6 522.66 447.97 521.72 447.86 520.63 447.23 519.88 446.71 519.28 446.5 518.56 446.18 517.93 446.13 517.14 444.77 516.99 443.51 517.55 442.93 518.11 442.67 518.3 442.71 521.51 443.34 Z M 574.63 439.55 576.71 439.96 577.03 440.77 576.92 440.99 576.07 440.75 575.1 440.91 574.56 441.26 574.26 441.5 574.14 442.04 574.21 443.09 573.43 443.66 571.74 443.85 571 443.44 570.76 442.94 570.97 440.56 572.17 440.28 572.93 440.67 573.66 440.67 574.18 440.33 574.63 439.55 Z M 549.56 425.73 551.46 432.43 550.42 433.21 547.98 431.73 546.53 430.55 546.7 429.08 547.46 427.24 547.34 426.01 547.66 424.21 548.22 423.7 548.7 423.65 549.3 424.04 549.56 425.73 Z", + fill: 'fill-indigo-500', + hoverFill: 'fill-indigo-700' + }, + { + id: 'lincoln', + name: 'Lincoln County', + slug: 'lincoln', + image: '/images/counties/maine/lincoln.png', + pathD: "M 472.2 505.01 472.31 504.84 472.67 504.91 472.92 505.23 472.88 505.7 471.59 507.27 470.8 507.38 470.71 506.97 470.94 506.07 471.66 505.15 472.2 505.01 Z M 460.73 484.46 461.17 485.25 461.28 485.94 461.17 486.23 459.76 487.02 459.49 486.99 459.39 486.12 460.17 481.74 460.55 481.86 461.38 483.21 460.73 484.46 Z M 451.14 438.32 470.9 452 474.69 472.01 470.87 479 469.96 478.42 467.99 478.36 466.58 479.69 465.74 479.71 464.54 479.75 463.55 478.75 461.85 478.03 460.65 480.6 460.37 479.72 459.91 479.41 459.42 479.76 458.52 482.72 457.7 487.85 455.42 490.9 455.15 492.38 453.53 496.55 452.42 497.39 452.29 496.61 452.57 495.61 451.9 492.46 451.48 491.52 449.64 490.72 449.11 490.94 448.97 491.21 449 491.92 449.54 493.43 448.81 496.06 448.28 496.15 447.31 495.65 446.89 495.71 446.63 495.98 446.33 498.45 445.37 499.11 443.88 499.75 443.71 499.57 443.84 498.12 444.42 498.16 445.01 497.45 445.32 494.74 444.79 493.74 443.84 493.86 443.02 495.57 443.03 496.58 442.84 497.35 442.26 497.99 441.39 496.64 441.44 495.79 440.94 495.46 439.52 496.73 439.2 499.26 439.42 501.04 439.18 502.73 438.07 502.73 436.11 499.38 436.1 498.82 435.44 498.32 434.98 498.22 434.93 498.24 434.99 497.21 435.71 495.74 435.48 493.96 430.55 489.18 434.71 474.12 423.87 471.55 429.16 456.47 437.94 458.51 438.86 458.73 438.84 458.32 438.02 444.71 439.48 437.76 449.31 440.25 449.81 440.02 450.51 439.4 450.55 438.75 451.14 438.32 Z", + fill: 'fill-indigo-500', + hoverFill: 'fill-indigo-700' + }, + { + id: 'oxford', + name: 'Oxford County', + slug: 'oxford', + image: '/images/counties/maine/oxford.png', + pathD: "M 331.2 499.67 311.5 502.58 311.5 502.54 311.21 490.11 311.12 486.4 310.32 462.65 310.32 462.61 309.61 440.59 309.62 440.54 309.47 437.07 309.16 429.58 307.67 393.48 306.86 373.95 304.71 338.32 303.22 310.62 302.39 299.6 307.53 298.6 309.09 298.04 309.59 297.73 310.22 296.51 309.96 296.03 311.38 295.38 315.15 295.62 318.3 298.69 318.85 300.75 318.7 301.3 319.25 304.48 320.31 308.19 321.44 309.16 324.12 309.94 325.47 309.22 325.79 308.76 326.55 305.74 332.51 377.09 347.25 368.56 357.23 391.21 353.47 393.43 379.21 398.94 379.19 407.6 383.21 413.78 379.81 416.23 380.39 419.48 379.59 420.66 380.69 426.63 374.95 447.26 374.11 446.95 368.6 454.57 360.15 470.74 349.11 470.75 349.9 458.71 346.36 452.25 327.48 464.76 337.65 480.08 334.59 482.19 336.28 484.53 331.2 499.67 Z", + fill: 'fill-indigo-500', + hoverFill: 'fill-indigo-700' + }, + { + id: 'penobscot', + name: 'Penobscot County', + slug: 'penobscot', + image: '/images/counties/maine/penobscot.png', + pathD: "M 941.87 85.25 L 937.16 84.78 L 933.14 83.71 L 932.63 87.02 L 931.16 86.72 L 930.24 93.47 L 929.05 100.35 L 931.99 100.99 L 940.91 103.03 L 940.33 106.22 L 942.82 106.81 L 942.23 110.25 L 940.89 117.93 L 938.34 117.35 L 938.48 123.16 L 941.61 124.04 L 941.79 151.59 L 944.75 151.58 L 944.75 151.08 L 950.88 151.06 L 950.97 120.02 L 950.97 119.92 L 951.41 119.70 L 951.49 119.72 L 960.11 122.30 L 962.68 107.88 L 959.94 107.29 L 954.04 106.08 L 954.23 104.88 L 954.83 101.38 L 951.82 100.73 L 952.32 97.40 L 949.35 96.75 L 949.90 93.20 L 950.45 89.81 L 950.68 88.32 L 948.70 87.90 L 946.60 87.46 L 945.88 86.02 L 944.84 86.71 Z", + fill: 'fill-indigo-500', + hoverFill: 'fill-indigo-700' + }, + { + id: 'piscataquis', + name: 'Piscataquis County', + slug: 'piscataquis', + image: '/images/counties/maine/piscataquis.png', + pathD: "M 467.64 331.04 453.85 333.7 442.28 339.5 427.08 267.25 435.5 253.28 422.02 240.46 426.61 234.09 431.61 238.1 434.17 224.66 439.81 223.4 436.29 206.84 431.99 207.77 431.63 150.17 432.7 125.18 518.71 125.39 518.9 149.93 518.17 247.84 505.56 250.93 505.01 271.4 515.28 269.36 520.67 296.35 523.04 308.42 513.02 310.51 515.35 321.65 479.46 328.78 467.64 331.04 Z", + fill: 'fill-indigo-500', + hoverFill: 'fill-indigo-700' + }, + { + id: 'sagadahoc', + name: 'Sagadahoc County', + slug: 'sagadahoc', + image: '/images/counties/maine/sagadahoc.png', + pathD: "M 405.52 458.44 415.81 460.69 419.91 452.67 428.64 454.62 429.16 456.47 423.87 471.55 434.71 474.12 430.55 489.18 435.48 493.96 435.71 495.74 434.99 497.21 434.93 498.24 434.16 498.49 433.3 500.18 433.02 501.4 433.09 502.55 432.84 503.3 429.67 507.37 428.83 507.23 427.06 507.45 426.84 507.66 426.86 508.01 427.22 508.55 427.23 508.87 421.79 511.98 421.46 514.09 420.26 514.3 419.9 514.15 419.62 511.61 419.85 510.45 419.53 509.41 418.6 509.13 419.22 506.97 418.5 504.76 417.13 504.45 416.81 504.58 419.71 482.35 408.32 486.26 402.77 478.24 402.56 477.84 401.59 476.92 401.55 476.59 401.09 476.21 405.52 458.44 Z", + fill: 'fill-indigo-500', + hoverFill: 'fill-indigo-700' + }, + { + id: 'somerset', + name: 'Somerset County', + slug: 'somerset', + image: '/images/counties/maine/somerset.png', + pathD: "M 412.69 393.41 406.41 384.46 402.86 359.27 393.62 361.13 391.79 355.01 395.49 348.1 390.81 323.6 377.96 326.11 376.55 318.89 366.04 321.49 353.37 250.98 361.13 245.54 362.88 245.15 368.07 237.97 367.07 235.67 366.12 232.81 368.15 231.69 367.98 231.5 368.07 231.02 368.96 229.45 370.96 227.26 373.31 224.9 376.62 223.98 378.88 222.18 380.94 220.01 381.79 217.93 383.08 212.33 381.93 210.81 380.67 209.72 376.21 208.5 376.09 202.33 376.35 195.7 378.34 191.6 378.84 190.99 381.91 189.96 383.3 184.28 379.47 180.47 378.24 178.97 378.06 178.18 386.22 158.86 388.07 156.27 389.34 155.1 393.29 153.65 400.65 147.04 403.84 125.26 432.7 125.18 431.63 150.17 431.99 207.77 436.29 206.84 439.81 223.4 434.17 224.66 431.61 238.1 426.61 234.09 422.02 240.46 435.5 253.28 427.08 267.25 442.28 339.5 453.85 333.7 467.64 331.04 472.43 355.03 476.13 378.48 463.55 375.43 456.54 382.38 441.13 381.6 441.56 385.2 446.28 391.24 443.73 397.92 430.7 395.1 430.49 394.52 427.43 393.76 425.85 397.91 412.69 393.41 Z", + fill: 'fill-indigo-500', + hoverFill: 'fill-indigo-700' + }, + { + id: 'washington', + name: 'Washington County', + slug: 'washington', + image: '/images/counties/maine/washington.png', + pathD: "M 633.58 405.63 633.99 405.33 636.64 406.11 637.18 406.48 636.49 408.17 636.36 409.06 637.35 409.88 639.04 412.02 638.41 414.24 638.16 414.52 637.93 414.75 636.58 415.01 636.16 413.83 635 408 634.78 407.8 634.04 407.8 633.63 407.48 633.58 405.63 Z M 615.82 248.47 616.03 248.79 620.72 250.17 631.09 257.58 639.16 260.13 643.25 261.09 645.08 261.21 645.89 260.6 646.13 260.17 645.88 259.58 646 259.27 647.25 258.87 649.29 258.8 649.84 259.05 652.15 262.29 652.32 263.24 652.59 266.19 652.13 272.69 649.93 271.64 648.52 271.93 644.66 274.65 647.57 283.26 648.82 284.04 651.72 287.67 652.47 289.48 651.8 294.3 648.84 300.15 648.29 300.69 646.39 301.48 646.05 302.86 648.51 307.91 654.09 318.55 658.95 323.4 659.84 323.9 660.33 323.98 663.62 321.37 663.9 319.14 665.04 315.58 665.71 314.98 666.91 315.1 677.41 318.93 680.5 323.09 682.08 325.78 684.14 331.68 682.7 332.08 681.57 333.31 683.29 334.89 684.98 336.97 685.66 338.38 685.87 339.85 686.3 340.84 687.6 342.77 689.16 348.35 689.62 349.1 692.62 351.94 693.69 352.08 694.31 352.79 694.39 354.04 694.17 354.87 693.85 354.96 693.74 356.84 694.64 359.5 694.91 360.29 693.49 361.34 693.15 361.95 694.13 365.19 695.21 365.88 696.03 365.4 697.4 365.26 697.61 365.62 697.55 366.01 696.54 366.99 695.69 367.2 695.09 366.85 694.76 366.98 693.84 368.13 693.29 369.17 690.91 371.82 690.32 372.25 688.68 372.67 687.55 371.82 686.87 372.07 686.77 373.59 685.8 375.78 684.84 376.06 683.98 375.69 683.36 375.87 682.88 379.08 680.51 382.05 679.51 382.26 678.67 383.57 677.99 385.54 678.05 385.72 676.58 386.52 675.44 386.31 674.98 386.45 674.46 387.41 674.52 388.45 674.71 388.75 672.46 389.6 670.43 389.87 669.19 389.27 668.8 389.38 666.62 391.33 666.34 392.46 666.72 393.41 666.14 393.96 664.77 394.97 663.91 395.23 662.72 395.11 661.95 393.61 661.99 393.19 663.12 393.09 664.75 390.26 664.86 388.36 664.29 387.56 663.22 386.9 663.39 382.6 664.13 381.87 664.22 380.66 663.33 380.43 659.58 381.5 658.79 381.56 656.81 383.87 656.39 385.53 656.59 386.07 657.07 386.41 657.71 387.82 658.11 390.59 657.62 391.55 656.73 392.21 655.87 391.24 655.66 391.3 654.98 393.13 654.68 394.51 654.06 395.64 653.46 395.28 652.78 394.4 652.62 393.81 651.87 393.64 650.41 394.09 650.05 394.43 649.95 394.82 649.06 395.13 645.75 392.46 645.63 390.99 644.47 389.92 642.85 390.43 642.73 391.3 642.08 391.92 641.78 391.98 641.18 391.33 640.88 391.3 640.14 391.92 640.02 392.23 637.85 400.15 638.35 400.67 639.07 402.99 638.51 404.11 630.83 404.88 630.39 404.82 630.03 403.47 629.67 403.24 627.26 403.3 626.26 403.75 625.65 404.54 626.01 406.17 625.57 407.63 624.55 408.92 623.72 408.48 622.66 408.78 621.76 408.63 621.82 407.45 622.08 407.08 621.8 404.73 620.76 402.43 620.28 402.03 619.47 401.81 618.83 401.92 618.31 402.43 618.07 403.72 618.11 405.52 616.61 405.51 616.1 405.07 615.82 404.28 615.82 403.33 615.5 402.37 613.5 400.57 612.53 400.4 612.09 400.74 611.97 401.36 612.21 402.54 610.93 405.07 611.21 408.62 611.45 409.29 611.41 410.3 611.03 411.14 610.52 411.29 609.96 412.06 609.77 412.93 609.76 414.06 611.4 417.83 611.41 418.42 611.08 419.07 609.77 418.37 608.84 416.91 608 417.25 608 418.14 607.55 420.38 606.83 422.46 605.67 419.1 605.51 417.64 604.75 417.25 604.27 417.41 603.87 417.81 604.15 418.82 603.78 420.09 603.3 420.17 602.26 419.55 601.46 419.49 601.33 419.61 597.85 395.92 587.19 349.21 598.96 346.94 591.97 306.76 602.99 304.68 592.64 253.98 615.82 248.47 Z", + fill: 'fill-indigo-500', + hoverFill: 'fill-indigo-700' + }, + { + id: 'waldo', + name: 'Waldo County', + slug: 'waldo', + image: '/images/counties/maine/waldo.png', + pathD: "M 938.86 69.64 L 939.42 70.76 L 939.42 71.75 L 939.60 72.89 L 939.79 73.42 L 940.38 73.73 L 940.62 73.53 L 940.81 72.87 L 940.72 72.51 L 940.55 72.11 L 940.28 71.85 L 940.14 71.86 L 940.04 71.72 L 939.96 71.23 L 940.17 70.49 L 939.89 69.75 L 939.77 69.60 L 939.47 68.16 L 939.25 67.78 L 938.78 67.31 L 938.64 67.23 L 938.76 67.54 L 938.56 68.20 L 938.46 68.34 L 938.31 68.43 L 938.28 68.51 L 938.32 68.80 L 938.60 69.30 Z M 937.16 84.78 L 941.87 85.25 L 941.97 84.73 L 941.72 84.48 L 941.14 82.98 L 941.26 82.43 L 942.34 77.02 L 942.01 76.91 L 941.56 76.66 L 940.85 75.99 L 940.34 75.34 L 940.20 75.44 L 940.09 75.72 L 940.05 75.93 L 940.06 76.00 L 939.94 76.21 L 939.85 76.27 L 939.22 76.11 L 939.12 75.75 L 938.77 75.38 L 937.92 75.27 L 937.72 74.83 L 937.87 74.13 L 938.00 73.72 L 938.28 73.52 L 938.42 73.28 L 938.73 72.54 L 938.58 71.31 L 938.48 70.93 L 938.00 70.23 L 937.41 70.17 L 937.38 69.37 L 937.10 68.71 L 936.82 68.40 L 934.61 68.66 L 931.11 72.88 L 929.27 70.70 L 928.13 72.04 L 925.47 72.04 L 926.92 76.72 L 927.16 76.67 L 928.10 76.46 L 928.16 83.56 L 926.56 83.82 L 926.56 84.15 L 926.98 84.80 L 926.20 84.97 L 926.30 85.60 L 928.04 87.60 L 931.16 86.72 L 932.63 87.02 L 933.14 83.71 Z", + fill: 'fill-indigo-500', + hoverFill: 'fill-indigo-700' + }, + { + id: 'york', + name: 'York County', + slug: 'york', + image: '/images/counties/maine/york.png', + pathD: "M 311.5 502.58 331.2 499.67 343.62 503.19 342.99 513.33 353.47 512.69 362.29 522.39 359.01 527.09 372.26 536.51 371.51 537.33 369.8 540.23 369.25 541.7 369.18 542.88 369.44 545.17 369.7 545.89 370.46 547.09 372.62 548.81 371.44 549.2 370.62 549.85 369.24 551.86 369.34 552.64 368.68 554 367.8 554.35 367.65 554.18 367.19 554.22 365.77 554.9 365.16 555.76 365.47 557.02 365.42 557.51 363.75 560.07 362 561.81 361.5 562.2 360.83 561.71 359.65 561.39 356.56 561.7 354.88 562.66 354.74 562.81 353.1 564.61 352.25 566.09 350.1 571.41 349.27 574.15 349.55 575.65 351 577.75 350.92 578.3 349.85 580.63 346.87 585.38 345.39 590.1 345.41 590.81 345.02 591.86 343.51 593.84 343.4 593.98 343.31 594.61 342.38 596.83 341.7 597.6 338.75 599 333.74 596.33 331.09 593.85 327.7 590.67 326.88 589.91 326.34 587.57 326.78 583.19 326.86 582.36 328.02 576.02 327.87 575.71 327.86 575.64 327.37 575.34 327.34 575.32 327.17 575.24 327.02 575.19 326.89 575.16 326.35 574.99 325.77 574 325.82 573.89 323.52 572.07 319.07 566.61 318.82 566.4 318.41 565.16 317.07 563.6 315 563.02 313.58 561.74 311.95 557.48 311.95 557.39 311.62 555.46 311.71 552.47 313.85 544.7 313.84 544.7 313.92 544.3 314.78 539.88 314.03 536.65 314.37 536.21 314.72 535.77 314.72 535.81 314.91 534.22 313.06 531.91 312.36 518.32 312.29 516.87 312.18 514.65 312.17 514.51 312.15 513.21 312.16 512.79 311.5 502.58 Z", + fill: 'fill-indigo-500', + hoverFill: 'fill-indigo-700' + } +]; + +export const mapViewBox: string = "890 20 95 155"; + +/** + * SVG transform string to apply to the group of states to straighten the map. + * Format: "rotate(angle cx cy)" + * - angle: degrees to rotate (negative for counter-clockwise) + * - cx: x-coordinate of the center of rotation + * - cy: y-coordinate of the center of rotation + * + * You'll need to experiment with these values. + * The approximate center of your current viewBox (890 65 85 110) is: + * cx = 890 + (85 / 2) = 932.5 + * cy = 65 + (110 / 2) = 120 + */ +// export const mapTransform: string = "rotate(-2 932.5 120)"; // Example: Rotate -2 degrees around center +export const mapTransform: string | undefined = undefined; // Start with no transform +// Try uncommenting the line above and adjusting the -2, 932.5, and 120 values. +// For example, if it's tilted 5 degrees clockwise, try "rotate(-5 932.5 120)" +// If it's tilted 3 degrees counter-clockwise, try "rotate(3 932.5 120)" diff --git a/src/lib/states/massachusetts.ts b/src/lib/states/massachusetts.ts new file mode 100755 index 0000000..ed69134 --- /dev/null +++ b/src/lib/states/massachusetts.ts @@ -0,0 +1,140 @@ +// src/lib/states/massachusetts.ts +export interface NewEnglandState { + id: string; + name: string; + slug: string; + image: string; + pathD: string; + fill: string; + hoverFill: string; +} + +export const massachusettsCounties: NewEnglandState[] = [ + { + id: 'barnstable', + name: 'Barnstable County', + slug: 'barnstable', + image: '/images/counties/ma.png', // Replace with your actual image path + pathD: "M 782.38 500.18 781.64 499.31 781 498.01 779.18 498.67 777.31 498.94 776.5 498.57 775.57 495.76 785.3 489.38 786.48 487.02 786.19 484.3 786.58 481.54 787.96 479.85 789.59 478.94 790.07 477.16 789.78 475.1 786.98 467.12 787.1 465.33 790.33 460.13 788.91 456.92 786.93 455.37 787.52 453.08 790.68 451.2 790.96 449.34 788.63 440.74 787.83 439.84 784.54 439.54 788.72 435.2 794.25 433.44 794.73 430.3 793.95 428.28 789.54 426.32 795.28 415.3 792.33 410.3 810.45 401.67 817.98 392.95 818.92 394.59 819.06 394.83 819.23 395.14 821.27 397.63 823.05 399.79 823.28 400.07 823.34 400.14 823.47 400.27 823.54 400.34 823.69 400.48 824.09 400.88 824.13 400.91 824.14 400.93 829.63 406.3 829.91 406.51 829.94 406.53 832.47 408.39 832.83 408.66 835.01 410.26 835.1 410.32 835.21 410.4 835.56 410.66 835.57 410.67 835.62 410.7 835.69 410.75 839.07 412.07 851.26 416.82 851.59 416.95 851.7 416.97 861.15 418.88 861.59 418.97 861.62 418.98 877.01 420.07 877.76 420.12 877.93 420.13 884.22 420.58 884.31 420.59 884.36 420.62 885.02 421.08 888.06 423.19 888.5 423.5 888.56 423.53 888.57 423.56 888.83 424.14 889.34 425.26 891.62 427.82 891.67 427.87 891.82 427.88 892.26 427.9 892.86 427.93 893.62 427.11 894.62 426.02 894.86 425.76 895.15 425.44 895.9 424.63 896.05 424.47 896.14 424.37 898.73 421.55 899.37 420.85 899.42 420.8 901.84 419.2 901.99 419.1 902.22 418.95 902.34 418.87 903.19 418.31 904.31 417.57 904.48 417.46 909.33 415.27 909.47 415.21 910.64 414.69 911.7 414.21 911.74 414.22 913.63 414.61 915.12 414.15 919.81 412.73 923.93 411.48 924.03 411.45 924.55 411.29 924.86 411.32 926.04 411.41 927.91 411.57 929.17 411.68 929.25 411.69 929.77 411.73 929.82 411.73 931.45 411.08 931.68 410.99 933.22 410.37 936.36 409.12 936.6 409.03 936.79 408.95 939.4 408.26 940.62 407.93 944.46 406.91 945.12 406.74 945.34 406.68 946.32 406.2 953.4 402.71 953.54 402.65 953.71 402.56 956 401.44 956.02 401.41 956.44 400.94 956.52 400.86 956.63 400.73 959.98 397.03 960.27 396.71 960.38 396.59 961.63 393.79 961.45 382.84 960.23 369.18 962.61 365.45 961.87 364.23 959.39 363.74 956.11 361.15 955.78 356.49 954.44 350.17 950.54 349.85 947.99 350.82 944.98 356.5 944.96 360.85 945.06 365.17 945.4 368.35 944.89 369.04 944.47 368.76 943.57 366.88 942.99 360.8 942.73 346.74 941.81 329.77 940.1 320.15 938.54 315.49 936.92 312.62 933.56 308.71 929.53 305.79 922.97 302.19 922.73 302.06 920.81 301.89 916.94 302.86 914.6 304.07 912.36 306.23 910.3 310.21 910.06 312.14 910.67 314.52 912.5 316.8 912.39 317.3 911.27 317.26 909.7 316.39 906.65 313.38 903.77 307.9 899.85 303.6 898.34 302.59 897.08 302.56 896.59 301.41 898.55 298.1 901.91 296.02 906.95 294.82 911.69 294.66 919.53 296.01 921.14 296.55 931.43 300 940.41 304.7 946.9 309.89 953.29 317.66 953.64 318.09 954.3 319.24 954.59 319.76 954.73 319.99 958.28 326.18 958.86 327.2 958.92 327.31 959.44 328.21 959.46 328.24 959.83 329.02 961.12 331.72 961.19 331.87 961.22 331.94 961.42 332.35 961.51 332.54 966.38 342.71 966.41 342.77 966.42 342.82 971.12 356.49 977.39 380.53 979.91 393.47 981.87 418.08 981.96 433.69 981.96 433.8 981.97 435.31 981.98 435.76 981.98 435.96 981.85 436.7 981.68 437.76 981.66 437.88 981.27 440.21 980.67 443.78 980.66 443.8 980.4 444.39 978.08 449.67 977.88 450.12 976.77 452.65 975.81 454.3 975.61 454.36 975.36 454.42 975.07 454.5 974.28 454.7 973.9 454.8 972.56 456.83 971.31 459.09 968.99 467.68 967.3 475.55 965.83 485.3 965.76 485.42 963.59 488.67 963.18 489.28 962.91 489.37 961.65 489.8 961.55 489.83 961.43 489.82 959.64 489.55 959.56 489.54 959.5 489.47 958.77 488.6 958.19 486.72 958.61 485.9 959.54 486 959.79 486.03 960.28 485.37 962.25 482.7 962.32 482.51 962.41 482.25 962.49 482.02 964.18 477.34 964.89 473.14 966.11 465.91 966.13 465.84 967.25 462.4 967.93 460.32 968.72 457.9 968.88 457.4 968.95 457.19 969.24 456.32 969.33 456.04 969.92 454.22 969.92 454.19 969.89 452.08 969.2 449.64 969.17 449.62 965.18 446.13 965.17 446.13 965.16 446.12 965.15 446.11 965.14 446.1 963.68 444.83 963.64 444.8 963.6 444.77 961.93 443.85 961.85 443.81 960.82 443.24 960.77 443.21 960.73 443.21 958.83 443.07 958.41 443.23 957.02 443.75 954.82 444.57 954.77 444.59 954.76 444.59 952.66 444.91 952.63 444.91 952.49 444.93 947.71 445.64 938.63 446.37 930.37 449.02 930.1 449.11 929.98 449.15 929.65 449.26 929.62 449.26 926.39 450.3 924.92 450.77 924.91 450.78 924.84 450.8 924.73 450.84 924.68 450.84 924.65 450.84 924.26 450.84 923.38 450.84 923.07 450.83 922.69 450.83 919.95 450.83 911.21 452.7 896.46 458.74 893.67 461.55 893.88 462.68 892.76 465.09 891.19 465.64 890.61 465.07 890.04 462.6 890.19 459.73 888.74 457.14 886.91 456.35 884.4 456.32 876.07 458.01 873.82 456.55 871.63 455.91 867.98 456.51 865.63 457.81 864.41 459.38 864.45 460.48 863.07 463.28 860.57 464.91 854.8 466.7 854.64 466.68 852.65 466.36 851.2 466.49 844.92 467.08 844.75 467.47 844.03 469.08 843.58 470.09 843.01 471.38 842.76 471.95 842.42 472.51 841.39 474.24 839.86 476.79 839.51 477.38 838.5 479.06 838.45 479.15 838.27 479.36 838.2 479.44 838.19 479.45 835.36 482.83 835.21 483 834.43 483.93 834.42 483.94 834.41 483.94 832.51 485.11 832.02 485.4 831.91 485.47 831.58 485.6 829.84 486.26 822.1 487.36 822.01 487.37 819.51 487.43 812.01 487.6 811.95 487.6 811.94 487.6 811.62 487.64 811.53 487.66 808.09 488.13 804.22 488.67 804.2 488.68 804.11 488.69 804.09 488.69 803.91 488.72 802.02 488.98 798.11 489.52 798.1 489.52 797.6 489.67 797.22 489.77 796.6 489.95 796.46 489.98 796.35 490.02 796.28 490.04 792.05 491.22 792.02 491.25 792 491.26 789.35 493.34 787.62 496.29 787.6 496.32 787.21 496.98 787.08 497.2 786.53 498.14 786.51 498.15 783.9 499.94 782.38 500.18 Z", + fill: 'fill-green-500', + hoverFill: 'fill-green-700' + }, + { + id: 'berkshire', + name: 'Berkshire County', + slug: 'berkshire', + image: '/images/counties/ma.png', + pathD: "M 154.83 210.94 154.35 233.36 152.7 237.97 135.68 270.75 140.51 310.07 120.58 309.31 92.97 308.25 92.63 308.23 75.93 307.5 75.57 307.49 23.63 306.52 21.06 306.51 18.02 293.24 44.28 196.71 59.93 138.98 72.18 94.13 83.51 52.63 116.48 53.52 148.68 54.39 168.38 67.6 168.03 91.07 161.48 122.19 154.83 210.94 Z", + fill: 'fill-green-500', + hoverFill: 'fill-green-700' + }, + { + id: 'bristol', + name: 'Bristol County', + slug: 'bristol', + image: '/images/counties/ma.png', + pathD: "M 590.67 329.95 595.14 329.89 615.77 319.31 615.77 319.28 647.97 302.35 656.06 298.14 656.06 298.12 671.8 289.82 678.66 329.93 680.06 337.87 693.47 350.01 683.54 390.9 714.45 400.03 735.62 458.74 735.52 458.68 735.35 458.56 733.1 459.31 732.43 460.25 732.39 460.3 732.64 462.36 732.65 462.41 732.85 464.11 733.73 471.33 733.18 472.88 733.11 473.08 733.09 473.13 732.94 473.57 732.91 473.56 731.83 473.43 730.32 468.76 730.28 468.64 730.15 468.23 728.8 464.05 728.69 463.72 728.84 460.84 728.5 459.78 727.68 458.98 725.96 458.28 723.64 457.32 723.22 457.15 723.21 457.16 723.12 457.23 719.1 460.28 718.76 460.54 716.76 462.06 719.1 465.27 720.32 471.34 719.95 471.7 717.41 470.62 715.85 466.31 714.91 465.11 713 464.95 712.31 465.59 712.24 468.84 712.94 471.14 711.88 474.69 710.09 477.13 709.12 475.83 707.69 475.81 707.18 476.55 707.58 478.48 710.13 481.51 711.82 490.53 709.07 490.55 698.98 494.04 697.87 497.57 692.51 500.7 688.18 501.8 687.06 502.71 683.83 505.32 677.66 502.84 670.32 501.64 660.92 505.9 657.48 458.37 657.41 457.42 657.36 456.72 657.18 454.16 657.18 454.14 657.12 447.2 656.99 447.2 654.11 446.38 651.93 445.91 645.97 444.46 645.97 444.32 646 443.28 644.57 442.88 641.91 442.23 641.91 442.26 641.05 442.05 640.71 441.95 632.86 429.18 623.01 414.09 607.82 405.5 605.1 403.91 602.03 394.52 601.95 385.31 602.49 384.7 602.03 363.11 602.03 363.04 598.42 361.92 597.88 361.99 595.78 362.31 595.19 362.39 595 362.42 593.49 362.68 592.74 362.75 591.98 362.89 590.61 352.51 590.64 352.44 590.69 337.27 590.66 336.58 590.67 329.95 Z", + fill: 'fill-green-500', + hoverFill: 'fill-green-700' + }, + { + id: 'dukes', + name: 'Dukes County', + slug: 'dukes', + image: '/images/counties/ma.png', + pathD: "M 775.57 495.76 776.5 498.57 777.31 498.94 779.18 498.67 781 498.01 781.64 499.31 782.38 500.18 780.8 500.44 772.78 506.18 764.93 509.89 758.78 515.79 758.96 517.21 757.78 519.02 749.86 524.27 742.54 524.54 737.59 525.87 731.75 531.65 729.22 532.87 719.57 533.34 712.72 535.24 710.28 536.73 707.28 537.61 706.57 536.68 706.89 535.4 712.73 529.68 713.94 529.88 715.21 531.82 717.18 532.11 718.7 531.68 724.83 529.33 732.36 523.35 739.56 520.63 746.66 519.05 750.54 514.11 753.9 513.08 759.66 507.76 762.04 504.63 775.57 495.76 Z M 802.1 515.08 807.87 516.39 809.89 515.33 810.99 516.08 813.68 521.89 813.77 525.32 813.06 529.82 813.73 532.31 815.22 535.22 817.71 537.59 820.33 539.07 823.29 539.55 826.14 540.82 827.39 543.78 827.67 546.15 828.31 546.53 830.51 546.78 832.2 545.83 835.4 541.22 835.29 537.76 835.89 536.28 837.76 534.03 841.37 533.47 842.5 542.17 841.69 547.93 841.96 557.54 841.2 559.51 829.06 560.12 817.71 559.22 801.33 559.11 771.53 561.82 765.22 563.79 761.37 566.04 756.89 570.07 755.86 572.49 756.35 573.56 755.68 575.45 753.8 576.42 746.68 571.68 742.02 567.02 736.8 559.85 738.14 557.63 743.93 556.79 747.17 557.48 751.74 559.63 753.98 559.14 755.62 557.68 766.3 541.72 767.61 541.29 770.82 537.73 771.08 535.36 773.8 529.8 777.7 526.06 787.81 518.97 800.14 511.31 801.52 511.76 802.1 515.08 Z", + fill: 'fill-green-500', + hoverFill: 'fill-green-700' + }, + { + id: 'essex', + name: 'Essex County', + slug: 'essex', + image: '/images/counties/ma.png', + pathD: "M 703.99 163.15 698.16 167.71 686.45 162.8 686.43 162.8 683.35 158.08 682.86 157.41 682.61 156.98 681.35 155.15 681.33 154.97 679.5 152.16 678.99 151.43 672.89 104.59 656.96 106.42 653.37 101.23 650.68 101.34 648.96 106.83 624.43 85.33 624.85 56.96 627.28 53.86 637.3 53.59 637.32 53.6 637.35 53.61 644.44 55.69 643.28 36.22 648.8 29.61 653.08 27.11 662.73 22.57 677.66 15.54 683.18 12.94 694.22 9.08 711.78 1.88 712.02 1.73 716.31 1 716.31 1.01 719.57 1.02 724.05 2.46 734.15 10.42 742.59 6.25 742.47 14.22 745.84 39.48 749.16 52.2 754.71 65.41 755.2 67.7 753.02 70.01 752.99 71.81 756.82 74.73 761.04 75.37 762.21 76.03 766.14 80.6 766.4 82.7 777.02 86.57 778.86 86.12 779.13 83.26 783.99 77.67 788.95 73.34 793 72.14 795.7 73.86 794.94 78.26 794.69 82.11 794.96 83.8 797.11 84.98 802.32 84 803.32 88.33 803.4 91.51 802.71 93.26 799.59 93.31 796.14 95.6 791.5 105.99 786.36 112.58 783.63 113.23 782.78 112.76 782.76 111.43 782.66 109.87 782.13 108.91 781.55 108.17 780.7 108.03 779.87 108.13 779.17 108.58 778.34 110.15 774.56 114.35 766.18 116.5 764.2 114.54 758.75 116.88 746.14 120.12 743.1 122.83 740.97 123.82 734.19 124.29 728.02 125.68 727.76 126.94 729.4 134.37 731.15 135.16 731.86 134.78 735.91 135.51 738.87 141.32 737.55 146.1 736.04 147.16 734.48 145.74 731.68 146.17 725.79 150.37 723.95 153.51 723.55 154.64 723.74 155.45 721.85 156.91 718.14 154.72 715.55 154.32 714.4 154.79 710.89 158 711.09 162.84 711.39 165.32 712.72 167.82 716.76 169.02 718.06 169.93 719.78 171.72 718.78 173.22 710.52 172.52 708.66 165.9 708.57 160.12 707.66 158.61 704.03 162.28 703.99 163.15 Z", + fill: 'fill-green-500', + hoverFill: 'fill-green-700' + }, + { + id: 'franklin', + name: 'Franklin County', + slug: 'franklin', + image: '/images/counties/ma.png', + pathD: "M 161.48 122.19 168.03 91.07 168.38 67.6 148.68 54.39 149.83 54.43 173.63 55.25 174.43 55.28 191.42 55.86 300.65 59.63 302.61 59.7 313.18 60.1 347.93 61.4 363.58 91.81 358.16 137.68 339.41 199.71 328.1 214.37 328.42 200.74 323.14 171.53 277.58 169.25 267.65 170.92 234.46 177.1 218.47 155.92 189.54 148.41 187.98 127.57 161.48 122.19 Z", + fill: 'fill-green-500', + hoverFill: 'fill-green-700' + }, + { + id: 'hampden', + name: 'Hampden County', + slug: 'hampden', + image: '/images/counties/ma.png', + pathD: "M 387.58 313.56 370.58 313.29 317.1 312.45 287.01 311.97 236.73 311.18 231.83 311.25 220.6 311.4 220.16 316.93 219.97 316.96 217.82 321.73 217.66 323.43 215.5 323.75 204.2 325.39 205.06 311.29 191.57 310.85 191.54 310.85 152.5 310.25 140.51 310.07 135.68 270.75 152.7 237.97 154.35 233.36 154.83 210.94 185.77 203.68 178.46 237.71 210.48 238.54 239.17 257.97 259.02 220.56 264.33 247.69 264.6 247.69 277 245.94 315.35 240.36 317.63 257.09 364.55 235.48 353.07 257.79 385.93 266.14 387.76 265.85 387.78 291.64 387.58 313.56 Z", + fill: 'fill-green-500', + hoverFill: 'fill-green-700' + }, + { + id: 'hampshire', + name: 'Hampshire County', + slug: 'hampshire', + image: '/images/counties/ma.png', + pathD: "M 364.55 235.48 317.63 257.09 315.35 240.36 277 245.94 264.6 247.69 264.33 247.69 259.02 220.56 239.17 257.97 210.48 238.54 178.46 237.71 185.77 203.68 154.83 210.94 161.48 122.19 187.98 127.57 189.54 148.41 218.47 155.92 234.46 177.1 267.65 170.92 277.58 169.25 323.14 171.53 328.42 200.74 328.1 214.37 339.41 199.71 366.51 217.64 367.35 217.57 369.36 218.78 368.32 220.94 367 221.87 366.78 226.5 365.45 226.44 365.92 231.52 367.23 231.7 367.28 233.29 367.45 234.77 366.34 234.64 366.28 234.1 365.4 234.26 364.55 235.48 Z", + fill: 'fill-green-500', + hoverFill: 'fill-green-700' + }, + { + id: 'middlesex', + name: 'Middlesex County', + slug: 'middlesex', + image: '/images/counties/ma.png', + pathD: "M 451.39 65.26 476.51 66.12 485.38 66.42 522.08 67.68 523.26 67.71 547.31 68.47 614.17 70.57 624.85 56.96 624.43 85.33 648.96 106.83 650.68 101.34 653.37 101.23 656.96 106.42 672.89 104.59 678.99 151.43 679.5 152.16 681.33 154.97 681.35 155.15 682.61 156.98 682.86 157.41 683.35 158.08 686.43 162.8 686.45 162.8 687.9 165.17 684.45 173.94 678.5 183.83 673.6 182.11 671.69 186.05 676.13 190.43 674.6 190.39 672.63 194.18 666.68 196.33 661.86 195.31 661.83 191.08 658.12 188.68 654.75 191.89 653.39 193.28 648.25 193.68 646.32 197.25 648.27 203.38 651.16 204.56 645.21 210.35 649.01 214.19 645.29 217.53 641.92 221.72 620.71 205.33 603.88 234.58 604.74 235.56 604.65 239.69 601.61 242.99 601.01 244.58 601.88 246.89 599.96 246.28 598.6 249.28 600.72 251.68 584.5 256.22 585.08 259.64 577.56 259.43 573.82 261.06 568.46 267.11 564.65 267.64 532.01 242.5 535.39 230.28 545.44 227.89 555.24 227.52 559.55 219.26 562.49 211.6 562.32 204.61 544.99 205.95 535.82 211.56 533.85 209.04 532.54 207.86 531.32 205.74 530.44 204.54 530.86 204.02 530.72 202.17 528.71 201.35 526.68 199.77 524.87 197.45 525.18 197.18 547.1 154.88 548.27 126.9 522.19 133.83 518.2 133.06 517.9 132.99 516.91 132.81 514.43 132.3 514.19 132.26 511.44 131.67 510.56 131.54 510.9 128.24 514.43 101.84 484.51 89.9 462.25 93.7 451.39 65.26 Z", + fill: 'fill-green-500', + hoverFill: 'fill-green-700' + }, + { + id: 'nantucket', + name: 'Nantucket County', + slug: 'nantucket', + image: '/images/counties/ma.png', + pathD: "M 937.85 577.59 940.56 577.1 945.81 573.65 950.25 569.01 954.22 562.67 954.9 555.29 954.33 552.59 953.19 550.9 952.3 549.38 950.39 546.79 949.31 545.25 949.45 543.88 953.64 546 957.69 552.16 973.36 584.4 973.38 589.48 972.24 593.05 971.89 593.81 969.39 595.62 962.23 598.5 958.56 599 948.44 597.31 940.25 596.7 936.55 597.97 930.71 597.43 916.7 592.58 898.8 582.97 893.68 581.03 890.83 578.76 889.02 576.23 888.47 573.02 892.48 573.16 895.54 574.76 896.84 575.63 897.99 578.43 900.85 580.3 906.47 580.3 909.8 578.71 929.15 578.98 937.85 577.59 Z", + fill: 'fill-green-500', + hoverFill: 'fill-green-700' + }, + { + id: 'norfolk', + name: 'Norfolk County', + slug: 'norfolk', + image: '/images/counties/ma.png', + pathD: "M 559.22 318.28 559.22 314.44 559.32 313.1 559.22 313.16 559.22 301.03 558.51 282.07 564.54 276.85 564.65 267.64 568.46 267.11 573.82 261.06 577.56 259.43 585.08 259.64 584.5 256.22 600.72 251.68 598.6 249.28 599.96 246.28 601.88 246.89 601.01 244.58 601.61 242.99 604.65 239.69 604.74 235.56 603.88 234.58 620.71 205.33 641.92 221.72 658.17 241.8 662.98 230.61 665.74 230.16 669.51 226.57 671.05 227.02 675.71 226.09 676.8 227.46 679.01 225.64 678.45 224.4 681.87 223.93 682.16 213.63 691.94 212.94 693.13 214.65 691.73 219.89 692.07 221.85 694.44 226.03 696.33 227.41 702.18 227.14 707.13 225.57 708.05 226.81 710.65 228.59 714.08 228.95 717.37 228.15 718.62 225.88 713.62 267.35 698.43 275.37 695.24 277.05 692.84 278.63 671.8 289.82 656.06 298.12 656.06 298.14 647.97 302.35 615.77 319.28 615.77 319.31 595.14 329.89 590.67 329.95 590.69 317.71 570.04 318.08 559.22 318.28 Z", + fill: 'fill-green-500', + hoverFill: 'fill-green-700' + }, + { + id: 'plymouth', + name: 'Plymouth County', + slug: 'plymouth', + image: '/images/counties/ma.png', + pathD: "M 671.8 289.82 692.84 278.63 695.24 277.05 698.43 275.37 713.62 267.35 718.62 225.88 721.32 220.98 721.45 218.31 721.09 217.07 716.12 214.66 715.61 213.49 718.28 212.69 724.96 212.33 725.37 215.32 728.16 220.78 730.6 224.31 733.49 227.11 738.88 227.41 740.6 227.96 744.08 229.05 750.28 232.33 752.44 233.1 755.06 234.05 756.73 235.91 759.5 241.51 761.45 244 765.94 247.96 768.17 249.04 769.13 257.44 770.32 263.28 772.48 265.33 778.13 276.27 783.88 285.23 790.28 292.38 790.74 294.94 788.35 296.84 788.12 299.71 789.46 306.1 789.16 307.88 787.4 307.75 782.42 311.06 781.8 316.77 782.92 320.05 782 321.7 779.88 322.52 777.73 319.89 775.3 319.68 770.88 321.77 771.47 324.68 774.45 329.19 784.28 338.79 787.18 339.48 788.07 338.4 792.68 342.46 794.77 345.06 796.66 346.17 798.9 345.99 801.62 343.43 805.52 342.62 813.77 350 815.53 354.66 815.26 356.4 815.65 358.13 819.39 364.5 821.14 375.65 818.47 382.64 816.7 385.58 816.4 388.04 816.98 391.18 817.98 392.95 810.45 401.67 792.33 410.3 795.28 415.3 789.54 426.32 789.08 426.12 787.34 427.3 785.86 427.41 782.13 425.06 771.96 421.8 769.13 420.07 767.08 421.16 766.38 424.51 768.44 428.29 769.47 435.13 768.9 438.37 766.26 437.24 762.22 434.06 759.27 435.01 757.62 441.33 757.61 441.39 757.38 444.6 758.5 446.94 758.66 449.45 756.54 454.02 755.51 454.18 754.34 452.78 753.76 451.3 753.52 450.72 744.79 448.67 743.67 448.95 743.01 449.98 742.84 452.43 745.99 454.18 747.19 457.56 746.96 458.37 744.48 460.04 737.74 460.16 735.62 458.74 714.45 400.03 683.54 390.9 693.47 350.01 680.06 337.87 678.66 329.93 671.8 289.82 Z", + fill: 'fill-green-500', + hoverFill: 'fill-green-700' + }, + { + id: 'suffolk', + name: 'Suffolk County', + slug: 'suffolk', + image: '/images/counties/ma.png', + pathD: "M 641.92 221.72 645.29 217.53 649.01 214.19 645.21 210.35 651.16 204.56 648.27 203.38 646.32 197.25 648.25 193.68 653.39 193.28 654.75 191.89 658.12 188.68 661.83 191.08 661.86 195.31 666.68 196.33 672.63 194.18 674.6 190.39 676.13 190.43 671.69 186.05 673.6 182.11 678.5 183.83 684.45 173.94 687.9 165.17 686.45 162.8 698.16 167.71 703.99 163.15 703.94 164.07 697.97 170.37 696.7 173.03 695.92 176.53 696.3 178.18 697.41 178.38 697.85 180.49 698.69 182.22 700.74 182.78 701.42 183.49 701 183.84 700.79 184.58 700.74 185.77 700.87 187.39 703.95 193.47 705.97 197.46 706.04 199.54 703.2 198.49 700.82 195.94 700.15 195.22 698.8 195.02 698.16 195.19 693.86 196.33 691.54 198.43 690.66 201.27 690.21 202.71 689.17 206.08 689.85 209.94 691.94 212.94 682.16 213.63 681.87 223.93 678.45 224.4 679.01 225.64 676.8 227.46 675.71 226.09 671.05 227.02 669.51 226.57 665.74 230.16 662.98 230.61 658.17 241.8 641.92 221.72 Z", + fill: 'fill-green-500', + hoverFill: 'fill-green-700' + }, + { + id: 'worcester', + name: 'Worcester County', + slug: 'worcester', + image: '/images/counties/ma.png', + pathD: "M 339.41 199.71 358.16 137.68 363.58 91.81 347.93 61.4 394.21 63.14 402.99 63.47 443.29 64.99 451.39 65.26 462.25 93.7 484.51 89.9 514.43 101.84 510.9 128.24 510.56 131.54 511.44 131.67 514.19 132.26 514.43 132.3 516.91 132.81 517.9 132.99 518.2 133.06 522.19 133.83 548.27 126.9 547.1 154.88 525.18 197.18 524.87 197.45 526.68 199.77 528.71 201.35 530.72 202.17 530.86 204.02 530.44 204.54 531.32 205.74 532.54 207.86 533.85 209.04 535.82 211.56 544.99 205.95 562.32 204.61 562.49 211.6 559.55 219.26 555.24 227.52 545.44 227.89 535.39 230.28 532.01 242.5 564.65 267.64 564.54 276.85 558.51 282.07 559.22 301.03 559.22 313.16 559.32 313.1 559.22 314.44 559.22 318.28 558.78 318.28 558.51 318.32 551.4 319.05 551.32 319.08 542.75 319.32 538.05 319.41 534.22 319.55 478.18 321.59 477.8 315.98 408.03 314.61 396.61 314.02 387.58 313.56 387.78 291.64 387.76 265.85 385.93 266.14 353.07 257.79 364.55 235.48 365.4 234.26 366.28 234.1 366.34 234.64 367.45 234.77 367.28 233.29 367.23 231.7 365.92 231.52 365.45 226.44 366.78 226.5 367 221.87 368.32 220.94 369.36 218.78 367.35 217.57 366.51 217.64 339.41 199.71 Z", + fill: 'fill-green-500', + hoverFill: 'fill-green-700' + } + +]; diff --git a/src/lib/states/newhampshire.ts b/src/lib/states/newhampshire.ts new file mode 100644 index 0000000..c38899f --- /dev/null +++ b/src/lib/states/newhampshire.ts @@ -0,0 +1,123 @@ +// src/lib/states/newhampshire.ts +export interface NewEnglandState { + id: string; + name: string; + slug: string; + image: string; + pathD: string; + fill: string; + hoverFill: string; +} + +export const newHampshireCounties: NewEnglandState[] = [ + { + id: 'belknap', + name: 'Belknap County', + slug: 'belknap', + image: '/images/counties/newhampshire/belknap.png', + pathD: "M 516.11 357.3 527.98 369.91 531.4 373.05 547.14 388.25 576.91 408.72 572.19 414.81 577.48 450.4 565 466.52 546.68 452.5 526.83 438.25 514.08 428.87 513.7 428.45 500.73 424.25 500.17 422.5 499.7 422.69 498.58 419.33 496.16 420.22 496.09 419.59 494.76 418.63 493.52 418.35 492.97 417.76 492.44 417.62 492 416.99 491.76 416.22 491.11 415.28 490.39 414.69 490 414.1 490.01 413.5 490.23 410.79 487.46 408.99 486.85 408.12 486.79 407.45 486.15 406.08 485.06 405.7 483.86 404.14 483.9 403.23 496.56 390.09 497.04 375.29 517.79 372.78 516.11 357.3 Z", + fill: 'fill-amber-500', + hoverFill: 'fill-amber-700' + }, + { + id: 'carroll', + name: 'Carroll County', + slug: 'carroll', + image: '/images/counties/newhampshire/carroll.png', + pathD: "M 576.91 408.72 547.14 388.25 531.4 373.05 527.98 369.91 516.11 357.3 510.79 328.03 544.22 322.89 535.33 254.85 536.74 254.58 536.8 254.57 538.72 254.2 540.41 262.43 544.94 265.45 547.3 275.49 547.23 282.39 562.27 247.45 596.88 248.93 602.2 238.12 602.44 244.09 602.44 244.18 603.67 282.17 603.66 282.23 605.04 323.19 605.19 329.59 605.69 351.04 605.69 351.11 606.84 368.71 606.81 369.43 606.86 371.69 606.86 371.92 607.06 375.75 607.19 378.25 608.38 401.69 611.58 405.69 611.25 408.42 611.25 408.36 610.65 409.12 597.74 410.92 576.91 408.72 Z", + fill: 'fill-amber-500', + hoverFill: 'fill-amber-700' + }, + { + id: 'cheshire', + name: 'Cheshire County', + slug: 'cheshire', + image: '/images/counties/newhampshire/cheshire.png', + pathD: "M 450.75 595.58 426.07 594.65 420.7 594.45 392.35 593.39 371.08 592.59 364.61 592.34 363.41 592.3 363.13 591.13 360.12 584.34 358.03 582.06 355 580.1 349.51 573.97 347.39 563.2 347.37 562.8 347.32 560.98 347.3 560.82 365.84 529.45 367.67 505.11 367.6 503.77 366.15 500.02 364.47 494.42 413.2 489.77 409.58 501.08 432.72 501.79 428.72 543.29 438.84 548.99 450.75 595.58 Z", + fill: 'fill-amber-500', + hoverFill: 'fill-amber-700' + }, + { + id: 'coos', + name: 'Coos County', + slug: 'coos', + image: '/images/counties/newhampshire/coos.png', + pathD: "M 602.2 238.12 596.88 248.93 562.27 247.45 547.23 282.39 547.3 275.49 544.94 265.45 540.41 262.43 538.72 254.2 536.8 254.57 536.74 254.58 535.33 254.85 530.79 246.29 508.96 245.04 507.08 233.51 489.02 227.16 477.83 210.08 478.25 209.93 479.22 210.08 481.05 211.24 487 208.87 491.78 205.11 505.04 191.59 508.21 186.95 515.47 168.11 512.68 159.15 505.18 142.61 500.78 135.25 500.45 131.11 501.01 129.35 509.49 116.59 522.13 94.51 522.44 93.04 518.67 84.59 515.22 76.04 515.08 75.13 515.35 73.73 516.49 72.46 520.62 70.48 523.68 70.74 526.63 69.99 527.29 69.2 521.04 69.26 522.09 56.22 523.24 55.51 533.18 43.46 538.3 24.83 537.4 22.07 530.86 17.52 537.74 15.7 547.34 8.97 554.9 2.48 556.99 1.67 559.9 4.3 560.52 7.54 561.08 8.51 565.47 12.4 573.58 15.14 580.9 15.6 582.13 15.03 583.36 12.72 584.11 11.08 584.08 10.27 586.55 3.5 587.76 1.79 589.98 1 591.41 20.02 593.98 67.79 597.7 129.24 599.09 162.93 601.66 225.19 602.2 238.12 Z", + fill: 'fill-amber-500', + hoverFill: 'fill-amber-700' + }, + { + id: 'grafton', + name: 'Grafton County', + slug: 'grafton', + image: '/images/counties/newhampshire/grafton.png', + pathD: "M 449.69 411.21 384.66 394.88 383.82 391.62 383.87 390.54 384.65 387.03 389.07 371.52 394.3 364.35 395.44 364.35 400.64 361.12 405.09 355.9 405.24 355.72 408.71 347.8 408.97 341.54 411.44 329.63 419.06 322.11 421.79 314.88 421.6 312.94 421.36 310.53 420.36 309.78 420.41 306.29 424.05 295.48 429.99 277.82 432.4 267.8 432.07 267.37 430.27 265.01 428.41 260.41 427.83 241.3 428.22 239.86 429.3 237.78 437 229.68 438.63 228.88 463.83 220.94 469.33 219.21 469.61 215.72 472.98 211.72 477.83 210.08 489.02 227.16 507.08 233.51 508.96 245.04 530.79 246.29 535.33 254.85 544.22 322.89 510.79 328.03 516.11 357.3 517.79 372.78 497.04 375.29 496.56 390.09 483.9 403.23 469.01 407.53 461.42 395.05 456.79 400.69 449.69 411.21 Z", + fill: 'fill-amber-500', + hoverFill: 'fill-amber-700' + }, + { + id: 'hillsborough', + name: 'Hillsborough County', + slug: 'hillsborough', + image: '/images/counties/newhampshire/hillsborough.png', + pathD: "M 539.22 528.83 539.27 529.09 541.66 542.76 531.04 555.73 544.4 576.1 563.41 588.77 561.92 590.66 555.38 599 514.44 597.71 499.71 597.25 498.99 597.23 476.52 596.46 471.08 596.27 455.71 595.75 450.75 595.58 438.84 548.99 428.72 543.29 432.72 501.79 435.15 494.7 432.94 489.64 437.52 488.44 453.31 484.05 462.75 504.82 470.39 502.76 483.01 499.4 487.25 498.29 487.24 498.24 487.69 498.13 488.37 497.86 493.78 496.41 498.16 518.64 518.39 515.31 539.22 528.83 Z", + fill: 'fill-amber-500', + hoverFill: 'fill-amber-700' + }, + { + id: 'merrimack', + name: 'Merrimack County', + slug: 'merrimack', + image: '/images/counties/newhampshire/merrimack.png', + pathD: "M 437.52 488.44 424.16 457.94 430.14 431.06 449.69 411.21 456.79 400.69 461.42 395.05 469.01 407.53 483.9 403.23 483.86 404.14 485.06 405.7 486.15 406.08 486.79 407.45 486.85 408.12 487.46 408.99 490.23 410.79 490.01 413.5 490 414.1 490.39 414.69 491.11 415.28 491.76 416.22 492 416.99 492.44 417.62 492.97 417.76 493.52 418.35 494.76 418.63 496.09 419.59 496.16 420.22 498.58 419.33 499.7 422.69 500.17 422.5 500.73 424.25 513.7 428.45 514.08 428.87 526.83 438.25 546.68 452.5 565 466.52 563.12 468.9 545.16 507.85 539.22 528.83 518.39 515.31 498.16 518.64 493.78 496.41 488.37 497.86 487.69 498.13 487.24 498.24 487.25 498.29 483.01 499.4 470.39 502.76 462.75 504.82 453.31 484.05 437.52 488.44 Z", + fill: 'fill-amber-500', + hoverFill: 'fill-amber-700' + }, + { + id: 'rockingham', + name: 'Rockingham County', + slug: 'rockingham', + image: '/images/counties/newhampshire/rockingham.png', + pathD: "M 633.64 503.05 639.48 508.53 644.05 512.81 652.7 517.41 650.23 523.56 646 530.84 645.27 531.88 643.46 533.43 637.59 545.21 635.2 551.23 634.45 555.33 634.17 556.87 634.01 559.62 628.84 562.17 622.66 557.3 619.92 556.41 617.92 556.41 617.92 556.4 615.29 556.85 615.15 556.94 604.4 561.35 597.64 563.71 594.26 565.3 585.11 569.61 579.2 572.39 576.58 573.92 573.2 577.96 573.91 589.89 569.57 588.61 569.55 588.61 569.54 588.6 563.41 588.77 544.4 576.1 531.04 555.73 541.66 542.76 539.27 529.09 539.22 528.83 545.16 507.85 563.12 468.9 599.48 499.69 591.85 512.41 624.41 512.71 626.8 509.29 626.71 502.64 633.64 503.05 Z", + fill: 'fill-amber-500', + hoverFill: 'fill-amber-700' + }, + { + id: 'strafford', + name: 'Strafford County', + slug: 'strafford', + image: '/images/counties/newhampshire/strafford.png', + pathD: "M 610.65 409.12 610.06 409.87 611.35 415.45 609.86 423.07 609.73 423.75 609.75 423.75 606.06 437.15 605.91 442.31 606.47 445.64 606.47 445.8 609.29 453.14 611.74 455.36 615.3 456.36 617.61 459.04 618.32 461.18 618.76 461.54 626.44 470.96 630.4 474.1 630.31 474.29 631.31 476 632.24 476.28 632.46 476.35 632.73 476.43 633.02 476.57 633.08 476.6 633.92 477.12 633.93 477.23 634.18 477.78 632.19 488.71 632.05 490.13 631.29 497.7 632.23 501.72 633.64 503.05 626.71 502.64 626.8 509.29 624.41 512.71 591.85 512.41 599.48 499.69 563.12 468.9 565 466.52 577.48 450.4 572.19 414.81 576.91 408.72 597.74 410.92 610.65 409.12 Z", + fill: 'fill-amber-500', + hoverFill: 'fill-amber-700' + }, + { + id: 'sullivan', + name: 'Sullivan County', + slug: 'sullivan', + image: '/images/counties/newhampshire/sullivan.png', + pathD: "M 437.52 488.44 432.94 489.64 435.15 494.7 432.72 501.79 409.58 501.08 413.2 489.77 364.47 494.42 366.56 483.13 367.91 478.5 373.53 459.32 372.97 454.66 372.41 449.89 372.19 442.66 373.56 433.82 373.56 433.8 375.06 424.13 375.09 417.11 373.75 413 384.66 394.88 449.69 411.21 430.14 431.06 424.16 457.94 437.52 488.44 Z", + fill: 'fill-amber-500', + hoverFill: 'fill-amber-700' + } +]; + +export const mapViewBox: string = "890 20 95 155"; + +/** + * SVG transform string to apply to the group of states to straighten the map. + * Format: "rotate(angle cx cy)" + * - angle: degrees to rotate (negative for counter-clockwise) + * - cx: x-coordinate of the center of rotation + * - cy: y-coordinate of the center of rotation + * + * You'll need to experiment with these values. + * The approximate center of your current viewBox (890 65 85 110) is: + * cx = 890 + (85 / 2) = 932.5 + * cy = 65 + (110 / 2) = 120 + */ +// export const mapTransform: string = "rotate(-2 932.5 120)"; // Example: Rotate -2 degrees around center +export const mapTransform: string | undefined = undefined; // Start with no transform +// Try uncommenting the line above and adjusting the -2, 932.5, and 120 values. +// For example, if it's tilted 5 degrees clockwise, try "rotate(-5 932.5 120)" +// If it's tilted 3 degrees counter-clockwise, try "rotate(3 932.5 120)" diff --git a/src/lib/states/rhodeisland.ts b/src/lib/states/rhodeisland.ts new file mode 100755 index 0000000..5ca0a59 --- /dev/null +++ b/src/lib/states/rhodeisland.ts @@ -0,0 +1,79 @@ +// src/lib/states/rhodeisland.ts +export interface NewEnglandState { + id: string; + name: string; + slug: string; + image: string; + pathD: string; + fill: string; + hoverFill: string; +} + +export const rhodeIslandCounties: NewEnglandState[] = [ + { + id: 'bristol', + name: 'Bristol County', + slug: 'bristol', + image: '/images/counties/ri/bristol.png', + pathD: "M 571.01 203.15 570.03 201.93 565.17 196.46 564.84 195.96 569.04 191.87 570.63 185.21 589.15 168.16 618.06 184.52 636.82 213.24 635.24 216.67 628.52 222 630.24 233.06 628.23 242.96 619 259.85 615.16 258.24 613.61 253.09 614.07 251.41 608.33 239.28 604.6 239.35 603.11 246.26 598.7 255.09 597.55 254.78 596.35 251.48 595.14 239.28 596.92 232.98 598.81 233.13 601.79 228.45 602.77 218.62 595.31 207.63 590.67 204.1 576.33 200.87 572.6 201.33 571.01 203.15 Z", + fill: 'fill-green-500', + hoverFill: 'fill-green-700' + }, + { + id: 'kent', + name: 'Kent County', + slug: 'kent', + image: '/images/counties/ri/kent.png', + pathD: "M 347.22 203.58 518.63 198.22 558.14 182.46 561.09 189.73 564.84 195.96 565.17 196.46 570.03 201.93 571.01 203.15 570.71 203.48 564.57 212.47 564.57 223.92 560.85 239.28 558.32 243.35 556.2 242.89 552.19 239.74 551.73 233.75 552.42 231.83 551.84 231.37 537.73 231.29 525.81 229.75 524.91 228.48 525.52 227.3 523.45 226.53 521.71 229.1 524.2 244.88 531.6 242.73 533.95 240.5 542.23 246.09 542.57 252.15 503.72 287.16 347.38 291.22 347.38 291.18 347.33 261.62 347.22 203.58 Z", + fill: 'fill-green-500', + hoverFill: 'fill-green-700' + }, + { + id: 'newport', + name: 'Newport County', + slug: 'newport', + image: '/images/counties/ri/newport.png', + pathD: "M 555.41 381.67 552.49 384.53 551.98 388.33 547.22 392.74 546.71 384.3 549.09 362.9 553.91 362.31 557.81 354.18 551.61 347.59 551.03 340.81 554.96 318.71 557.75 311.15 560.52 307.42 562.28 306.91 565.68 309.03 567.57 319.01 565.82 356.23 567.3 369.12 556.77 374.98 555.41 381.67 Z M 584.54 363.53 585.26 366.05 584 369.21 576.21 360.57 577.18 358.53 584.54 363.53 Z M 582.27 302.55 579.84 298.73 579.27 292.7 580.96 285.04 583.11 282.82 584.62 278.01 585 272.61 581.19 268.81 574.39 266.96 566.03 253.77 564.34 247.23 573.45 245.35 578.43 248.74 579.72 256.17 579.27 257.41 576.47 258.34 575.88 261.7 582.52 266.44 590.63 268.22 595.42 273.62 596.55 284.54 594.48 290.44 589.31 300.59 584.88 303.74 582.27 302.55 Z M 607.71 256 609.46 256.61 611.43 262.92 606.58 263.14 605.06 259.76 606.98 258.59 607.71 256 Z M 690.26 359.31 681.9 361.71 679.73 364.45 680.18 367.25 666.28 377.14 664.85 382.22 653.11 386.35 652.11 385.6 651.15 384.18 651.27 381.69 654.65 372.44 654.58 368.32 649.85 363.2 649.69 360.64 646.26 358.1 649.13 347.73 642.58 326.19 645.1 308.92 645.55 288.61 643.05 282.16 643.17 276.52 643.38 273.3 641.25 271.58 628.66 275.88 627.18 297.62 631.01 306.36 630.75 333.02 631.71 335.29 635.18 338.19 634.44 342.82 632.59 347.46 632.54 347.57 632.39 347.95 628.71 357.19 629.75 366.57 630.48 366.78 630.69 368.95 630.16 370.46 630.1 370.64 629.13 373.43 629 373.79 628.66 374.76 625.59 376.76 625.6 376.51 625.86 372 625.95 370.36 622.52 367.22 616.32 365.16 614.89 365.26 607.36 365.79 605.63 365.91 600.77 368.28 600.05 371.37 598.04 380 596.94 384.72 596.86 385.06 596.78 385.4 596.76 385.48 596.09 388.38 596.01 388.7 595.91 388.78 595.24 389.24 592.96 390.86 592.9 390.9 592.45 391.21 592.42 391.23 591.76 390.82 591.75 388.64 587.29 387.95 579.1 392.44 578.94 392.53 572.07 391.23 571.89 391.03 568.45 387.25 568.4 387.2 568.35 387.15 568.19 386.98 568.01 386.78 567.95 386.71 567.87 386.62 566.56 385.18 566.38 384.98 566.33 384.94 566.12 384.7 566.1 384.68 566.1 384.66 566.47 382.86 566.6 382.23 566.73 381.63 574.13 377.26 579.81 378.34 589.8 372.92 589.34 365.25 586.41 355.45 584.01 354.65 582.53 352.3 582.46 344.99 591.56 333.83 592.87 325.44 596.39 316.53 601.16 308.65 604.23 307.38 605.88 304.74 611.88 284.27 612.41 278.75 610.96 275.73 612.69 272.61 623.35 262.47 643.31 260.29 651.77 237.55 652.41 237.75 654.06 238.15 654.06 238.1 659.13 239.33 661.84 240.08 661.79 242.07 661.79 242.35 673.12 245.09 677.29 245.99 682.76 247.56 683.02 247.56 683.13 260.76 683.12 260.81 683.48 265.68 683.57 267.01 683.7 268.83 690.26 359.31 Z", + fill: 'fill-green-500', + hoverFill: 'fill-green-700' + }, + { + id: 'providence', + name: 'Providence County', + slug: 'providence', + image: '/images/counties/ri/providence.png', + pathD: "M 589.15 168.16 570.63 185.21 569.04 191.87 564.84 195.96 561.09 189.73 558.14 182.46 518.63 198.22 347.22 203.58 347.22 203.46 345.63 146.92 345.62 145.77 344.92 124.12 344.92 123.46 343.93 79.83 343.55 63.23 342.31 8.41 449.02 4.51 456.3 4.24 465.26 4.07 481.58 3.62 481.73 3.55 495.27 2.17 495.78 2.1 496.62 2.09 517.21 1.71 556.53 1 556.5 24.32 556.48 36.94 556.53 38.25 556.43 67.13 556.38 67.27 558.99 87.04 560.43 86.76 561.87 86.62 564.74 86.14 565.1 86.07 566.22 85.94 570.22 85.32 571.25 85.18 578.12 87.31 578.12 87.45 578.99 128.55 577.97 129.72 578.12 147.26 583.96 165.14 589.14 168.16 589.15 168.16 Z", + fill: 'fill-green-500', + hoverFill: 'fill-green-700' + }, + { + id: 'washington', + name: 'Washington County', + slug: 'washington', + image: '/images/counties/ri/washington.png', + pathD: "M 449.82 564.8 454.6 559.16 456.1 552.43 456.43 545.8 457.9 543.07 464.41 545.95 467.53 550.99 468.01 553.62 466.27 559.36 462.86 565.6 462.02 573.1 464.47 578.67 469.98 585.08 472.94 586.35 473.24 588.8 471.61 594 469.09 595.34 447.69 599 444.47 598.6 438.46 594.3 437.73 589.51 441.61 574.62 447.03 570.36 449.82 564.8 Z M 542.57 252.15 545.07 296.38 522.54 302.5 525.17 313 535.9 331.62 538.08 333.92 539.4 341.73 539.34 346.41 536.01 358.5 536.76 368 537.79 369.84 537.96 372.67 537.56 376.28 536.15 378.17 535.21 376.26 531.24 377.66 531.14 381.07 532.68 385.26 532.31 388.94 529.77 395.2 527.69 397.73 525.88 397.52 521.9 399.66 518.37 403.42 518.61 420.52 508.59 435.46 504.29 445.29 488.86 443.25 482.03 441.93 467.34 444.2 431.9 452.7 399.31 465.03 392.36 469.03 382.56 472.71 378.2 473.11 355.41 475.16 349.13 476.69 324.62 483.59 312.48 489.95 309.74 487.58 310.08 482.92 311.39 478.97 321.53 470.58 325.25 466.13 325.91 463.78 325.72 445.85 324.78 436.54 320.33 429.14 319.64 421.98 320.1 419.23 321.6 417.68 332.5 412.57 343.11 414.54 343.12 414.41 347.38 291.22 503.72 287.16 542.57 252.15 Z", + fill: 'fill-green-500', + hoverFill: 'fill-green-700' + } + +]; + +export const mapViewBox: string = "890 20 95 155"; + +/** + * SVG transform string to apply to the group of states to straighten the map. + * Format: "rotate(angle cx cy)" + * - angle: degrees to rotate (negative for counter-clockwise) + * - cx: x-coordinate of the center of rotation + * - cy: y-coordinate of the center of rotation + * + * You'll need to experiment with these values. + * The approximate center of your current viewBox (890 65 85 110) is: + * cx = 890 + (85 / 2) = 932.5 + * cy = 65 + (110 / 2) = 120 + */ +// export const mapTransform: string = "rotate(-2 932.5 120)"; // Example: Rotate -2 degrees around center +export const mapTransform: string | undefined = undefined; // Start with no transform +// Try uncommenting the line above and adjusting the -2, 932.5, and 120 values. +// For example, if it's tilted 5 degrees clockwise, try "rotate(-5 932.5 120)" +// If it's tilted 3 degrees counter-clockwise, try "rotate(3 932.5 120)" diff --git a/src/lib/states/vermont.ts b/src/lib/states/vermont.ts new file mode 100755 index 0000000..3b1579c --- /dev/null +++ b/src/lib/states/vermont.ts @@ -0,0 +1,159 @@ +// src/lib/states/vermont.ts +export interface NewEnglandState { + id: string; + name: string; + slug: string; + image: string; + pathD: string; + fill: string; + hoverFill: string; +} + +export const vermontCounties: NewEnglandState[] = [ + { + id: 'addison', + name: 'Addison County', + slug: 'addison', + image: '/images/counties/vermont/addison.png', + pathD: "M 404.4 314.67 398.65 317.79 393.49 320.31 391.61 310.61 390.62 309.93 391.02 309.41 367.26 310.56 367.34 311.25 353.11 330.86 328.76 333.78 330.7 329.04 329.36 325.27 325.27 319.41 325.26 319.39 323.55 313.14 321.88 294.02 319.91 287.69 320.33 282.74 320.24 265.1 319.34 262.3 314.43 258.21 314.32 257.08 315.86 248.56 320.67 229.24 323.14 219.32 330.63 210.11 335.54 205.47 335.81 199.91 401.68 192.38 405.66 227.09 412.32 250.53 445.17 261.59 442.97 266.15 435.94 279.33 400.39 300.04 404.4 314.67 Z", + fill: 'fill-emerald-500', + hoverFill: 'fill-emerald-700' + }, + { + id: 'bennington', + name: 'Bennington County', + slug: 'bennington', + image: '/images/counties/vermont/bennington.png', + pathD: "M 348.69 447.66 421.52 451.26 430.56 451.66 430.66 462.96 421.37 499.7 397.24 498.17 396.13 522.93 395.14 546.84 411.46 547.69 410.81 565.83 393.82 572.02 393.15 595.37 392.35 595.34 369.84 594.73 346.79 594.11 344.63 594.09 341.9 579.75 342.94 571.5 344.2 571.67 345 544.2 345.01 543.65 345.03 543.35 345.94 520.96 347.88 472.95 348.69 447.66 Z", + fill: 'fill-emerald-500', + hoverFill: 'fill-emerald-700' + }, + { + id: 'caledonia', + name: 'Caledonia County', + slug: 'caledonia', + image: '/images/counties/vermont/caledonia.png', + pathD: "M 576.97 228.05 552.84 219.01 527.48 221.35 515.56 215.86 542.79 157.85 503.14 136.35 514.34 115.74 535.39 126.78 563.34 71.94 582.54 85.4 596.2 66.8 615.52 80.68 601.78 99.11 614.49 108.59 602.08 125.53 611.88 138.97 597.45 153.48 613.23 175.05 584.46 184.11 582.6 185.02 573.81 194.27 572.57 196.64 572.13 198.28 572.79 220.11 574.91 225.35 576.97 228.05 Z", + fill: 'fill-emerald-500', + hoverFill: 'fill-emerald-700' + }, + { + id: 'chittenden', + name: 'Chittenden County', + slug: 'chittenden', + image: '/images/counties/vermont/chittenden.png', + pathD: "M 410.94 102.81 432.55 125.31 433.37 150.71 429.39 175.07 423.84 173.4 413.34 195.44 416.24 196.89 405.66 227.09 401.68 192.38 335.81 199.91 337.36 167.35 340.94 156.86 341.39 154.07 340.21 144.12 338.93 137.87 332.92 125.59 329.5 122.67 328.53 121.31 352.76 98.38 353.58 79.03 389.5 98.02 410.94 102.81 Z", + fill: 'fill-emerald-500', + hoverFill: 'fill-emerald-700' + }, + { + id: 'essex', + name: 'Essex County', + slug: 'essex', + image: '/images/counties/vermont/essex.png', + pathD: "M 596.2 66.8 589.72 62.16 608.53 38.31 598.35 30.09 604.16 2.99 628.66 2.39 678.54 1.88 685.68 1.8 684.92 2.71 681.56 3.57 678.06 3.27 673.34 5.53 672.05 6.99 671.74 8.58 671.89 9.61 675.84 19.38 680.14 29.03 679.79 30.71 665.36 55.91 655.68 70.48 655.03 72.49 655.42 77.22 660.44 85.62 669 104.5 672.18 114.73 663.9 136.24 660.28 141.53 645.13 156.97 639.68 161.27 632.89 163.97 630.8 162.64 629.7 162.48 629.21 162.64 623.68 164.52 619.83 169.09 619.51 173.07 613.23 175.05 597.45 153.48 611.88 138.97 602.08 125.53 614.49 108.59 601.78 99.11 615.52 80.68 596.2 66.8 Z", + fill: 'fill-emerald-500', + hoverFill: 'fill-emerald-700' + }, + { + id: 'franklin', + name: 'Franklin County', + slug: 'franklin', + image: '/images/counties/vermont/franklin.png', + pathD: "M 476.06 63.47 444.21 62.25 436.92 77.74 435.44 85.25 435.15 87.15 424.69 82.16 410.94 102.81 389.5 98.02 353.58 79.03 348.41 69.34 360.14 35.53 360.65 30.77 354.07 26.85 353.22 24.74 360.53 1.82 380.48 1.31 393.73 1.42 393.88 1.45 425.72 1 457.88 1.32 480.56 2.3 484.63 49.73 476.06 63.47 Z", + fill: 'fill-emerald-500', + hoverFill: 'fill-emerald-700' + }, + { + id: 'grandisle', + name: 'Grand Isle County', + slug: 'grandisle', + image: '/images/counties/vermont/grandisle.png', + pathD: "M 353.58 79.03 352.76 98.38 328.53 121.31 326.19 118.03 323.21 106.69 327.89 84.21 332.67 64.18 327.08 50.85 329 27.86 330.74 6.95 332.07 2.55 360.53 1.82 353.22 24.74 354.07 26.85 360.65 30.77 360.14 35.53 348.41 69.34 353.58 79.03 Z", + fill: 'fill-emerald-500', + hoverFill: 'fill-emerald-700' + }, + { + id: 'lamoille', + name: 'Lamoille County', + slug: 'lamoille', + image: '/images/counties/vermont/lamoille.png', + pathD: "M 476.06 63.47 506.34 79.02 494.11 102.57 514.34 115.74 503.14 136.35 492.55 157.56 472.55 143.42 461.71 164.79 440.73 153.1 433.37 150.71 432.55 125.31 410.94 102.81 424.69 82.16 435.15 87.15 435.44 85.25 436.92 77.74 444.21 62.25 476.06 63.47 Z", + fill: 'fill-emerald-500', + hoverFill: 'fill-emerald-700' + }, + { + id: 'orange', + name: 'Orange County', + slug: 'orange', + image: '/images/counties/vermont/orange.png', + pathD: "M 435.94 279.33 442.97 266.15 445.17 261.59 456.18 265.96 465.4 245.93 466.51 246.14 473.96 227.35 501.5 235.65 505.88 211.42 515.56 215.86 527.48 221.35 552.84 219.01 576.97 228.05 577.35 228.54 574.6 239.98 567.82 260.13 563.66 272.49 563.61 276.47 564.74 277.33 565.01 280.07 565.24 282.29 562.11 290.54 553.41 299.12 550.59 312.72 550.3 319.86 546.34 328.92 546.17 329.12 545.88 328.95 498.28 311.61 490.96 308.49 490.87 308.45 476.76 302.46 437.47 287.93 435.94 279.33 Z", + fill: 'fill-emerald-500', + hoverFill: 'fill-emerald-700' + }, + { + id: 'orleans', + name: 'Orleans County', + slug: 'orleans', + image: '/images/counties/vermont/orleans.png', + pathD: "M 476.06 63.47 484.63 49.73 480.56 2.3 520.43 4.01 565.49 3.94 604.16 2.99 598.35 30.09 608.53 38.31 589.72 62.16 596.2 66.8 582.54 85.4 563.34 71.94 535.39 126.78 514.34 115.74 494.11 102.57 506.34 79.02 476.06 63.47 Z", + fill: 'fill-emerald-500', + hoverFill: 'fill-emerald-700' + }, + { + id: 'rutland', + name: 'Rutland County', + slug: 'rutland', + image: '/images/counties/vermont/rutland.png', + pathD: "M 421.52 451.26 348.69 447.66 349.02 437.3 349.07 435.02 349.1 433.26 349.12 433.08 350.16 395.77 351.1 390.57 350.43 389.19 339.71 366.99 339.02 366.38 327.67 367.57 325.96 370.2 321.31 381.75 315.98 377.83 315.49 376.71 317.3 361.56 319.73 354.42 320.71 351.55 326.88 338.39 328.76 333.78 353.11 330.86 367.34 311.25 367.26 310.56 391.02 309.41 390.62 309.93 391.61 310.61 393.49 320.31 398.65 317.79 404.4 314.67 420.27 306.43 427.31 342.48 452.95 352.12 435.99 400.94 439.66 405.38 448.01 407.76 441.87 437.44 424.25 433.06 421.52 451.26 Z", + fill: 'fill-emerald-500', + hoverFill: 'fill-emerald-700' + }, + { + id: 'washington', + name: 'Washington County', + slug: 'washington', + image: '/images/counties/vermont/washington.png', + pathD: "M 433.37 150.71 440.73 153.1 461.71 164.79 472.55 143.42 492.55 157.56 503.14 136.35 542.79 157.85 515.56 215.86 505.88 211.42 501.5 235.65 473.96 227.35 466.51 246.14 465.4 245.93 456.18 265.96 445.17 261.59 412.32 250.53 405.66 227.09 416.24 196.89 413.34 195.44 423.84 173.4 429.39 175.07 433.37 150.71 Z", + fill: 'fill-emerald-500', + hoverFill: 'fill-emerald-700' + }, + { + id: 'windham', + name: 'Windham County', + slug: 'windham', + image: '/images/counties/vermont/windham.png', + pathD: "M 393.15 595.37 393.82 572.02 410.81 565.83 411.46 547.69 395.14 546.84 396.13 522.93 397.24 498.17 421.37 499.7 430.66 462.96 455.83 471.49 503.73 469.09 502.18 474.37 499.79 487.26 501.71 493.65 503.37 497.93 503.45 499.47 501.36 527.25 480.19 563.06 480.21 563.24 480.28 565.32 480.29 565.78 482.72 578.07 488.99 585.07 492.45 587.31 494.83 589.92 498.27 597.66 498.58 599 422.23 596.37 410.35 595.96 409.78 595.94 393.15 595.37 Z", + fill: 'fill-emerald-500', + hoverFill: 'fill-emerald-700' + }, + { + id: 'windsor', + name: 'Windsor County', + slug: 'windsor', + image: '/images/counties/vermont/windsor.png', + pathD: "M 404.4 314.67 400.39 300.04 435.94 279.33 437.47 287.93 476.76 302.46 490.87 308.45 490.96 308.49 498.28 311.61 545.88 328.95 546.17 329.12 541.09 335.08 535.15 338.76 533.85 338.76 527.88 346.95 522.84 364.66 521.95 368.66 521.88 369.89 522.85 373.62 510.38 394.3 511.92 399 511.88 407.02 510.18 418.06 510.17 418.07 508.61 428.16 508.85 436.42 509.5 441.86 510.13 447.18 503.73 469.09 455.83 471.49 430.66 462.96 430.56 451.66 421.52 451.26 424.25 433.06 441.87 437.44 448.01 407.76 439.66 405.38 435.99 400.94 452.95 352.12 427.31 342.48 420.27 306.43 404.4 314.67 Z", + fill: 'fill-emerald-500', + hoverFill: 'fill-emerald-700' + } +]; + +export const mapViewBox: string = "890 20 95 155"; + +/** + * SVG transform string to apply to the group of states to straighten the map. + * Format: "rotate(angle cx cy)" + * - angle: degrees to rotate (negative for counter-clockwise) + * - cx: x-coordinate of the center of rotation + * - cy: y-coordinate of the center of rotation + * + * You'll need to experiment with these values. + * The approximate center of your current viewBox (890 65 85 110) is: + * cx = 890 + (85 / 2) = 932.5 + * cy = 65 + (110 / 2) = 120 + */ +// export const mapTransform: string = "rotate(-2 932.5 120)"; // Example: Rotate -2 degrees around center +export const mapTransform: string | undefined = undefined; // Start with no transform +// Try uncommenting the line above and adjusting the -2, 932.5, and 120 values. +// For example, if it's tilted 5 degrees clockwise, try "rotate(-5 932.5 120)" +// If it's tilted 3 degrees counter-clockwise, try "rotate(3 932.5 120)"