├── .eslintignore ├── .eslintrc ├── .gitattributes ├── .github └── workflows │ ├── ci.yaml │ └── release.yaml ├── .gitignore ├── .prettierignore ├── .prettierrc ├── LICENSE ├── README.md ├── docs ├── .gitignore ├── README.md ├── gatsby-config.ts ├── package-lock.json ├── package.json ├── src │ ├── @types │ │ └── styled.d.ts │ ├── components │ │ ├── Container.tsx │ │ ├── Example │ │ │ ├── index.tsx │ │ │ └── styled.ts │ │ ├── Layout │ │ │ ├── index.tsx │ │ │ └── styled.ts │ │ ├── Markdown.tsx │ │ ├── Seo.tsx │ │ ├── Stargazers │ │ │ ├── GithubIcon.tsx │ │ │ ├── index.tsx │ │ │ └── styled.ts │ │ └── Theme │ │ │ ├── Reset.tsx │ │ │ ├── index.tsx │ │ │ └── system.ts │ ├── images │ │ └── world-map.png │ └── pages │ │ ├── 404.tsx │ │ ├── component-props.tsx │ │ ├── converter.tsx │ │ ├── examples.tsx │ │ ├── index.tsx │ │ └── maps.tsx ├── static │ └── maps │ │ ├── andorra.json │ │ ├── angola.json │ │ ├── argentina.json │ │ ├── armenia.json │ │ ├── australia.json │ │ ├── austria.json │ │ ├── azerbaijan.json │ │ ├── bahamas.json │ │ ├── bahrain.json │ │ ├── bangladesh.json │ │ ├── belarus.json │ │ ├── belgium.json │ │ ├── bhutan.json │ │ ├── bolivia.json │ │ ├── bosnia-herzegovina-2.json │ │ ├── bosnia-herzegovina.json │ │ ├── botswana.json │ │ ├── brazil.json │ │ ├── brunei-darussalam.json │ │ ├── bulgaria.json │ │ ├── burkina-faso.json │ │ ├── burundi.json │ │ ├── cambodia.json │ │ ├── cameroon.json │ │ ├── canada.json │ │ ├── cape-verde.json │ │ ├── central-african-republic.json │ │ ├── chad.json │ │ ├── chile-2.json │ │ ├── chile.json │ │ ├── china.json │ │ ├── colombia.json │ │ ├── congo-dr.json │ │ ├── congo.json │ │ ├── costa-rica.json │ │ ├── croatia.json │ │ ├── cuba.json │ │ ├── cyprus.json │ │ ├── czech-republic.json │ │ ├── denmark.json │ │ ├── djibouti.json │ │ ├── dominican-republic.json │ │ ├── ecuador.json │ │ ├── egypt.json │ │ ├── el-salvador.json │ │ ├── empty.json │ │ ├── estonia.json │ │ ├── ethiopia.json │ │ ├── faroeIslands.json │ │ ├── finland.json │ │ ├── france-departments.json │ │ ├── france-new.json │ │ ├── france.json │ │ ├── georgia.json │ │ ├── germany.json │ │ ├── greece.json │ │ ├── guatemala.json │ │ ├── guinea.json │ │ ├── haiti.json │ │ ├── honduras.json │ │ ├── hong-kong.json │ │ ├── hungary.json │ │ ├── iceland.json │ │ ├── india.json │ │ ├── indonesia.json │ │ ├── iran.json │ │ ├── iraq.json │ │ ├── ireland.json │ │ ├── israel.json │ │ ├── italy.json │ │ ├── jamaica.json │ │ ├── japan.json │ │ ├── kazakhstan.json │ │ ├── kenya.json │ │ ├── kosovo.json │ │ ├── kyrgyzstan.json │ │ ├── laos.json │ │ ├── latvia.json │ │ ├── liechtenstein.json │ │ ├── lithuania.json │ │ ├── luxembourg.json │ │ ├── macedonia.json │ │ ├── malaysia.json │ │ ├── mali.json │ │ ├── malta.json │ │ ├── mexico.json │ │ ├── moldova.json │ │ ├── montenegro.json │ │ ├── morocco.json │ │ ├── myanmar.json │ │ ├── nepal.json │ │ ├── netherlands.json │ │ ├── new-zealand-2.json │ │ ├── new-zealand.json │ │ ├── nicaragua.json │ │ ├── nigeria.json │ │ ├── norway.json │ │ ├── oman.json │ │ ├── pakistan.json │ │ ├── palestine.json │ │ ├── panama.json │ │ ├── paraguay.json │ │ ├── philippines.json │ │ ├── poland.json │ │ ├── portugal-regions.json │ │ ├── portugal.json │ │ ├── qatar.json │ │ ├── romania.json │ │ ├── russia.json │ │ ├── rwanda.json │ │ ├── san-marino.json │ │ ├── saudi-arabia.json │ │ ├── serbia-without-kosovo.json │ │ ├── serbia.json │ │ ├── sierra-leone.json │ │ ├── singapore.json │ │ ├── slovakia.json │ │ ├── slovenia.json │ │ ├── south-africa-2.json │ │ ├── south-africa.json │ │ ├── south-korea.json │ │ ├── spain-provinces.json │ │ ├── spain.json │ │ ├── sri-lanka.json │ │ ├── sweden.json │ │ ├── switzerland.json │ │ ├── syria.json │ │ ├── taiwan.json │ │ ├── tajikistan.json │ │ ├── thailand.json │ │ ├── turkey.json │ │ ├── uganda.json │ │ ├── ukraine.json │ │ ├── united-arab-emirates.json │ │ ├── united-kingdom-counties.json │ │ ├── united-kingdom.json │ │ ├── uruguay.json │ │ ├── usa-ak.json │ │ ├── usa-al.json │ │ ├── usa-ar.json │ │ ├── usa-az.json │ │ ├── usa-ca.json │ │ ├── usa-co.json │ │ ├── usa-ct.json │ │ ├── usa-de.json │ │ ├── usa-fl.json │ │ ├── usa-ga.json │ │ ├── usa-hi.json │ │ ├── usa-ia.json │ │ ├── usa-id.json │ │ ├── usa-il.json │ │ ├── usa-in.json │ │ ├── usa-ks.json │ │ ├── usa-ky.json │ │ ├── usa-la.json │ │ ├── usa-ma.json │ │ ├── usa-md.json │ │ ├── usa-me.json │ │ ├── usa-mi.json │ │ ├── usa-mn.json │ │ ├── usa-mo.json │ │ ├── usa-ms.json │ │ ├── usa-mt.json │ │ ├── usa-nc.json │ │ ├── usa-nd.json │ │ ├── usa-ne.json │ │ ├── usa-nh.json │ │ ├── usa-nj.json │ │ ├── usa-nm.json │ │ ├── usa-not-calibrated.json │ │ ├── usa-nv.json │ │ ├── usa-ny.json │ │ ├── usa-oh.json │ │ ├── usa-ok.json │ │ ├── usa-or.json │ │ ├── usa-pa.json │ │ ├── usa-ri.json │ │ ├── usa-sc.json │ │ ├── usa-sd.json │ │ ├── usa-tn.json │ │ ├── usa-tx.json │ │ ├── usa-ut.json │ │ ├── usa-va.json │ │ ├── usa-vt.json │ │ ├── usa-wa.json │ │ ├── usa-wdc.json │ │ ├── usa-wi.json │ │ ├── usa-with-AK-HI.json │ │ ├── usa-wv.json │ │ ├── usa-wy.json │ │ ├── usa.json │ │ ├── uzbekistan.json │ │ ├── venezuela.json │ │ ├── vietnam-with-islands.json │ │ ├── vietnam.json │ │ ├── world-low-res.json │ │ ├── world.json │ │ └── yemen.json └── tsconfig.json ├── jest.config.js ├── lib └── react-shim.js ├── maps ├── convert-svgs._test.js ├── convert-svgs.js ├── run.js ├── summary.json └── svg │ ├── andorra.svg │ ├── angola.svg │ ├── argentina.svg │ ├── armenia.svg │ ├── australia.svg │ ├── austria.svg │ ├── azerbaijan.svg │ ├── bahamas.svg │ ├── bahrain.svg │ ├── bangladesh.svg │ ├── belarus.svg │ ├── belgium.svg │ ├── bhutan.svg │ ├── bolivia.svg │ ├── bosnia-herzegovina-2.svg │ ├── bosnia-herzegovina.svg │ ├── botswana.svg │ ├── brazil.svg │ ├── brunei-darussalam.svg │ ├── bulgaria.svg │ ├── burkina-faso.svg │ ├── burundi.svg │ ├── cambodia.svg │ ├── cameroon.svg │ ├── canada.svg │ ├── cape-verde.svg │ ├── central-african-republic.svg │ ├── chad.svg │ ├── chile-2.svg │ ├── chile.svg │ ├── china.svg │ ├── colombia.svg │ ├── congo-dr.svg │ ├── congo.svg │ ├── costa-rica.svg │ ├── croatia.svg │ ├── cuba.svg │ ├── cyprus.svg │ ├── czech-republic.svg │ ├── denmark.svg │ ├── djibouti.svg │ ├── dominican-republic.svg │ ├── ecuador.svg │ ├── egypt.svg │ ├── el-salvador.svg │ ├── empty.svg │ ├── estonia.svg │ ├── ethiopia.svg │ ├── faroeIslands.svg │ ├── finland.svg │ ├── france-departments.svg │ ├── france-new.svg │ ├── france.svg │ ├── georgia.svg │ ├── germany.svg │ ├── greece.svg │ ├── guatemala.svg │ ├── guinea.svg │ ├── haiti.svg │ ├── honduras.svg │ ├── hong-kong.svg │ ├── hungary.svg │ ├── iceland.svg │ ├── india.svg │ ├── indonesia.svg │ ├── iran.svg │ ├── iraq.svg │ ├── ireland.svg │ ├── israel.svg │ ├── italy.svg │ ├── jamaica.svg │ ├── japan.svg │ ├── kazakhstan.svg │ ├── kenya.svg │ ├── kosovo.svg │ ├── kyrgyzstan.svg │ ├── laos.svg │ ├── latvia.svg │ ├── liechtenstein.svg │ ├── lithuania.svg │ ├── luxembourg.svg │ ├── macedonia.svg │ ├── malaysia.svg │ ├── mali.svg │ ├── malta.svg │ ├── mexico.svg │ ├── moldova.svg │ ├── montenegro.svg │ ├── morocco.svg │ ├── myanmar.svg │ ├── nepal.svg │ ├── netherlands.svg │ ├── new-zealand-2.svg │ ├── new-zealand.svg │ ├── nicaragua.svg │ ├── nigeria.svg │ ├── norway.svg │ ├── oman.svg │ ├── pakistan.svg │ ├── palestine.svg │ ├── panama.svg │ ├── paraguay.svg │ ├── philippines.svg │ ├── poland.svg │ ├── portugal-regions.svg │ ├── portugal.svg │ ├── qatar.svg │ ├── romania.svg │ ├── russia.svg │ ├── rwanda.svg │ ├── san-marino.svg │ ├── saudi-arabia.svg │ ├── serbia-without-kosovo.svg │ ├── serbia.svg │ ├── sierra-leone.svg │ ├── singapore.svg │ ├── slovakia.svg │ ├── slovenia.svg │ ├── south-africa-2.svg │ ├── south-africa.svg │ ├── south-korea.svg │ ├── spain-provinces.svg │ ├── spain.svg │ ├── sri-lanka.svg │ ├── sweden.svg │ ├── switzerland.svg │ ├── syria.svg │ ├── taiwan.svg │ ├── tajikistan.svg │ ├── thailand.svg │ ├── turkey.svg │ ├── uganda.svg │ ├── ukraine.svg │ ├── united-arab-emirates.svg │ ├── united-kingdom-counties.svg │ ├── united-kingdom.svg │ ├── uruguay.svg │ ├── usa-ak.svg │ ├── usa-al.svg │ ├── usa-ar.svg │ ├── usa-az.svg │ ├── usa-ca.svg │ ├── usa-co.svg │ ├── usa-ct.svg │ ├── usa-de.svg │ ├── usa-fl.svg │ ├── usa-ga.svg │ ├── usa-hi.svg │ ├── usa-ia.svg │ ├── usa-id.svg │ ├── usa-il.svg │ ├── usa-in.svg │ ├── usa-ks.svg │ ├── usa-ky.svg │ ├── usa-la.svg │ ├── usa-ma.svg │ ├── usa-md.svg │ ├── usa-me.svg │ ├── usa-mi.svg │ ├── usa-mn.svg │ ├── usa-mo.svg │ ├── usa-ms.svg │ ├── usa-mt.svg │ ├── usa-nc.svg │ ├── usa-nd.svg │ ├── usa-ne.svg │ ├── usa-nh.svg │ ├── usa-nj.svg │ ├── usa-nm.svg │ ├── usa-not-calibrated.svg │ ├── usa-nv.svg │ ├── usa-ny.svg │ ├── usa-oh.svg │ ├── usa-ok.svg │ ├── usa-or.svg │ ├── usa-pa.svg │ ├── usa-ri.svg │ ├── usa-sc.svg │ ├── usa-sd.svg │ ├── usa-tn.svg │ ├── usa-tx.svg │ ├── usa-ut.svg │ ├── usa-va.svg │ ├── usa-vt.svg │ ├── usa-wa.svg │ ├── usa-wdc.svg │ ├── usa-wi.svg │ ├── usa-with-AK-HI.svg │ ├── usa-wv.svg │ ├── usa-wy.svg │ ├── usa.svg │ ├── uzbekistan.svg │ ├── venezuela.svg │ ├── vietnam-with-islands.svg │ ├── vietnam.svg │ ├── world-low-res.svg │ ├── world.svg │ └── yemen.svg ├── package-lock.json ├── package.json ├── src ├── VectorMap.test.tsx ├── VectorMap.tsx └── index.ts ├── test └── setupJest.ts ├── tsconfig.json └── tsup.config.ts /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | coverage 4 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "airbnb", 4 | "airbnb-typescript", 5 | "airbnb/hooks", 6 | "plugin:@typescript-eslint/recommended", 7 | "plugin:prettier/recommended", 8 | "plugin:jest/recommended" 9 | ], 10 | "parserOptions": { 11 | "project": "./tsconfig.json" 12 | }, 13 | "rules": { 14 | "import/no-relative-packages": "off", 15 | "react/jsx-props-no-spreading": "off", 16 | "react/react-in-jsx-scope": "off", 17 | "react/require-default-props": "off" 18 | }, 19 | "overrides": [ 20 | { 21 | "files": ["tsup.config.ts"], 22 | "rules": { "import/no-extraneous-dependencies": "off" } 23 | } 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Common .gitattributes file courtesy of 2 | # https://github.com/alexkaratarakis/gitattributes/blob/master/Common.gitattributes 3 | 4 | # Auto detect text files and perform LF normalization 5 | * text=auto eol=lf 6 | 7 | # The above will handle all files NOT found below 8 | 9 | # Documents 10 | *.pdf diff=astextplain 11 | *.PDF diff=astextplain 12 | *.rtf diff=astextplain 13 | *.RTF diff=astextplain 14 | *.md text 15 | 16 | # Graphics 17 | *.png binary 18 | *.jpg binary 19 | *.jpeg binary 20 | *.gif binary 21 | *.tif binary 22 | *.tiff binary 23 | *.ico binary 24 | # SVG treated as an asset (binary) by default. 25 | *.svg binary 26 | #*.svg text 27 | *.eps binary 28 | -------------------------------------------------------------------------------- /.github/workflows/ci.yaml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches-ignore: 6 | - "master" 7 | tags-ignore: 8 | - "*.*.*" 9 | jobs: 10 | lint: 11 | name: Lint 12 | runs-on: ubuntu-latest 13 | steps: 14 | - name: Checkout repository 15 | uses: actions/checkout@v2 16 | 17 | - name: Setup Node 18 | uses: actions/setup-node@v2 19 | with: 20 | node-version: "18" 21 | cache: "npm" 22 | 23 | - name: Install dependencies 24 | run: npm ci 25 | 26 | - name: Lint 27 | run: npm run lint 28 | 29 | test: 30 | name: Test 31 | runs-on: ubuntu-latest 32 | steps: 33 | - name: Checkout repository 34 | uses: actions/checkout@v2 35 | 36 | - name: Setup Node 37 | uses: actions/setup-node@v2 38 | with: 39 | node-version: "18" 40 | cache: "npm" 41 | 42 | - name: Install dependencies 43 | run: npm ci 44 | 45 | - name: Test 46 | run: npm run test 47 | env: 48 | CI: true 49 | 50 | build: 51 | name: Build 52 | runs-on: ubuntu-latest 53 | steps: 54 | - name: Checkout repository 55 | uses: actions/checkout@v2 56 | 57 | - name: Setup Node 58 | uses: actions/setup-node@v2 59 | with: 60 | node-version: "18" 61 | cache: "npm" 62 | 63 | - name: Install dependencies 64 | run: npm ci 65 | 66 | - name: Build Package 67 | run: npm run build 68 | 69 | deploy-draft: 70 | name: Deploy draft to Netlify 71 | runs-on: ubuntu-latest 72 | steps: 73 | - name: Start deployment 74 | uses: bobheadxi/deployments@v1 75 | id: deployment 76 | with: 77 | env: draft 78 | step: start 79 | 80 | - name: Checkout repository 81 | uses: actions/checkout@v2 82 | 83 | - name: Setup Node 84 | uses: actions/setup-node@v2 85 | with: 86 | node-version: "18" 87 | cache: "npm" 88 | 89 | - name: Install dependencies 90 | run: npm ci 91 | 92 | - name: Install docs dependencies 93 | run: npm run docs:install 94 | 95 | - name: Build docs 96 | run: npm run docs:build 97 | 98 | - name: Deploy draft to Netlify 99 | uses: South-Paw/action-netlify-cli@v1 100 | id: netlify 101 | with: 102 | args: deploy --json --dir './docs/public' --message 'draft [${{ github.sha }}]' 103 | env: 104 | NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} 105 | NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} 106 | 107 | - name: Finish deployment 108 | uses: bobheadxi/deployments@v1 109 | if: always() 110 | with: 111 | env: ${{ steps.deployment.outputs.env }} 112 | step: finish 113 | status: ${{ job.status }} 114 | deployment_id: ${{ steps.deployment.outputs.deployment_id }} 115 | env_url: ${{ steps.netlify.outputs.NETLIFY_DRAFT_URL }} 116 | -------------------------------------------------------------------------------- /.github/workflows/release.yaml: -------------------------------------------------------------------------------- 1 | name: Release 2 | 3 | on: 4 | push: 5 | tags: 6 | - "*.*.*" 7 | 8 | jobs: 9 | deploy: 10 | name: Publish release to Netlify 11 | runs-on: ubuntu-latest 12 | steps: 13 | - name: Start deployment 14 | uses: bobheadxi/deployments@v1 15 | id: deployment 16 | with: 17 | env: production 18 | step: start 19 | 20 | - name: Checkout repository 21 | uses: actions/checkout@v2 22 | 23 | - name: Setup Node 24 | uses: actions/setup-node@v2 25 | with: 26 | node-version: "18" 27 | cache: "npm" 28 | 29 | - name: Install dependencies 30 | run: npm ci 31 | 32 | - name: Install docs dependencies 33 | run: npm run docs:install 34 | 35 | - name: Build docs 36 | run: npm run docs:build 37 | 38 | - name: Deploy to Netlify 39 | uses: South-Paw/action-netlify-cli@v1 40 | id: netlify 41 | with: 42 | args: deploy --json --prod --dir './docs/public' --message 'release [${{ github.sha }}]' 43 | env: 44 | NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} 45 | NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} 46 | 47 | - name: Finish deployment 48 | uses: bobheadxi/deployments@v1 49 | if: always() 50 | with: 51 | env: ${{ steps.deployment.outputs.env }} 52 | step: finish 53 | status: ${{ job.status }} 54 | deployment_id: ${{ steps.deployment.outputs.deployment_id }} 55 | env_url: ${{ steps.netlify.outputs.NETLIFY_PROD_URL }} 56 | 57 | publish: 58 | name: Publish package to npm 59 | runs-on: ubuntu-latest 60 | steps: 61 | - name: Checkout repository 62 | uses: actions/checkout@v2 63 | 64 | - name: Setup Node 65 | uses: actions/setup-node@v2 66 | with: 67 | node-version: "18" 68 | cache: "npm" 69 | 70 | - name: Install dependencies 71 | run: npm ci 72 | 73 | - name: Build package 74 | run: npm run build 75 | 76 | - name: Publish package 77 | uses: JS-DevTools/npm-publish@v1 78 | with: 79 | token: ${{ secrets.NPM_TOKEN }} 80 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | .DS_Store 3 | node_modules 4 | .cache 5 | dist 6 | coverage 7 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | coverage 4 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "endOfLine": "lf", 3 | "printWidth": 120, 4 | "singleQuote": true, 5 | "trailingComma": "all" 6 | } 7 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2018 Alex Gabites 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # react-vector-maps 2 | 3 | 🗺️ A React component for interactive vector maps of the world and 100+ countries 4 | 5 | [![npm](https://img.shields.io/npm/v/@south-paw/react-vector-maps.svg)](https://www.npmjs.com/package/@south-paw/react-vector-maps) 6 | 7 | ## Features 8 | 9 | - Simple and easy to implement React component for rendering interactive vector maps 10 | - [100+ vector maps included](https://react-vector-maps.netlify.com/maps) out of the box, free from [MapSVG](https://mapsvg.com/maps) 11 | - Convert your own vector map for the component to use with the [online converter](https://react-vector-maps.netlify.com/converter) 12 | - Quick and straight forward to style your map however you want to 13 | 14 | ## Basic Usage 15 | 16 | ```jsx 17 | import React from 'react'; 18 | import { VectorMap } from '@south-paw/react-vector-maps'; 19 | 20 | // You'll need to download the json file from the docs site or you can create your own. 21 | import world from './world.json'; 22 | 23 | export const Map = () => ; 24 | ``` 25 | 26 | See the [documentation](https://react-vector-maps.netlify.com/) for more examples and advanced usage of the component. 27 | 28 | ## Issues and Bugs 29 | 30 | If you manage to find any, please report them [here](https://github.com/South-Paw/react-vector-maps/issues) so they can be squashed. 31 | 32 | ## Development and Contributing 33 | 34 | Grab the repo and then install dependencies with `npm i`. 35 | 36 | ```bash 37 | # Run TypeScript check and ESLint 38 | npm run lint 39 | 40 | # Run unit tests 41 | npm run test 42 | 43 | # Build package for publishing (/dist) 44 | npm run build 45 | 46 | # Remove build artifacts (/dist and /coverage) 47 | npm run clean 48 | 49 | # npm install for the docs 50 | npm run docs:install 51 | 52 | # Start docs for development 53 | npm run docs:start 54 | 55 | # Build docs for deployment 56 | npm run docs:build 57 | 58 | # Serve docs from /public after build 59 | npm run docs:serve 60 | 61 | # Clean up docs folders 62 | npm run docs:clean 63 | ``` 64 | 65 | ## License 66 | 67 | MIT, see the [LICENSE](./LICENSE) file. 68 | -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .cache/ 3 | public 4 | src/gatsby-types.d.ts 5 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | # react-vector-maps-docs 2 | 3 | Gatsby documentation site for [@south-paw/react-vector-maps](https://github.com/South-Paw/react-vector-maps). 4 | 5 | Inspired by the [react-select](https://github.com/JedWatson/react-select/tree/master/docs) documentation site. 6 | -------------------------------------------------------------------------------- /docs/gatsby-config.ts: -------------------------------------------------------------------------------- 1 | import type { GatsbyConfig } from 'gatsby'; 2 | 3 | const config: GatsbyConfig = { 4 | siteMetadata: { 5 | title: 'React Vector Maps', 6 | siteUrl: 'https://react-vector-maps.netlify.app', 7 | }, 8 | plugins: [ 9 | 'gatsby-plugin-styled-components', 10 | 'gatsby-transformer-json', 11 | { 12 | resolve: 'gatsby-source-filesystem', 13 | options: { 14 | path: `${__dirname}/static/maps`, 15 | }, 16 | }, 17 | { 18 | resolve: 'gatsby-plugin-manifest', 19 | options: { 20 | name: 'React Vector Maps', 21 | short_name: 'React Vector Maps', 22 | start_url: '/', 23 | background_color: '#ffffff', 24 | theme_color: '#a82b2b', 25 | display: 'minimal-ui', 26 | icon: 'src/images/world-map.png', 27 | }, 28 | }, 29 | ], 30 | graphqlTypegen: true, 31 | }; 32 | 33 | export default config; 34 | -------------------------------------------------------------------------------- /docs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@south-paw/react-vector-maps-docs", 3 | "version": "1.0.0", 4 | "description": "", 5 | "keywords": [], 6 | "homepage": "https://react-vector-maps.netlify.com", 7 | "bugs": "https://github.com/South-Paw/react-vector-maps/issues", 8 | "author": { 9 | "name": "Alex Gabites", 10 | "email": "hello@southpaw.co.nz", 11 | "url": "http://southpaw.co.nz/" 12 | }, 13 | "repository": { 14 | "type": "git", 15 | "url": "https://github.com/South-Paw/react-vector-maps.git" 16 | }, 17 | "scripts": { 18 | "start": "gatsby develop", 19 | "build": "gatsby build", 20 | "serve": "gatsby serve", 21 | "clean": "gatsby clean" 22 | }, 23 | "dependencies": { 24 | "@tanstack/react-query": "^4.7.2", 25 | "babel-plugin-styled-components": "^2.0.7", 26 | "gatsby": "^4.24.0", 27 | "gatsby-plugin-manifest": "^4.24.0", 28 | "gatsby-plugin-styled-components": "^5.24.0", 29 | "gatsby-source-filesystem": "^4.24.0", 30 | "gatsby-transformer-json": "^4.24.0", 31 | "polished": "^4.2.2", 32 | "react": "^18.1.0", 33 | "react-dom": "^18.1.0", 34 | "react-dropzone": "^14.2.2", 35 | "react-live": "^2.4.1", 36 | "react-markdown": "^8.0.3", 37 | "react-uid": "^2.3.2", 38 | "styled-components": "^5.3.6", 39 | "styled-normalize": "^8.0.7", 40 | "svgson": "^5.2.1" 41 | }, 42 | "devDependencies": { 43 | "@types/node": "^17.0.45", 44 | "@types/react": "^18.0.21", 45 | "@types/react-dom": "^18.0.6", 46 | "@types/styled-components": "^5.1.26", 47 | "typescript": "^4.8.3" 48 | }, 49 | "private": true 50 | } 51 | -------------------------------------------------------------------------------- /docs/src/@types/styled.d.ts: -------------------------------------------------------------------------------- 1 | import 'styled-components'; 2 | import { system } from '../components/Theme/system'; 3 | 4 | type System = typeof system; 5 | 6 | declare module 'styled-components' { 7 | export interface DefaultTheme extends System {} 8 | } 9 | -------------------------------------------------------------------------------- /docs/src/components/Container.tsx: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | export const Container = styled.div` 4 | margin-left: auto; 5 | margin-right: auto; 6 | max-width: 832px; 7 | padding: 0px 16px; 8 | `; 9 | -------------------------------------------------------------------------------- /docs/src/components/Example/index.tsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from 'react'; 2 | import { LiveEditor, LiveError, LivePreview, LiveProvider, LiveProviderProps } from 'react-live'; 3 | import { Button, Editor, Error, Preview, StyledExample, Toolbar } from './styled'; 4 | 5 | export interface ExampleProps extends Omit { 6 | isOpen?: boolean; 7 | code: string; 8 | } 9 | 10 | export function Example({ isOpen = false, code, ...other }: ExampleProps) { 11 | const [showCode, setShowCode] = useState(isOpen); 12 | 13 | return ( 14 | 15 | 16 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | ); 40 | } 41 | -------------------------------------------------------------------------------- /docs/src/components/Example/styled.ts: -------------------------------------------------------------------------------- 1 | import { rgba } from 'polished'; 2 | import styled from 'styled-components'; 3 | 4 | export const StyledExample = styled.div` 5 | border: 4px solid ${(p) => rgba(p.theme.colors.dark, 0.13)}; 6 | border-top: none; 7 | `; 8 | 9 | export const Toolbar = styled.div` 10 | padding: 8px; 11 | display: flex; 12 | flex-flow: nowrap row; 13 | align-items: center; 14 | background-color: ${(p) => rgba(p.theme.colors.dark, 0.13)}; 15 | `; 16 | 17 | export const Button = styled.button` 18 | margin-left: auto; 19 | padding: 2px 6px; 20 | display: flex; 21 | flex-flow: nowrap row; 22 | align-items: center; 23 | background-color: ${(p) => p.theme.colors.white}; 24 | border: none; 25 | border-radius: 2px; 26 | box-shadow: 0 1px 2px ${(p) => rgba(p.theme.colors.black, 0.2)}; 27 | color: ${(p) => p.theme.colors.dark}; 28 | cursor: pointer; 29 | font-weight: 500; 30 | font-size: 12px 31 | 32 | :hover, 33 | :focus { 34 | box-shadow: 0 1px 0 ${(p) => rgba(p.theme.colors.black, 0.2)}, 0 2px 5px ${(p) => rgba(p.theme.colors.black, 0.2)}; 35 | color: ${(p) => p.theme.colors.gray}; 36 | text-decoration: none; 37 | } 38 | 39 | svg { 40 | margin-right: 4px; 41 | } 42 | `; 43 | 44 | export const Editor = styled.div<{ isOpen: boolean }>` 45 | background-color: ${(p) => p.theme.colors.dark}; 46 | height: auto; 47 | max-height: ${(p) => (p.isOpen ? '400px' : '0')}; 48 | caret-color: ${(p) => p.theme.colors.white}; 49 | opacity: ${(p) => (p.isOpen ? '1' : '0')}; 50 | overflow: auto; 51 | transition: max-height 0.6s ease-in-out, opacity 0.6s ease-in-out; 52 | `; 53 | 54 | export const Error = styled.div` 55 | background-color: #960e0e; 56 | color: ${(p) => p.theme.colors.white}; 57 | `; 58 | 59 | export const Preview = styled.div` 60 | border-top: 4px solid ${(p) => rgba(p.theme.colors.dark, 0.13)}; 61 | `; 62 | -------------------------------------------------------------------------------- /docs/src/components/Layout/index.tsx: -------------------------------------------------------------------------------- 1 | import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; 2 | import { Link } from 'gatsby'; 3 | import React, { PropsWithChildren, ReactNode } from 'react'; 4 | import { uid } from 'react-uid'; 5 | import { Container } from '../Container'; 6 | import { Theme } from '../Theme'; 7 | import { Footer, FooterInner, Header, Hero, Item, Main, Nav, NavInner } from './styled'; 8 | 9 | const items = [ 10 | { label: 'Home', to: '/' }, 11 | { label: 'Examples', to: '/examples' }, 12 | { label: 'Props', to: '/component-props' }, 13 | { label: 'Maps', to: '/maps' }, 14 | { label: 'Converter', to: '/converter' }, 15 | ]; 16 | 17 | const client = new QueryClient(); 18 | 19 | export interface LayoutProps extends PropsWithChildren { 20 | hero?: ReactNode; 21 | } 22 | 23 | export function Layout({ hero, children }: LayoutProps) { 24 | return ( 25 | 26 | 27 |
28 | 39 | {hero && ( 40 | 41 | {hero} 42 | 43 | )} 44 |
45 |
46 | {children} 47 |
48 | 61 |
62 |
63 | ); 64 | } 65 | -------------------------------------------------------------------------------- /docs/src/components/Layout/styled.ts: -------------------------------------------------------------------------------- 1 | import { rgba } from 'polished'; 2 | import styled from 'styled-components'; 3 | 4 | export const Header = styled.div` 5 | background-color: ${(p) => p.theme.colors.primary}; 6 | background-image: linear-gradient( 7 | 135deg, 8 | ${(p) => p.theme.colors.primary} 0%, 9 | ${(p) => p.theme.colors.secondary} 100% 10 | ); 11 | color: ${(p) => p.theme.colors.white}; 12 | `; 13 | 14 | export const Nav = styled.div` 15 | background-color: ${(p) => rgba(p.theme.colors.dark, 0.13)}; 16 | `; 17 | 18 | export const NavInner = styled.div` 19 | margin: 0 -16px; 20 | display: flex; 21 | flex-flow: nowrap row; 22 | align-items: center; 23 | overflow-x: auto; 24 | 25 | a { 26 | padding: 16px; 27 | color: ${(p) => p.theme.colors.white}; 28 | font-weight: 500; 29 | opacity: 0.7; 30 | text-decoration: none; 31 | 32 | &.active { 33 | color: ${(p) => p.theme.colors.white}; 34 | opacity: 1; 35 | text-decoration: none; 36 | } 37 | 38 | :hover, 39 | :focus { 40 | color: ${(p) => p.theme.colors.white}; 41 | opacity: 1; 42 | text-decoration: none; 43 | } 44 | } 45 | 46 | @media (max-width: 48em) { 47 | a { 48 | padding: 8px 16px; 49 | font-size: 14px; 50 | } 51 | } 52 | `; 53 | 54 | export const Hero = styled.div` 55 | padding: 32px 0; 56 | `; 57 | 58 | export const Main = styled.div` 59 | padding: 32px 0; 60 | min-height: 500px; 61 | background-color: ${(p) => p.theme.colors.white}; 62 | border-top: 4px solid ${(p) => rgba(p.theme.colors.dark, 0.13)}; 63 | `; 64 | 65 | export const Footer = styled.div` 66 | padding: 32px 0; 67 | border-top: 1px solid ${(p) => rgba(p.theme.colors.dark, 0.13)}; 68 | font-size: 14px; 69 | color: #4a4d50; 70 | `; 71 | 72 | export const FooterInner = styled.div` 73 | display: flex; 74 | flex-flow: nowrap row; 75 | 76 | @media (max-width: 48em) { 77 | flex-flow: nowrap column; 78 | } 79 | `; 80 | 81 | export const Item = styled.div<{ basis: number }>` 82 | margin: 0 8px; 83 | flex: 1 1 ${(p) => p.basis}%; 84 | 85 | &:first-child { 86 | margin-left: 0; 87 | } 88 | 89 | &:last-child { 90 | margin-right: 0; 91 | } 92 | 93 | @media (max-width: 48em) { 94 | margin: 0; 95 | margin-bottom: 8px; 96 | 97 | &:last-child { 98 | margin-bottom: 0; 99 | } 100 | } 101 | `; 102 | -------------------------------------------------------------------------------- /docs/src/components/Markdown.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactMarkdown from 'react-markdown'; 3 | import { ReactMarkdownOptions } from 'react-markdown/lib/react-markdown'; 4 | 5 | export function Markdown(props: ReactMarkdownOptions) { 6 | return ; 7 | } 8 | -------------------------------------------------------------------------------- /docs/src/components/Seo.tsx: -------------------------------------------------------------------------------- 1 | import { HeadProps } from 'gatsby'; 2 | import React from 'react'; 3 | 4 | import config from '../../gatsby-config'; 5 | 6 | export interface SeoProps extends HeadProps { 7 | title: string; 8 | description?: string; 9 | keywords?: string[]; 10 | } 11 | 12 | export function Seo({ location: { pathname }, title, description, keywords }: SeoProps) { 13 | const canonical = `${config.siteMetadata?.siteUrl as string}${pathname}`; 14 | 15 | return ( 16 | <> 17 | 18 | {title} · {config.siteMetadata?.title as string} 19 | 20 | {description && } 21 | {keywords && } 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ); 32 | } 33 | -------------------------------------------------------------------------------- /docs/src/components/Stargazers/GithubIcon.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export function GithubIcon(props: React.SVGProps) { 4 | return ( 5 | 11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /docs/src/components/Stargazers/index.tsx: -------------------------------------------------------------------------------- 1 | import { useQuery } from '@tanstack/react-query'; 2 | import React from 'react'; 3 | import { GithubIcon } from './GithubIcon'; 4 | import { GithubBadge, GithubButton, Wrapper } from './styled'; 5 | 6 | async function getStargazers(): Promise { 7 | const res = await fetch('//api.github.com/repos/south-paw/react-vector-maps'); 8 | const json = await res.json(); 9 | return json.stargazers_count; 10 | } 11 | 12 | export interface StargazersProps { 13 | style: React.CSSProperties; 14 | } 15 | 16 | export function Stargazers({ style }: StargazersProps) { 17 | const { data } = useQuery(['stargazers'], getStargazers); 18 | 19 | if (data === undefined) { 20 | return null; 21 | } 22 | 23 | return ( 24 | 25 | 26 | Star 27 | 28 | 29 | {data} 30 | 31 | 32 | ); 33 | } 34 | -------------------------------------------------------------------------------- /docs/src/components/Stargazers/styled.ts: -------------------------------------------------------------------------------- 1 | import { rgba } from 'polished'; 2 | import styled from 'styled-components'; 3 | 4 | export const Wrapper = styled.div` 5 | display: flex; 6 | flex-flow: nowrap row; 7 | `; 8 | 9 | export const GithubButton = styled.a` 10 | padding: 2px 8px; 11 | display: flex; 12 | align-items: center; 13 | border-radius: 2px; 14 | color: ${(p) => p.theme.colors.dark}; 15 | background-color: ${(p) => p.theme.colors.white}; 16 | box-shadow: 0 1px 2px ${(p) => rgba(p.theme.colors.black, 0.2)}; 17 | cursor: pointer; 18 | font-weight: 500; 19 | font-size: 13px; 20 | line-height: 1.25; 21 | position: relative; 22 | text-decoration: none; 23 | 24 | :hover, 25 | :focus { 26 | box-shadow: 0 1px 0 ${(p) => rgba(p.theme.colors.black, 0.2)}, 0 2px 5px ${(p) => rgba(p.theme.colors.black, 0.2)}; 27 | color: ${(p) => p.theme.colors.gray}; 28 | text-decoration: none; 29 | } 30 | 31 | :active { 32 | background-color: ${(p) => p.theme.colors.alt}; 33 | box-shadow: 0 1px 0 ${(p) => rgba(p.theme.colors.black, 0.2)}; 34 | color: ${(p) => p.theme.colors.gray}; 35 | bottom: -2px; 36 | } 37 | `; 38 | 39 | export const GithubBadge = styled.a` 40 | margin-left: 6px; 41 | padding: 2px 8px; 42 | background-color: ${(p) => p.theme.colors.white}; 43 | color: ${(p) => p.theme.colors.dark}; 44 | cursor: pointer; 45 | display: inline-block; 46 | font-weight: 500; 47 | font-size: 13px; 48 | position: relative; 49 | border-radius: 2px; 50 | text-decoration: none; 51 | 52 | :hover, 53 | :focus { 54 | color: ${(p) => p.theme.colors.gray}; 55 | text-decoration: none; 56 | } 57 | 58 | :after { 59 | content: ' '; 60 | height: 0px; 61 | left: -8px; 62 | margin-top: -4px; 63 | top: 50%; 64 | position: absolute; 65 | width: 0px; 66 | border-width: 4px; 67 | border-style: solid; 68 | border-color: transparent ${(p) => p.theme.colors.white} transparent transparent; 69 | border-image: initial; 70 | } 71 | `; 72 | -------------------------------------------------------------------------------- /docs/src/components/Theme/Reset.tsx: -------------------------------------------------------------------------------- 1 | import { darken, rgba } from 'polished'; 2 | import { createGlobalStyle } from 'styled-components'; 3 | 4 | export const Reset = createGlobalStyle` 5 | * { 6 | margin: 0; 7 | padding: 0; 8 | box-sizing: border-box; 9 | } 10 | 11 | html { 12 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; 13 | font-size: 16px; 14 | line-height: 24px; 15 | color: ${(p) => p.theme.colors.dark}; 16 | background-color: ${(p) => p.theme.colors.alt}; 17 | } 18 | 19 | h1 { 20 | margin: 0; 21 | margin-bottom: 16px; 22 | font-size: 48px; 23 | font-weight: 700; 24 | line-height: 48px; 25 | } 26 | 27 | h2 { 28 | margin: 0; 29 | margin-bottom: 16px; 30 | font-size: 32px; 31 | font-weight: 600; 32 | line-height: 32px; 33 | } 34 | 35 | h3 { 36 | margin: 0; 37 | margin-bottom: 16px; 38 | font-size: 24px; 39 | font-weight: 600; 40 | line-height: 24px; 41 | } 42 | 43 | h4 { 44 | margin: 0; 45 | margin-bottom: 16px; 46 | font-size: 16px; 47 | font-weight: 500; 48 | line-height: 24px; 49 | } 50 | 51 | h5 { 52 | margin: 0; 53 | margin-bottom: 16px; 54 | font-size: 16px; 55 | font-weight: 500; 56 | line-height: 24px; 57 | } 58 | 59 | h6 { 60 | margin: 0; 61 | margin-bottom: 16px; 62 | font-size: 16px; 63 | font-weight: 500; 64 | line-height: 24px; 65 | } 66 | 67 | p { 68 | margin-bottom: 16px; 69 | } 70 | 71 | a { 72 | color: ${(p) => p.theme.colors.primary}; 73 | text-decoration: none; 74 | 75 | &:focus, 76 | &:hover { 77 | color: ${(p) => darken(0.2, p.theme.colors.primary)}; 78 | text-decoration: underline; 79 | } 80 | 81 | &:active { 82 | color: ${(p) => darken(0.2, p.theme.colors.primary)}; 83 | } 84 | } 85 | 86 | ul, ol { 87 | margin-bottom: 16px; 88 | padding-left: 32px; 89 | 90 | ul, ol { 91 | margin-top: 8px; 92 | margin-bottom: 8px; 93 | } 94 | } 95 | 96 | hr { 97 | margin: 32px 0; 98 | height: 2px; 99 | background-color: ${(p) => rgba(p.theme.colors.dark, 0.13)}; 100 | border: none; 101 | } 102 | 103 | code { 104 | padding: 1px 6px; 105 | background-color: ${(p) => rgba(p.theme.colors.black, 0.075)}; 106 | border-radius: 2px; 107 | } 108 | 109 | pre { 110 | padding: 8px; 111 | background-color: ${(p) => rgba(p.theme.colors.black, 0.075)}; 112 | border-radius: 2px; 113 | 114 | code { 115 | padding: 0; 116 | display: block; 117 | background-color: transparent; 118 | border-radius: none; 119 | } 120 | } 121 | 122 | table { 123 | margin: 16px 0; 124 | width: 100%; 125 | border: 1px solid ${(p) => rgba(p.theme.colors.dark, 0.13)}; 126 | border-spacing: 0; 127 | 128 | tr { 129 | th,td { 130 | padding: 4px; 131 | border: 1px solid ${(p) => rgba(p.theme.colors.dark, 0.13)}; 132 | } 133 | } 134 | } 135 | `; 136 | -------------------------------------------------------------------------------- /docs/src/components/Theme/index.tsx: -------------------------------------------------------------------------------- 1 | import React, { PropsWithChildren } from 'react'; 2 | import { ThemeProvider } from 'styled-components'; 3 | import { Normalize } from 'styled-normalize'; 4 | import { Reset } from './Reset'; 5 | import { system } from './system'; 6 | 7 | export function Theme({ children }: PropsWithChildren) { 8 | return ( 9 | 10 | <> 11 | 12 | 13 | {children} 14 | 15 | 16 | ); 17 | } 18 | -------------------------------------------------------------------------------- /docs/src/components/Theme/system.ts: -------------------------------------------------------------------------------- 1 | export const system = { 2 | colors: { 3 | white: '#fff', 4 | black: '#000', 5 | alt: '#fafbfb', 6 | dark: '#040f0f', 7 | gray: '#2d3a3a', 8 | primary: '#a82b2b', 9 | secondary: '#382ba8', 10 | }, 11 | }; 12 | -------------------------------------------------------------------------------- /docs/src/images/world-map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/South-Paw/react-vector-maps/0864209ff35fb1f0c94d650c9720f97054bf580a/docs/src/images/world-map.png -------------------------------------------------------------------------------- /docs/src/pages/404.tsx: -------------------------------------------------------------------------------- 1 | import { HeadProps } from 'gatsby'; 2 | import React from 'react'; 3 | import { Layout } from '../components/Layout'; 4 | import { Seo } from '../components/Seo'; 5 | 6 | export function Head(props: HeadProps) { 7 | return ; 8 | } 9 | 10 | export default function NotFoundPage() { 11 | return ( 12 | 13 |

404 Not Found 🤷‍♂️

14 |
15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /docs/src/pages/component-props.tsx: -------------------------------------------------------------------------------- 1 | import { HeadProps } from 'gatsby'; 2 | import * as React from 'react'; 3 | import { uid } from 'react-uid'; 4 | import styled from 'styled-components'; 5 | import { Layout } from '../components/Layout'; 6 | import { Seo } from '../components/Seo'; 7 | 8 | const ResponsiveTable = styled.div` 9 | overflow: auto; 10 | `; 11 | 12 | interface PropTableProps { 13 | items: Array<{ 14 | prop?: string; 15 | type?: string; 16 | required?: boolean; 17 | defaultProp?: string; 18 | description?: string; 19 | }>; 20 | } 21 | 22 | function PropTable({ items }: PropTableProps) { 23 | return ( 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | {items.map((item, id) => ( 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | ))} 45 | 46 |
PropTypeRequiredDefaultDescription
{item.prop && {item.prop}}{item.type && {item.type}}{item.required && '✔️'}{item.defaultProp && {item.defaultProp}}{item.description}
47 |
48 | ); 49 | } 50 | 51 | export function Head(props: HeadProps) { 52 | return ; 53 | } 54 | 55 | export default function ComponentPropsPage() { 56 | return ( 57 | 58 |

59 | VectorMapProps 60 |

61 | 121 | 122 |
123 | 124 |

125 | VectorMapLayer 126 |

127 | 152 |
153 | ); 154 | } 155 | -------------------------------------------------------------------------------- /docs/src/pages/converter.tsx: -------------------------------------------------------------------------------- 1 | import { HeadProps } from 'gatsby'; 2 | import { rgba } from 'polished'; 3 | import React, { useCallback, useState } from 'react'; 4 | import { DropzoneOptions, useDropzone } from 'react-dropzone'; 5 | import styled from 'styled-components'; 6 | import { parse } from 'svgson'; 7 | import { VectorMap, VectorMapProps } from '../../../src'; 8 | import { Layout } from '../components/Layout'; 9 | import { Seo } from '../components/Seo'; 10 | 11 | const Dropzone = styled.div` 12 | padding: 1rem; 13 | border: 2px dashed ${(p) => rgba(p.theme.colors.dark, 0.13)}; 14 | border-radius: 4px; 15 | cursor: pointer; 16 | outline: none; 17 | text-align: center; 18 | transition: border-color ease-in-out 0.3s; 19 | 20 | &:focus { 21 | border-color: ${(p) => p.theme.colors.primary}; 22 | } 23 | `; 24 | 25 | const Error = styled.div` 26 | margin-top: 16px; 27 | padding: 8px 16px; 28 | background-color: #960e0e; 29 | color: ${(p) => p.theme.colors.white}; 30 | `; 31 | 32 | const Loading = styled.div` 33 | margin-top: 16px; 34 | text-align: center; 35 | `; 36 | 37 | const Preview = styled.div` 38 | margin-top: 16px; 39 | padding: 1rem; 40 | border: 4px solid ${(p) => rgba(p.theme.colors.dark, 0.13)}; 41 | 42 | svg { 43 | margin: 0 auto; 44 | max-width: 600px; 45 | display: block; 46 | } 47 | `; 48 | 49 | const Output = styled.textarea` 50 | margin-bottom: 8px; 51 | padding: 8px; 52 | max-width: 100%; 53 | min-width: 100%; 54 | min-height: 8rem; 55 | height: 8rem; 56 | border: 4px solid ${(p) => rgba(p.theme.colors.dark, 0.13)}; 57 | font-size: 14px; 58 | outline: none; 59 | `; 60 | 61 | const Actions = styled.div` 62 | display: flex; 63 | flex-flow: nowrap row; 64 | font-size: 16px; 65 | 66 | > * { 67 | margin-right: 8px; 68 | } 69 | `; 70 | 71 | const Button = styled.button` 72 | padding: 4px 8px; 73 | display: flex; 74 | flex-flow: nowrap row; 75 | align-items: center; 76 | background-color: ${(p) => p.theme.colors.white}; 77 | border: none; 78 | border-radius: 2px; 79 | box-shadow: 0 1px 2px ${(p) => rgba(p.theme.colors.black, 0.2)}; 80 | color: ${(p) => p.theme.colors.white}; 81 | cursor: pointer; 82 | font-weight: 500; 83 | line-height: 1.5; 84 | 85 | :hover, 86 | :focus { 87 | box-shadow: 0 1px 0 ${(p) => rgba(p.theme.colors.black, 0.2)}, 0 2px 5px ${(p) => rgba(p.theme.colors.black, 0.2)}; 88 | color: ${(p) => p.theme.colors.alt}; 89 | text-decoration: none; 90 | } 91 | `; 92 | 93 | const capitalize = (string: string) => 94 | string 95 | .toLowerCase() 96 | .split(' ') 97 | .map((word) => word[0].toUpperCase() + word.slice(1)) 98 | .join(' '); 99 | 100 | interface FileDropzoneProps { 101 | onDrop: NonNullable; 102 | fileName?: string; 103 | } 104 | 105 | function FileDropzone({ 106 | onDrop, 107 | fileName = 'Click to choose a file (.svg) or drag and drop one here', 108 | }: FileDropzoneProps) { 109 | const { getRootProps, getInputProps, isDragActive } = useDropzone({ onDrop }); 110 | 111 | return ( 112 | 113 | 114 | {isDragActive ? Drop the files here : {fileName}} 115 | 116 | ); 117 | } 118 | 119 | type Map = Pick; 120 | 121 | export function Head(props: HeadProps) { 122 | return ; 123 | } 124 | 125 | export default function ConverterPage() { 126 | const [error, setError] = useState(); 127 | const [isLoading, setIsLoading] = useState(false); 128 | const [fileName, setFileName] = useState(); 129 | const [output, setOutput] = useState(); 130 | 131 | const onDrop = useCallback>((acceptedFiles: File[]) => { 132 | setError(undefined); 133 | setIsLoading(true); 134 | setFileName(undefined); 135 | setOutput(undefined); 136 | 137 | const file = acceptedFiles[0]; 138 | 139 | // Check we can use the Blob.text() API 140 | if (file.text === undefined) { 141 | setError(`Your browser does not support the 'Blob.text()' API. Please use Chrome 76+ or Firefox 69+`); 142 | setIsLoading(false); 143 | return; 144 | } 145 | 146 | // Needs to be an 'image/svg' type. 147 | if (!file.type.includes('image/svg')) { 148 | setError(`Invalid file type, must be 'image/svg' but received '${file.type}'`); 149 | setIsLoading(false); 150 | return; 151 | } 152 | 153 | setFileName(file.name); 154 | 155 | file 156 | .text() 157 | .then(parse) 158 | .then((json) => { 159 | const localFileName = file.name.split('.')[0]; 160 | 161 | const layers = json.children 162 | .filter(({ name }) => name === 'path') 163 | .map(({ attributes }) => ({ 164 | id: attributes.id.toLowerCase(), 165 | name: attributes.title || capitalize(attributes.id), 166 | d: attributes.d, 167 | })); 168 | 169 | const map = { 170 | id: localFileName, 171 | name: capitalize(localFileName.split('-').join(' ')), 172 | viewBox: `0 0 ${parseFloat(json.attributes.width)} ${parseFloat(json.attributes.height)}`, 173 | layers, 174 | }; 175 | 176 | setOutput(map); 177 | setIsLoading(false); 178 | }) 179 | .catch((err) => { 180 | // eslint-disable-next-line no-console 181 | console.error(err); 182 | setError(err.message); 183 | setIsLoading(false); 184 | }); 185 | }, []); 186 | 187 | const downloadFile = useCallback(() => { 188 | const blob = new Blob([JSON.stringify(output)], { type: 'application/json' }); 189 | const el = document.createElement('a'); 190 | el.href = URL.createObjectURL(blob); 191 | el.download = `${fileName || 'react-vector-maps'.split('.')[0]}.json`; 192 | document.body.appendChild(el); 193 | el.click(); 194 | }, [fileName, output]); 195 | 196 | return ( 197 | 198 |

Converter

199 |

Before you convert your SVG, please check the following things

200 |
    201 |
  • 202 | width and height are required attributes on the <svg /> element. 203 |
  • 204 |
  • 205 | The SVG is assumed to have a viewBox origin of 0 0 and uses the given width and{' '} 206 | height as the viewBox maximum values. 207 |
  • 208 |
  • 209 | Only <path /> elements will be converted to JSON. 210 |
  • 211 |
  • 212 | id and d attributes are required on all path elements and the id must 213 | be unique for each path. 214 |
  • 215 |
  • 216 | A title attribute on a path element will be used as the layers name field. If no 217 | title is present, the id will be capitalized and used. 218 |
  • 219 |
220 |

If your file doesn't meet these requirements then the output may be unexpected or incorrect 😉

221 |

Example SVG

222 |
223 |         {`
224 |   
225 |   
226 |   
227 | `}
228 |       
229 |
230 |

Add your SVG file

231 | 232 | {error && {error}} 233 | {isLoading && !output && Loading...} 234 | {output && ( 235 | <> 236 |

Map Preview

237 | 238 | 239 | 240 |

JSON Output

241 | 242 | 243 | 246 | 247 | 248 | )} 249 |
250 | ); 251 | } 252 | -------------------------------------------------------------------------------- /docs/src/pages/examples.tsx: -------------------------------------------------------------------------------- 1 | import { HeadProps } from 'gatsby'; 2 | import { rgba } from 'polished'; 3 | import React, { Fragment } from 'react'; 4 | import styled from 'styled-components'; 5 | import { VectorMap } from '../../../src'; 6 | import nzMap from '../../static/maps/new-zealand.json'; 7 | import { Example } from '../components/Example'; 8 | import { Layout } from '../components/Layout'; 9 | import { Markdown } from '../components/Markdown'; 10 | import { Seo } from '../components/Seo'; 11 | 12 | const examples = [ 13 | { 14 | title: 'Simple events', 15 | scope: { nzMap }, 16 | code: `() => { 17 | const style = { margin: '1rem auto', width: '300px' }; 18 | 19 | const [hovered, setHovered] = React.useState('None'); 20 | const [focused, setFocused] = React.useState('None'); 21 | const [clicked, setClicked] = React.useState('None'); 22 | 23 | const layerProps = { 24 | onMouseEnter: ({ target }) => setHovered(target.attributes.name.value), 25 | onMouseLeave: ({ target }) => setHovered('None'), 26 | onFocus: ({ target }) => setFocused(target.attributes.name.value), 27 | onBlur: ({ target }) => setFocused('None'), 28 | onClick: ({ target }) => setClicked(target.attributes.name.value), 29 | }; 30 | 31 | return ( 32 |
33 | 34 |
35 |

Hovered: {hovered && {hovered}}

36 |

Focused: {focused && {focused}}

37 |

Clicked: {clicked && {clicked}}

38 |
39 | ); 40 | }`, 41 | }, 42 | { 43 | title: 'Styling a map', 44 | description: `This example uses [styled-components](https://www.styled-components.com/) for css-in-js styling but you can use any css styling method you want.`, 45 | scope: { nzMap, styled }, 46 | exampleProps: { noInline: true }, 47 | code: `const Map = styled.div\` 48 | margin: 1rem auto; 49 | width: 300px; 50 | 51 | svg { 52 | stroke: #fff; 53 | 54 | // All layers are just path elements 55 | path { 56 | fill: #a82b2b; 57 | cursor: pointer; 58 | outline: none; 59 | 60 | // When a layer is hovered 61 | &:hover { 62 | fill: ${rgba('#a82b2b', 0.83)}; 63 | } 64 | 65 | // When a layer is focused. 66 | &:focus { 67 | fill: ${rgba('#a82b2b', 0.6)}; 68 | } 69 | 70 | // When a layer is 'checked' (via checkedLayers prop). 71 | &[aria-checked='true'] { 72 | fill: ${rgba('#382ba8', 1)}; 73 | } 74 | 75 | // When a layer is 'selected' (via currentLayers prop). 76 | &[aria-current='true'] { 77 | fill: ${rgba('#382ba8', 0.83)}; 78 | } 79 | 80 | // You can also highlight a specific layer via it's id 81 | &[id="nz-can"] { 82 | fill: ${rgba('#382ba8', 0.6)}; 83 | } 84 | } 85 | } 86 | \`; 87 | 88 | render( 89 | 90 | 91 | 92 | )`, 93 | }, 94 | { 95 | title: 'Styling a map with gradients', 96 | description: `An example of using gradients on the map paths.`, 97 | scope: { nzMap, styled }, 98 | exampleProps: { noInline: true }, 99 | code: `const Map = styled.div\` 100 | margin: 1rem auto; 101 | width: 300px; 102 | \`; 103 | 104 | render( 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | )`, 116 | }, 117 | { 118 | title: 'Selecting layers', 119 | scope: { nzMap }, 120 | code: `() => { 121 | const style = { margin: '1rem auto', width: '300px' }; 122 | 123 | const [selected, setSelected] = React.useState([]); 124 | 125 | const onClick = ({ target }) => { 126 | const id = target.attributes.id.value; 127 | 128 | // If selected includes the id already, remove it - otherwise add it 129 | selected.includes(id) 130 | ? setSelected(selected.filter(sid => sid !== id)) 131 | : setSelected([...selected, id]); 132 | } 133 | 134 | return ( 135 |
136 | 137 |
138 |

Selected:

139 |
{JSON.stringify(selected,null,2)}
140 |
141 | ); 142 | }`, 143 | }, 144 | { 145 | title: 'Highlighting a layer', 146 | scope: { nzMap, styled }, 147 | exampleProps: { noInline: true }, 148 | code: `const Map = styled.div\` 149 | margin: 1rem auto; 150 | width: 300px; 151 | 152 | svg { 153 | stroke: #fff; 154 | 155 | path { 156 | fill: #a82b2b; 157 | outline: none; 158 | 159 | // When a layer is 'selected' (via currentLayers prop). 160 | &[aria-current='true'] { 161 | fill: #382ba8; 162 | } 163 | } 164 | } 165 | \`; 166 | 167 | render(() => { 168 | const style = { margin: '1rem auto', width: '300px' }; 169 | 170 | const [current, setCurrent] = React.useState(null); 171 | 172 | const locations = [ 173 | { id: 'nz-auk', name: 'Auckland' }, 174 | { id: 'nz-wgn', name: 'Wellington' }, 175 | { id: 'nz-can', name: 'Canterbury' }, 176 | ]; 177 | 178 | return ( 179 |
180 | 181 | 182 | 183 |

Hover on one of these to see where it is:

184 |
    185 | {locations.map(({ id, name }) => ( 186 |
  • 187 | setCurrent(id)}>{name} 188 |
  • 189 | ))} 190 |
191 |
192 | ); 193 | })`, 194 | }, 195 | { 196 | title: 'Layer links', 197 | description: ``, 198 | scope: { nzMap }, 199 | code: `() => { 200 | const style = { margin: '1rem auto', width: '300px' }; 201 | 202 | const onClick = ({ target }) => { 203 | const name = target.attributes.name.value; 204 | window.open(\`https://www.google.com/search?q=\${name}%20nz\`) 205 | } 206 | 207 | return ( 208 |
209 | 210 |
211 | ); 212 | }`, 213 | }, 214 | ]; 215 | 216 | function getId(anchor: string) { 217 | return `${anchor}`.toLowerCase().split(' ').join('-'); 218 | } 219 | 220 | export function Head(props: HeadProps) { 221 | return ; 222 | } 223 | 224 | export default function ExamplesPage() { 225 | return ( 226 | 227 |

Examples

228 |
    229 | {examples.map(({ title }) => ( 230 |
  • 231 | {title} 232 |
  • 233 | ))} 234 |
235 | {examples.map(({ title, description, scope, code, exampleProps }) => ( 236 | 237 |
238 |

{title}

239 | {description && {description}} 240 | 241 |
242 | ))} 243 |
244 | ); 245 | } 246 | -------------------------------------------------------------------------------- /docs/src/pages/index.tsx: -------------------------------------------------------------------------------- 1 | import { HeadProps, Link } from 'gatsby'; 2 | import * as React from 'react'; 3 | import styled from 'styled-components'; 4 | import { VectorMap } from '../../../src'; 5 | import worldLowRes from '../../static/maps/world-low-res.json'; 6 | import { Example } from '../components/Example'; 7 | import { Layout } from '../components/Layout'; 8 | import { Seo } from '../components/Seo'; 9 | import { Stargazers } from '../components/Stargazers'; 10 | 11 | const HeroWrapper = styled.div` 12 | display: flex; 13 | flex-flow: nowrap row; 14 | 15 | @media (max-width: 48em) { 16 | flex-flow: nowrap column; 17 | } 18 | 19 | p { 20 | margin-bottom: 0; 21 | font-size: 16px; 22 | font-weight: 500; 23 | } 24 | `; 25 | 26 | const Item = styled.div<{ basis: number }>` 27 | margin: 0 8px; 28 | flex: 1 1 ${(p) => p.basis}%; 29 | 30 | &:first-child { 31 | margin-left: 0; 32 | } 33 | 34 | &:last-child { 35 | margin-right: 0; 36 | } 37 | 38 | @media (max-width: 48em) { 39 | margin: 0; 40 | margin-bottom: 8px; 41 | 42 | &:last-child { 43 | margin-bottom: 0; 44 | } 45 | } 46 | `; 47 | 48 | export function Head(props: HeadProps) { 49 | return ; 50 | } 51 | 52 | export default function IndexPage() { 53 | return ( 54 | 57 | 58 |

React Vector Maps

59 |

60 | A React component for creating simple maps with interactive elements, 100+ maps ready for use and an 61 | online SVG to JSON converter for creating new maps. 62 |

63 | 64 |
65 | 66 | 67 | 68 | 69 | } 70 | > 71 |

👋 Welcome!

72 |

73 | Below you'll find a getting start guide for using the package in your app. 74 | There is also a collection of 100+ maps that are ready to use with the component. 75 |

76 |

77 | You might be interested in some examples of how the component can be used and note 78 | that you can also turn your own SVG into a valid map with our converter. 79 |

80 |

Stars on the project are always appreciated! 🙂

81 |

82 | To report an issue or contribute to the project please visit our{' '} 83 | Github. 84 |

85 | 86 |
87 | 88 |

Getting started

89 |

Install the package with either

90 |
    91 |
  • 92 | npm i @south-paw/react-vector-maps 93 |
  • 94 |
  • 95 | yarn add @south-paw/react-vector-maps 96 |
  • 97 |
98 |

You can then use the component as follows

99 |

100 | {`import { VectorMap } from '@south-paw/react-vector-maps';`} 101 |

102 |

103 | The VectorMapcomponent accepts a correctly structured object being spread onto it. 104 |

105 |

106 | You can download and save a valid JSON object from the maps page or you can create your 107 | own using our online SVG to JSON converter. 108 |

109 |

When you've got your map file, just import it and then combine it with the component as follows:

110 | ; 115 | } 116 | }`} 117 | scope={{ VectorMap, worldLowRes }} 118 | /> 119 |
120 | ); 121 | } 122 | -------------------------------------------------------------------------------- /docs/src/pages/maps.tsx: -------------------------------------------------------------------------------- 1 | import { graphql, HeadProps, Link, PageProps } from 'gatsby'; 2 | import React from 'react'; 3 | import { Layout } from '../components/Layout'; 4 | import { Seo } from '../components/Seo'; 5 | 6 | export function Head(props: HeadProps) { 7 | return ; 8 | } 9 | 10 | export default function MapsPage({ 11 | data: { 12 | allMapsJson: { edges }, 13 | }, 14 | }: PageProps<{ 15 | allMapsJson: { 16 | edges: Array<{ 17 | node: { 18 | id: string; 19 | name: string; 20 | }; 21 | }>; 22 | }; 23 | }>) { 24 | return ( 25 | 26 |

Maps

27 |

28 | The following maps were created by{' '} 29 | 30 | MapSVG 31 | {' '} 32 | and have been converted to the correct JSON format so they are ready to use with the VectorMap component. 33 |

34 |

35 | Can't find what you're looking for? You can always create your own SVG and convert it using the{' '} 36 | online SVG to JSON converter. 37 |

38 |
    39 | {edges.map(({ node: { id, name } }) => ( 40 |
  • 41 | 42 | {name} 43 | 44 |
  • 45 | ))} 46 |
47 |
48 | ); 49 | } 50 | 51 | export const query = graphql` 52 | { 53 | allMapsJson(sort: { fields: name, order: ASC }) { 54 | edges { 55 | node { 56 | id 57 | name 58 | } 59 | } 60 | } 61 | } 62 | `; 63 | -------------------------------------------------------------------------------- /docs/static/maps/djibouti.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "djibouti", 3 | "name": "Djibouti", 4 | "viewBox": "0 0 612.41125 678.79425", 5 | "layers": [ 6 | { 7 | "id": "dj-ar", 8 | "name": "Arta", 9 | "d": "m 232.06126,409.69247 6.52,7.36 14.01,9.8 8.21,4.9 5.32,1.22 7.73,4.66 4.11,-1.47 0.72,-1.72 -0.01,-3 0,0 0.71,-0.52 2.48,-0.74 1.03,0.31 0.1,0.53 -0.41,1.47 -1.44,0.41 2.24,1.89 -0.29,1.46 1.77,1.35 0.92,1.06 -0.21,1.04 -4.54,-0.1 1.65,1.25 -1.44,2.62 -2.17,0.83 0.21,1.26 1.03,1.99 1.34,1.77 2.17,1.36 4.64,2.7 3.81,3.47 0.42,1.46 1.54,1.26 2.27,-0.11 0.62,1.57 0.93,0.53 1.24,-0.21 2.37,2.09 0.62,1.25 0.93,0.52 2.06,1.57 3.09,2.62 1.44,0.83 3,0.11 0.82,-0.73 4.02,1.04 1.24,-0.91 1.96,-0.97 1.75,-1.99 -0.31,-2.09 0.93,-1.35 3.61,1.56 4.02,0.1 4.13,1.05 2.57,0.11 2.99,0.52 0.83,-0.31 -0.41,-1.99 2.57,-1.26 -0.11,-0.62 -2.15,0.42 -0.21,-0.53 0.21,-3.24 1.13,-1.36 -0.31,-1.15 -0.62,-0.73 -1.44,-0.94 -2.27,-0.42 -1.03,-1.15 -2.06,0.1 -1.86,-1.56 -0.52,-1.47 -1.54,-2.19 0.62,-2.09 1.03,-0.53 1.54,0.32 2.79,-0.53 0,-1.57 1.65,-0.2 0,-1.05 1.86,-3.45 0.52,-0.12 1.44,2.42 2.06,0.52 2.58,-1.04 0.61,-1.15 2.38,-0.63 2.26,-0.11 1.45,-1.77 7.11,-1.78 2.38,0.1 2.47,-3.66 4.95,1.78 2.47,-0.31 1.66,-1.15 2.06,0.1 1.65,-1.15 1.65,-1.67 0.2,-1.99 0.83,-0.42 1.24,0.52 0.92,-2.5 1.04,-0.63 3.09,0.94 2.24,-0.52 0.75,1.04 2.06,0.11 1.65,-1.57 2.37,0.31 2.07,0 2.06,0 1.54,-0.42 0.62,-1.46 0,-0.73 -1.04,-1.17 0.43,-1.24 3.19,4.71 3.51,-1.14 0.62,1.77 1.34,-0.11 0.62,-0.63 2.88,1.15 1.55,-0.21 3.71,-0.94 1.55,-0.83 3.3,-0.84 4.33,0.42 3.2,-0.93 1.7,0.19 0,0 0,23.22 74.42,-0.73 0.36,1.46 1.08,1.27 2.16,0.55 3.06,-0.37 2.15,-1.27 2.16,-0.55 3.6,0.18 3.67,-0.67 0,0 1.12,3.28 1.76,2.29 -0.21,0.52 0.93,0.42 -0.2,1.15 0.62,0.31 0.51,-0.62 1.24,0.83 0.62,-0.31 3.19,1.26 0.72,-0.74 -1.54,-1.36 -0.41,0.84 -1.33,-0.42 -0.84,-0.42 -2.06,0 0.31,-0.83 3.19,0.1 0.83,-1.04 2.68,1.46 1.44,1.67 1.45,0.74 1.44,1.04 0.62,1.25 3.3,3.25 0.41,5.43 2.89,2.93 0,1.05 1.73,1.8 2.66,0.87 -13.38,21.28 0,0 -56.24,-26.74 -14.5,2.29 -43.69,8.44 -21.05,39.22 0,0 -68.01,40.17 0,0 -4.76,0.49 -60.17,1 -54.83,-52.48 -6.04,-72.49 15.46,-18.86 z" 10 | }, 11 | { 12 | "id": "dj-as", 13 | "name": "Ali Sabieh", 14 | "d": "m 468.77126,608.41247 -8.81,14.83 -2.25,2.99 -5.73,11.11 -9,14.08 -3.5,-0.21 -11.99,2.15 -4.8,2.08 -5.53,1.33 -2.53,0.07 -1.92,-1.31 -0.9,0.14 -1.54,1.28 -1.92,0.19 -1.65,-1 -2.02,-3.44 -1.91,0.53 -2.75,-1.14 -3.09,0.14 -3.98,-0.89 -11.91,-0.77 -1.7,-0.69 -1.08,-3.89 -1.66,-2.78 -0.01,-1.57 1.25,-3.68 -1.07,-2.09 -0.31,-2.91 -3.31,-4.52 -0.96,-3.83 -1.53,-1.33 -1.7,-0.62 -0.8,-4.6 -2.76,-2.36 -2.21,0.31 -0.85,3.62 -1.8,1.18 -2.34,-1.44 -1.34,0.19 -1.81,0.89 -1.57,0.01 -3.14,2.01 -8.68,1.95 -1.3,-2.21 -1.88,-1.79 -6.75,-4.48 -2.57,0.37 -2.77,-3.88 -5.28,-2.92 -2.74,0.61 -4.4,3.53 -1.86,0.89 0,0 -0.09,-42.41 19.79,-12.51 0,0 72.56,-42.85 0,0 21.05,-39.22 43.69,-8.44 14.5,-2.29 56.24,26.74 0,0 -21.02,34.48 -2.83,3.76 -0.8,2.22 -5.36,7.8 -6.1,10.79 -13.72,21.4 -2.35,4.63 -4.1,5.8 z" 15 | }, 16 | { 17 | "id": "dj-di", 18 | "name": "Dikhil", 19 | "d": "m 232.06126,409.69247 -6.04,4.91 -15.46,18.86 6.04,72.49 54.83,52.48 60.17,-1 4.76,-0.49 0,0 -4.55,2.68 0,0 -19.79,12.51 0.09,42.41 0,0 -0.64,1.17 -0.09,2.63 -0.7,0.53 -7.63,2.05 -8.26,3.04 -4.49,0.8 -16.12,5.74 -30.23,21.42 -1.4,0.53 -21.41,-6.15 -2.37,0.59 -0.31,2.46 -3.03,1.54 -10.66,-1.47 -1.76,-0.98 -5.59,1.51 -4.14,0.5 -2.04,1.01 -0.75,0.88 -0.16,1.4 -1.68,1.41 -3.03,1.19 -22.75,1.96 -3.2,0.72 -1,-0.92 0.28,-1.17 -1.12,-1.15 -1.28,-0.4 -9.53,-0.67 -1.39,0.83 -2.33,-0.1 -2.04,1.01 -0.99,-0.05 -0.83,-1.33 1.45,-1.76 -1.12,-0.63 -2.79,0.96 -2.38,2.17 -7.81,0.71 -1.87,4.82 -6.7,-0.01 -3.8,6.3 -0.91,2.46 -6.37,0.31 -4.1,-1.08 -10.170003,5.23 -2.58,0.15 -11.24,-1.54 -6.37,4.92 -2.13,0.46 -2.28,-0.15 -3.64,-5.69 -1.82,-1.69 -5.16,-2.15 -9.42,-1.23 -4.09,-1.38 -9.11,-1.54 -2.89,-1.07 -11.38,-0.92 -1.52,-3.38 -1.37,-0.92 -7.8900001,-0.77 -0.91,-1.54 -1.22,-4.61 0.15,-2.46 1.22,-1.99 3.4900001,-2.77 2.43,-21.08 1.06,-28.72 1.06,-7.07 0.76,-37.36 -1.52,-23.85 -1.97,-13.07 -2.32,-6.66 -10.1500001,-41.74 -0.91,-4.36 0.35,-1.51 -1.23999996,-2.86 0.75999996,-3.54 5.23,-9.68 0.69,-2.54 4.0700001,-5.79 -0.43,-6 1.22,-4.31 1.06,-2.77 3.8,-5.55 -1.52,-5.08 0.61,-4.93 4.25,-11.55 1.21,-6.93 2.73,-7.09 2.95,-10.89 16.83,-8.44 4.87,-3.38 1.79,-7.28 2.22,-1.65 17.59,-8.15 1.97,-1.73 0.77,-3.1 0.96,-1.62 11.9,-17.47 0,0 54.760003,10.56 14.33,5.71 65.43,66.12 5.16,3.41 z" 20 | }, 21 | { 22 | "id": "dj-dj", 23 | "name": "Djibouti", 24 | "d": "m 527.29126,436.67247 0.72,0.73 0.1,1.26 -1.55,0.42 -0.72,-0.52 0,-1.36 1.45,-0.53 z m -14.03,-25.63 -0.21,4.09 2.07,1.14 1.05,2.32 -0.42,0.61 -1.97,0.42 -0.31,1.15 0.52,2.2 1.13,2.61 0.84,0.72 0.81,2.83 2.99,3.45 0.62,1.67 -0.1,2.93 0.93,0.21 1.75,2.2 1.24,0 0.72,3.03 1.14,1.67 0,0.63 0.11,0.6 0,0 -3.67,0.68 -3.6,-0.18 -2.16,0.55 -2.16,1.27 -3.06,0.37 -2.16,-0.55 -1.08,-1.28 -0.36,-1.46 -74.42,0.73 0,-23.22 0,0 2.1,-0.66 3.52,0.14 2.48,-0.1 4.33,1.46 2.36,-0.63 2.69,0.73 4.95,-0.62 3.2,0.63 0.72,-0.42 -0.41,-0.53 0.41,-0.1 3.4,0.31 1.65,-0.73 2.68,-0.21 6.7,1.05 2.48,1.67 3.09,-0.1 1.13,0.73 -0.92,-1.47 -0.83,-0.21 0.1,-1.57 4.23,-0.42 2.27,0.42 1.44,1.15 1.44,0 2.37,1.88 1.14,2.32 3.09,1.03 2.89,-2.2 1.75,-0.63 2.58,0.1 1.55,-0.31 2.06,-0.73 1.13,-1.67 2.48,0.43 0.51,-2.31 1.24,-0.94 0.1,-1.67 -2.99,0.1 -0.21,1.36 -1.55,-0.1 0.93,-0.52 -0.1,-0.94 1.03,-1.15 -0.62,-0.21 -0.62,0.52 -0.42,-0.94 -0.63,0.62 0.01,0.85 -0.62,0.21 -0.31,-1.05 2.27,-1.87 3.59,-0.09 0.64,-1.91 -0.21,-1.26 1.47,-0.83 z" 25 | }, 26 | { 27 | "id": "dj-ob", 28 | "name": "Obock", 29 | "d": "m 505.34126,0.262473 3.47,0.88 0.81,0.82 2.37,11.26 2.32,5.01 1.16,4.12 2.02,3.24 1.45,5.01 6.07,5.6 10.99,16.19 7.52,8.25 6.08,7.65 8.67,15.02 4.19,3.33 1.31,3.09 2.19,0.93 -0.21,3.25 0.93,0.84 2.68,2.1 1.34,0 2.19,-1.45 0.29,-1.07 2.06,-2.2 0.02,-0.63 -1.26,-0.42 -0.81,-3.64 1.73,-0.13 3.41,2.51 -0.92,1.47 -0.83,5.45 1.75,11.229997 1.34,4.51 1.45,3.26 1.34,1.24 1.13,2.32 1.75,-0.1 1.24,0.73 3.1,5.88 1.34,8.28 1.13,2.63 1.45,6.81 0.92,8.29 1.14,3.56 -0.52,3.88 1.34,7.87 3.2,2.2 1.44,3.99 1.86,1.78 1.21,2.2 0.95,4.82 1.44,0.76 2.17,3.44 -0.41,3.35 1.03,8.91 -1.44,2.83 1.75,3.15 1.2,3.04 -0.68,2.82 1.03,3.57 0.93,7.34 0,5.76 -0.94,9.95 -2.47,10.06 -5.07,9.95 -2.45,6.69 -2.17,4.11 -1.24,1.04 -1.75,3.77 -0.52,2.52 -1.44,1.67 -2.27,0.95 -6.29,0.52 -1.96,-0.52 -4.43,-0.42 -2.99,0 -5.47,-0.42 -0.72,0.21 -1.65,3.35 -1.86,2.51 -1.44,1.57 -6.08,-0.1 -1.55,0.42 -2.48,-0.94 -7,-0.13 -5.58,0.96 -1.23,1.89 -2.58,-0.94 -2.48,-0.74 -3.61,0.42 -2.16,1.36 -4.64,0.32 -2.48,1.57 -2.99,4.61 -3.81,4.08 -5.16,4.09 -1.34,1.78 -0.72,3.03 -3.4,0.63 -1.97,3.13 -1.75,0.95 -0.62,2.73 -1.85,1.04 -1.03,3.14 -2.68,2.1 -1.65,2.63 -1.86,0.61 -1.65,2.2 -0.82,2.93 0,0 -7.85,-4.72 -2.41,-2.94 -4.11,-3.19 -6.52,-13 -0.97,-5.4 -5.07,-10.05 -12.32,-12.27 -33.66,-37.33 -26.3,-28.21 -1.69,-2.45 -0.24,-2.95 -5.07,-4.42 -3.39,-0.98 -3.14,-2.21 -4.59,-1.47 -3.86,-0.49 -9.42,-5.16 -5.32,-5.65 -5.79,-4.42 -4.59,-5.65 -5.32,-11.3 -2.9,-8.11 -2.41,-2.21 -1.45,-3.68 0.72,-2.46 1.69,-1.96 1.69,-3.2 2.9,-2.45 5.08,-2.22 0.91,-4.59 0,0 1.71,1.22 0.87,-0.13 0.23,-1.05 -1.62,-2.03 0.19,-1.18 1.56,-2.12 3.42,-2.49 1.04,-1.59 2.39,-0.32 2.81,1.32 1.7,0.22 4.42,-1.38 1.57,-1.25 0.4,-1 -0.2,-2.75 2.21,-1.01 1.56,-2.12 0.74,-2.29 9.09,-1.73 5.48,0.25 3.55,-2.38 4.04,-4.72 -0.02,-3.28 -1.84,-3.729997 -0.14,-2.87 -2.89,-3.66 -2.63,-0.21 -2.17,-1.62 -0.95,-1.93 -0.13,-1.64 1.38,-2.64 0.65,-5.46 2.54,-4.06 2.25,-3.13 2.94,-3.6 2.83,-3.71 2.16,-0.2 2.52,0.74 2.66,-2.9 3.62,0.21 0.85,-2.24 -1.7,-1.62 -0.12,-0.94 2.49,-2.31 -1.48,-1.8 0.17,-1.41 2.67,-1.37 0.08,-4.16 1.69,-0.95 3.55,-0.56 1.76,-5.94 1.85,-2.18 4.38,-0.57 2.87,1.97 2.46,0.33 3.99,-3.97 1.16,-0.48 3.92,0.26 3.2,-1.55 4.91,-5.73 1.21,-0.79 z" 30 | }, 31 | { 32 | "id": "dj-ta", 33 | "name": "Tadjourah", 34 | "d": "m 272.74126,78.012473 4.55,0.37 10.32,4.42 16.79,12.32 21.09,23.589997 18.97,14.52 0,0 -0.91,4.59 -5.08,2.22 -2.9,2.45 -1.69,3.2 -1.69,1.96 -0.72,2.46 1.45,3.68 2.41,2.21 2.9,8.11 5.32,11.3 4.59,5.65 5.79,4.42 5.32,5.65 9.42,5.16 3.86,0.49 4.59,1.47 3.14,2.21 3.39,0.98 5.07,4.42 0.24,2.95 1.69,2.45 26.3,28.21 33.66,37.33 12.32,12.27 5.07,10.05 0.97,5.4 6.52,13 4.11,3.19 2.41,2.94 7.85,4.72 0,0 -1.55,1.99 -3.82,0.84 -0.83,1.56 -1.85,1.69 0,1.99 -2.27,0.73 -1.34,3.03 -0.82,0.53 -2.27,0.62 -1.65,-0.51 -2.87,0.29 -1.05,0.75 -2.17,0.42 -2.88,-0.53 -0.83,0.94 -2.16,0.63 -1.76,-0.31 -1.98,-2.29 -0.9,-0.01 -2.07,1.67 -1.12,0.31 -5.17,-0.1 -1.54,1.68 -1.76,0.83 -1.23,1.57 -0.92,3.36 -1.25,1.98 -2.65,1.36 -3.02,2.41 -1.14,-0.42 -0.61,-0.94 -0.11,-2.51 -0.72,1.04 -0.89,0.32 0.79,1.47 -1.24,0.52 -1.96,-0.63 -0.51,-1.78 -0.93,-0.84 -3.47,-0.42 -1.69,0.73 -1.96,-0.1 -1.85,-1.26 -2.07,1.05 -1.54,0.1 -1.65,-0.94 -3.1,-1.67 -2.07,0.41 -2.37,2.93 -3.09,2 -6.9,0.42 -2.89,4.29 -3.92,3.14 -2.37,0.73 -1.86,0.21 -4.12,-0.32 -1.35,0.52 -3.81,-0.1 -1.24,0.76 -2.47,2.8 -4.13,9 -1.65,1.57 -0.82,1.67 -1.55,1.15 -0.4,6.71 -0.73,2.08 -1.24,1.68 -2.06,1.46 -6.91,3.35 -1.45,2.72 -1.54,1.05 -2.06,2.61 -2.99,4.29 -2.07,5.65 -0.2,4.18 -0.19,5.34 -0.54,3.03 -1.46,1.46 -1.22,1.16 -0.72,2.61 -1.75,0.42 0.2,1.57 1.86,3.66 -0.21,0.83 -3.5,-0.83 -1.96,-1.68 -2.99,-0.94 0.31,2.51 -0.62,0.21 -1.14,-1.88 -1.96,-1.36 -0.82,-0.31 -0.75,0.08 -1.62,-0.08 -2.89,-1.78 -0.41,0.94 4.1,2.41 -0.49,0.62 2.37,1.68 -4.33,0.1 -1.75,-0.63 -3.72,-2.51 -0.51,-0.83 -4.13,-1.57 -1.34,-1.26 -0.62,0.11 -0.41,0.94 -1.65,0.21 -2.58,1.25 -1.13,1.15 -2.27,0.74 -3.61,-3.67 -0.41,1.16 -0.52,-0.11 -2.37,-3.56 -2.27,-1.98 -1.02,-0.64 -2.79,0.12 -4.23,-2.2 -1.14,0.31 -2.68,-0.21 -0.51,2.1 -1.34,0.73 -0.93,1.77 -0.72,-0.94 -1.13,0.11 0.1,0.63 1.64,0.73 -0.92,0.84 -0.2,1.15 0.07,0.62 1.27,0.63 0,0 0.01,3 -0.72,1.72 -4.11,1.47 -7.73,-4.66 -5.32,-1.22 -8.21,-4.9 -14.01,-9.8 -6.52,-7.36 0,0 0,0 0,0 -6.59,-7.36 -5.16,-3.41 -65.43,-66.12 -14.33,-5.71 -54.760003,-10.56 0,0 14.300003,-20.96 13.74,-17.44 3.1,-7.93 1.79,-1.91 6.51,-11.61 2.24,-6.84 4.48,-9.11 3.18,-3.04 6.53,-1.78 3.56,-0.12 4.09,-15.5 4.96,-6.22 7.19,-13.17 9.74,-11.08 9.31,-14.13 15.99,-15.19 7.17,-7.73 8.59,-27.42 20.1,-27.259997 9.03,-10.86 13.81,-13.85 4.24,-0.08 3.18,1.17 3.47,2.06 3.76,0.3 z" 35 | } 36 | ] 37 | } -------------------------------------------------------------------------------- /docs/static/maps/empty.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "empty", 3 | "name": "Empty", 4 | "viewBox": "0 0 19760 13460", 5 | "layers": [ ] 6 | } -------------------------------------------------------------------------------- /docs/static/maps/rwanda.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "rwanda", 3 | "name": "Rwanda", 4 | "viewBox": "0 0 682.26074 594.52777", 5 | "layers": [ 6 | { 7 | "id": "rw-01", 8 | "name": "Kigali City", 9 | "d": "m 458.91984,261.54528 0,0 5.5,1.83 2.47,0.36 0.43,1.79 2.29,3.26 1.28,4.84 -0.22,4.64 2.08,2.55 1.98,2 0.69,5.5 -0.12,6.6 -1.58,2.83 -4.58,2.18 -4.84,2.05 -1.82,2.09 -0.21,3.88 -1.01,12.12 -2.22,12.12 -2.65,6.08 -2.27,3.22 -2.19,-3.03 -2.55,-3.2 -2.27,-3.49 -3.54,-4.65 -4.11,-1.16 -4.08,1.44 -3.59,1.56 -1.93,1.01 -2.34,1.72 -2.01,1.71 -0.82,1.25 -1.14,0.21 -0.98,0.04 -2.7,0.24 -3.02,0.64 -1.94,0.61 -2.21,0.49 -1.99,0.38 -1.13,0.28 -0.94,0.29 -2.06,0.26 -2.88,-0.31 -1.56,-2.07 -1.22,-1.44 -2.41,0.66 -1.75,1.84 -2.08,1.15 -3.23,1.42 -1.53,1.3 -0.8,-0.6 -2.11,-0.66 -1.91,-0.63 -1.46,-0.21 -2.88,-1.78 -2.05,-4.08 0.65,-3.25 2.46,-2.5 2.72,-1.09 1.18,-1.29 1.53,-2.57 -2.19,-5.17 -3.17,-5 1.14,-1.74 0.65,-2.12 0.24,-2.13 0.05,-1.29 0.11,-0.62 0.57,-1.48 -0.97,-2.43 -1.01,-2.53 -1.01,-2.08 -0.97,-1.32 -0.69,-1.11 -0.9,-2.56 -1.01,-2.86 -0.68,-1.13 0.18,-0.43 0.88,-0.35 1.25,-0.97 -1.32,-4.03 -1.84,-5.1 1.49,-3.41 2.76,-4.58 2.55,-4.06 3.23,-1.11 4.48,2.91 4.13,2.78 4.4,-2.6 3.65,-4.2 1.87,-2.47 6.8,-3.05 8.23,-1.46 3.19,0.49 1.84,-2.37 2.32,-5.71 1.7,-4.39 2.62,1.18 5.55,3.27 11.07,7.36 10.48,7.44 z" 10 | }, 11 | { 12 | "id": "rw-03", 13 | "name": "Northern", 14 | "d": "m 325.17984,89.31528 0,0 0.04,0 3.68,1.87 9.44,13.72 1.49,7.04 0.8,13.82 3.26,7.11 5.76,5.38 6.56,1.88 7.06,-0.77 7.37,-2.74 22.8,-12.63 3.47,-0.73 3.05,-7.33 4.38,-4.51 1.74,-0.94 0.01,0.01 1.41,0.73 0.97,0.26 1.89,1.49 1.06,3.42 1.85,2.53 2.19,1.76 4.23,7.08 3.75,5.65 2.93,5.47 2.9,6.32 1.42,3.16 0.85,5.17 0.25,3.09 3.03,-0.92 4.01,-1.41 3.28,0 1.84,0.99 -0.14,1.55 -2.67,2.39 -1.77,5.64 1.4,7.52 2.59,6.84 3.31,5.97 4.37,4.61 6.09,7.92 6.53,8.1 4.79,5.19 1.97,4.52 -1.12,3.85 -1.29,3.73 1.2,7.05 3.47,11.52 2.6,10.32 0.11,5.12 -1.91,1.14 -2.88,1.98 -2.38,2.52 -1.33,0.97 -2.47,-0.36 -5.5,-1.83 -10.48,-7.44 -11.07,-7.36 -5.55,-3.27 -2.62,-1.18 -1.7,4.39 -2.32,5.71 -1.84,2.37 -3.19,-0.49 -8.23,1.46 -6.8,3.05 -1.87,2.47 -3.65,4.2 -4.4,2.6 -4.13,-2.78 -4.48,-2.91 -3.23,1.11 -2.55,4.06 -2.76,4.58 -1.49,3.41 1.84,5.1 1.32,4.03 -1.25,0.97 -0.88,0.35 -0.89,-0.59 -2.67,-0.52 -3.26,-2.23 -3.23,-3.47 -2.74,-2.74 -2.12,-2 -2.48,-1.68 -2.67,-1.39 -2.31,-1.67 -4.06,-1.21 -5.86,-0.14 -6.66,1.22 -6.48,0.06 -9.17,-3.12 -6.37,-4.06 -1.68,-4.83 -4.69,-4.44 -3.95,-6.11 -4.48,-6.67 -3.45,-5.38 -1.2,-3.1 -2.58,-0.42 -4.2,0.78 -6.3,-2.31 -5.52,-3.66 -3.75,-0.7 -3.83,0.54 -2,0.61 -3.6,-2.74 -4.19,-5.04 0.42,-7.32 0.14,-9.74 -0.47,-13.76 -1.39,-10.17 -6.59,-0.47 -6.78,0.38 -6.23,-3.09 -5.45,-2.55 -1.79,-0.56 -1.33,-0.81 -2.22,0.88 -2.74,0.07 -6.35,-2.01 -7.24,-2.5 -8.1,-9.51 -6,-8.18 -1.46,-2.08 0,0 6.47,-10.19 11.55,-12.05 13.39,-9.65 13.19,-4.68 13.5,0.73 7.04,-0.52 6.25,-1.7 6.92,-3.89 5.19,-3.75 5.62,-2.91 8.15,-1.46 3.99,0.9 7.15,4.34 2.33,0.83 2.77,-1.63 2.02,-6.63 3.03,-3.61 3.11,-1.94 2.91,-0.87 2.98,0.45 z" 15 | }, 16 | { 17 | "id": "rw-02", 18 | "name": "Eastern", 19 | "d": "m 538.64984,1.84528 0,0 3.68,1.15 -2.67,2.78 -2.58,3.68 -1.06,3.78 1.11,3.61 4.89,3.37 1.11,4.58 -0.71,1.98 -1.26,1.91 -0.91,2.01 0.56,2.01 2.95,1.98 2.67,-0.42 2.19,-1.18 1.38,-0.38 4.13,2.99 1.43,2.08 1.31,8.68 2.05,4.89 6.11,10.13 1.98,6.84 3.12,4.06 0.68,2.74 -0.33,1.05 -0.77,1.45 -0.79,1.98 -0.35,2.5 1.8,5.38 4.34,3.26 9.89,4.1 3.54,2.5 5.03,4.79 3.09,1.87 22.17,8.23 6.59,0.94 6.53,3.95 1.91,8.78 -0.63,8.75 -1.04,3.96 -1.79,1.94 2,4.38 5.55,7.42 4.16,4.45 1.5,2.57 3.26,12.08 3.23,7.56 5.25,4.13 7.98,-3.05 2.45,7.12 -0.28,8.64 -4.34,26.49 -0.1,3.61 0.76,1.73 2.99,4.58 0.83,3.09 -3.85,9.24 1.18,3.54 2.67,13.47 -1.84,5.69 -3.42,5.04 -1.89,5.17 2.57,6.01 -5.45,4.27 -2.04,2.18 -1.67,2.71 10.06,1.6 1.01,8.89 -4.43,19.55 6.29,-1.36 6.05,3.02 5.12,5.14 3.59,4.86 2.81,9.76 -11.55,37.4 -2.92,14.79 1.42,22.99 -1.42,6.84 -3.47,6.28 -4.37,3.17 -5.64,2.5 -5.19,2.98 -4.68,1.15 -2.43,1.39 -3.05,0.83 -2.75,-0.66 -17.52,-8.65 -3.61,-1.14 -4.34,0.59 -3.85,3.02 -4.79,9.03 -3.76,3.16 -7.03,0.38 -7.28,-2.08 -7.15,-0.91 -6.49,3.83 -11.03,-0.42 -11.18,-5.25 -18.23,-14.96 -1.93,-2.64 -1.73,-4.73 -1.6,-1.84 -1.14,0.42 -10.62,-2.54 -1.63,-0.83 -5.4,1.6 -3.28,3.05 -1.39,1.83 -1.54,2.03 -4.32,3.99 -4.82,2.47 -6.32,2.05 -6.42,1.32 -5.41,0.24 -4.17,-0.94 -10.47,-5.1 -3.91,-0.38 -1.2,2.25 -0.17,3.16 -0.69,2.37 -15.17,19.03 -5.72,3.96 -7.5,0.24 -7.7,-2.99 -7.01,-4.65 -5.52,-4.83 -10.41,-12.33 -4.09,-3.16 -3.84,-1.35 -3.22,-0.11 -2.83,0.28 -2.6,-0.38 -5.92,-5.09 -0.58,-0.5 0.79,-0.92 0.45,-0.96 0.39,-0.83 0.79,-6.44 1.2,-6.3 0.12,-0.63 0.18,-0.52 4,-11.66 1.86,-16.5 -0.56,-11.15 3.61,-6.98 5,-5.46 2.22,-4.08 0.04,-3.88 0.01,-6.09 0.4,-3.25 1.53,-1.3 3.23,-1.42 2.08,-1.15 1.75,-1.84 2.41,-0.66 1.22,1.44 1.56,2.07 2.88,0.31 2.06,-0.26 0.94,-0.29 1.13,-0.28 1.99,-0.38 2.21,-0.49 1.94,-0.61 3.02,-0.64 2.7,-0.24 0.98,-0.04 1.14,-0.21 0.82,-1.25 2.01,-1.71 2.34,-1.72 1.93,-1.01 3.59,-1.56 4.08,-1.44 4.11,1.16 3.54,4.65 2.27,3.49 2.55,3.2 2.19,3.03 2.27,-3.22 2.65,-6.08 2.22,-12.12 1.01,-12.12 0.21,-3.88 1.82,-2.09 4.84,-2.05 4.58,-2.18 1.58,-2.83 0.12,-6.6 -0.69,-5.5 -1.98,-2 -2.08,-2.55 0.22,-4.64 -1.28,-4.84 -2.29,-3.26 -0.43,-1.79 1.33,-0.97 2.38,-2.52 2.88,-1.98 1.91,-1.14 -0.11,-5.12 -2.6,-10.32 -3.47,-11.52 -1.2,-7.05 1.29,-3.73 1.12,-3.85 -1.97,-4.52 -4.79,-5.19 -6.53,-8.1 -6.09,-7.92 -4.37,-4.61 -3.31,-5.97 -2.59,-6.84 -1.4,-7.52 1.77,-5.64 2.67,-2.39 0.14,-1.55 -1.84,-0.99 -3.28,0 -4.01,1.41 -3.03,0.92 -0.25,-3.09 -0.85,-5.17 -1.42,-3.16 -2.9,-6.32 -2.93,-5.47 -3.75,-5.65 -4.23,-7.08 -2.19,-1.76 -1.85,-2.53 -1.06,-3.42 -1.89,-1.49 -0.97,-0.26 -1.41,-0.73 -0.01,-0.01 9.91,-5.31 13.71,-5.34 3.64,-3.4 1.74,-5.11 2.05,-13.01 2.39,-4.58 2.64,-1.57 2.67,-0.45 2.67,-0.2 2.48,-0.73 5.19,-3.09 14.94,-14.2 4.39,-5.62 3.61,-6.07 0.64,-2.23 0.74,-4.82 0.98,-2.01 1.14,-0.95 1.22,-1 5.62,-2.53 2.04,-1.7 1.74,-5.1 2.17,-13.88 2.83,-4.79 5.13,-1.84 5.55,0.83 5.73,1.67 5.65,0.72 5.28,-1.31 4.41,-1.98 4.56,-0.63 5.11,1.59 z" 20 | }, 21 | { 22 | "id": "rw-04", 23 | "name": "Western", 24 | "d": "m 205.07984,157.80528 0,0 8.1,9.51 7.24,2.5 6.35,2.01 2.74,-0.07 2.22,-0.88 1.33,0.81 1.79,0.56 5.45,2.55 6.23,3.09 6.78,-0.38 6.59,0.47 1.39,10.17 0.47,13.76 -0.14,9.74 -0.42,7.32 4.19,5.04 3.6,2.74 0.87,1.21 0.97,3.41 1.29,6.09 1.13,11.28 -0.92,9.36 -1.11,3.89 -0.11,4.06 1.6,8.26 0.93,8.92 -1.73,4.31 -1.3,2.6 0.08,3.74 1.29,3.75 1.49,2.74 -0.78,3.52 -3.07,2.76 -3.89,1.23 -5.05,-0.22 -3.41,0 1.51,3.38 1.19,7.4 -0.33,7.1 1.18,3.77 0.99,2.25 -0.38,2.82 -0.28,2.91 -0.54,3.13 -2.32,3.57 -1.65,2.37 -0.83,1.63 -1.23,2.12 -0.02,2.5 -1.91,4.65 -3.07,5.64 -0.36,3.42 0.98,2.09 1.25,4.63 0.13,4.6 -2.75,1.46 -3.59,2.17 -2.3,1.3 -2.75,0.8 -2.46,0.97 -2.12,-0.81 -1.8,-0.64 -1.39,1.97 -1.94,2.05 -4.29,2.68 -3.66,3.23 -4.47,2.5 -8.35,6.53 -4.89,5.08 -2.05,-0.29 -3.97,0.17 -5.81,0.14 -6.79,1.11 -6.24,4.71 -4.27,1.92 -3.78,-1.14 -4.98,0.76 -5.09,2.61 -3.4,4.06 -0.9,4.55 2.22,5.52 2.29,4.69 -0.28,3.09 -3.36,5.33 -2.83,4.53 0.99,3.16 1,3.79 -1.37,3.06 -6.88,3.78 -7.08,3.79 -2.92,4.27 -1.52,4.41 0.31,2.26 4.06,2.2 6.24,1.97 4.52,2.06 2.77,3.74 0.73,5.1 2.01,4.19 2.54,3.35 1.66,3.3 1.39,2.1 -0.64,3.28 -0.4,3.11 0.45,2.36 1.68,2.52 3.92,5.77 -1.11,12.12 -4.73,8.46 -3.07,1.61 -1.69,0.51 -6.34,3.35 -1.16,-4.56 0.44,-3.96 -0.25,-1.56 -4.09,-3.06 -6.14,-3.5 -7.1,-1.71 -14.17,-1.77 -7.5,-2.29 -20.38,-8.89 -5.47,-0.8 -19.53,1.28 -7.62,7.47 -5.78,33.63 -5.12,-5.74 -6.88,-3.4 -10.03,-1.08 -4.48,-1.77 -12.52,-8.2 -2.61,-2.67 2.26,-25.67 -2.26,-7.82 -3.45,-3.5 -3.76,-1.81 -2.99,-2.05 -1.25,-4.31 1.22,-4.41 5.83,-5.21 -1.18,-4.1 -3.4,-6.07 -1.25,-6.67 -0.68,-7.19 2.52,-8.82 4.71,-4.07 9.03,-3.12 7.01,-2.05 5.81,-3.44 4.77,-4.86 3.89,-6.08 2.53,-5 1.14,-3.61 0.4,-2.92 3.46,-3.23 2.84,-1 9.66,0.31 14.94,-3.96 11.56,-9.13 8.39,-13.09 5.28,-15.91 1.94,-14.03 -0.69,-12.08 -8.92,-52.74 -0.73,-12.29 1.67,-12.01 6.31,-14.79 12.54,-20.06 8.59,-13.76 7.08,-13.43 4.06,-5.94 16.21,-13.43 3.4,-4.41 9.19,-18.95 3.89,-5 5.27,-2.22 25.66,-1.04 0.84,-0.21 0.74,-0.49 0.7,-0.73 1.13,-1.78 0,0 1.46,2.08 6,8.18 z" 25 | }, 26 | { 27 | "id": "rw-05", 28 | "name": "Southern", 29 | "d": "m 290.38984,232.26528 0,0 4.2,-0.78 2.58,0.42 1.2,3.1 3.45,5.38 4.48,6.67 3.95,6.11 4.69,4.44 1.68,4.83 6.37,4.06 9.17,3.12 6.48,-0.06 6.66,-1.22 5.86,0.14 4.06,1.21 2.31,1.67 2.67,1.39 2.48,1.68 2.12,2 2.74,2.74 3.23,3.47 3.26,2.23 2.67,0.52 0.89,0.59 -0.18,0.43 0.68,1.13 1.01,2.86 0.9,2.56 0.69,1.11 0.97,1.32 1.01,2.08 1.01,2.53 0.97,2.43 -0.57,1.48 -0.11,0.62 -0.05,1.29 -0.24,2.13 -0.65,2.12 -1.14,1.74 3.17,5 2.19,5.17 -1.53,2.57 -1.18,1.29 -2.72,1.09 -2.46,2.5 -0.65,3.25 2.05,4.08 2.88,1.78 1.46,0.21 1.91,0.63 2.11,0.66 0.8,0.6 -0.4,3.25 -0.01,6.09 -0.04,3.88 -2.22,4.08 -5,5.46 -3.61,6.98 0.56,11.15 -1.86,16.5 -4,11.66 -0.18,0.52 -0.12,0.63 -1.2,6.3 -0.79,6.44 -0.39,0.83 -0.45,0.96 -0.79,0.92 -2.3,-1.98 -2.69,-1.53 -3.43,0.1 -0.98,1.88 0.04,3.13 -2.19,17.19 2.42,25.84 -7.27,25.39 -1.41,34.46 -0.16,3.74 -1.8,7.4 -3.19,7.33 -4.1,6.95 -4.47,6.08 -6.87,6.98 -6.32,3.72 -6.78,1.28 -8.35,-0.24 -7.49,-2.26 -3.85,0.04 -2.5,3.12 -1.11,7.06 -1.46,3.12 -3.26,1.98 -7.51,0.94 -6.34,-0.97 -13.96,-4.62 -3.6,-1.18 -2.39,-0.14 -9.99,3.61 -2.5,1.53 -2.67,1.04 -3.47,-0.14 -7.36,0.98 -6.28,3.99 -6.38,2.15 -7.81,-4.41 -12.15,-2.26 -6.49,-1.21 -6.02,0.69 -14.48,6.29 -8.26,0.77 -2.97,-6.4 -0.4,-4.2 -3.12,-6.98 -0.76,-3.89 1.14,-3.51 4.65,-5.7 0.73,-3.82 -2.05,-4.17 -7.28,-6.84 -0.08,-0.31 6.34,-3.35 1.69,-0.51 3.07,-1.61 4.73,-8.46 1.11,-12.12 -3.92,-5.77 -1.68,-2.52 -0.45,-2.36 0.4,-3.11 0.64,-3.28 -1.39,-2.1 -1.66,-3.3 -2.54,-3.35 -2.01,-4.19 -0.73,-5.1 -2.77,-3.74 -4.52,-2.06 -6.24,-1.97 -4.06,-2.2 -0.31,-2.26 1.52,-4.41 2.92,-4.27 7.08,-3.79 6.88,-3.78 1.37,-3.06 -1,-3.79 -0.99,-3.16 2.83,-4.53 3.36,-5.33 0.28,-3.09 -2.29,-4.69 -2.22,-5.52 0.9,-4.55 3.4,-4.06 5.09,-2.61 4.98,-0.76 3.78,1.14 4.27,-1.92 6.24,-4.71 6.79,-1.11 5.81,-0.14 3.97,-0.17 2.05,0.29 4.89,-5.08 8.35,-6.53 4.47,-2.5 3.66,-3.23 4.29,-2.68 1.94,-2.05 1.39,-1.97 1.8,0.64 2.12,0.81 2.46,-0.97 2.75,-0.8 2.3,-1.3 3.59,-2.17 2.75,-1.46 -0.13,-4.6 -1.25,-4.63 -0.98,-2.09 0.36,-3.42 3.07,-5.64 1.91,-4.65 0.02,-2.5 1.23,-2.12 0.83,-1.63 1.65,-2.37 2.32,-3.57 0.54,-3.13 0.28,-2.91 0.38,-2.82 -0.99,-2.25 -1.18,-3.77 0.33,-7.1 -1.19,-7.4 -1.51,-3.38 3.41,0 5.05,0.22 3.89,-1.23 3.07,-2.76 0.78,-3.52 -1.49,-2.74 -1.29,-3.75 -0.08,-3.74 1.3,-2.6 1.73,-4.31 -0.93,-8.92 -1.6,-8.26 0.11,-4.06 1.11,-3.89 0.92,-9.36 -1.13,-11.28 -1.29,-6.09 -0.97,-3.41 -0.87,-1.21 2,-0.61 3.83,-0.54 3.75,0.7 5.52,3.66 6.3,2.31 z" 30 | } 31 | ] 32 | } -------------------------------------------------------------------------------- /docs/static/maps/usa-az.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "usa-az", 3 | "name": "Usa Az", 4 | "viewBox": "0 0 72.769997 84.220001", 5 | "layers": [ 6 | { 7 | "id": "mohave", 8 | "name": "Mohave", 9 | "d": "m 20.307205,1.9637913 11.574,2.154 3.615,0.641 -0.992,2.153 -0.671,1.695 -0.045,0.122 -0.532,1.6670007 -0.027,0.167 0,0.207 0.122,0.379 0.112,0.181 -0.144,0.841001 -0.122,0.222 -0.329,0.387 -0.131,0.109 -0.153,0.049 -2.407,0.717 -0.446,0.095 -0.451,0.05 -0.085,-0.028 -0.604,0.077 -1.095,0.419 -1.56,0.695 -0.721,1.473 -1.181,5.697 -2.839,15.442 -0.235,0.202 -0.085,0.04 -0.113,0.019 -3.826,0.212 -4.151,-1.866 -0.496,-0.867 -0.573,-0.638 -0.658,-0.789 -0.666,-2.804 -0.036,-0.519 -0.7169996,-1.126 -0.568,-1.478 -0.009,-0.068 0.018,-0.18 0.324,-1.434 0.9649996,-1.613 0.094,-0.307 0.055,-0.257 0.013,-0.288 0.072,-1.573 -0.014,-0.379 -0.094,-0.756 -0.135,-1.595 0.126,-2.259 0.279,-3.695 0.131,-1.262 0.009,-0.082 0.14,-0.126 0.103,-0.054 1.154,-0.271001 0.632,0 0.594,0.122 1.312,0.387001 0.14,0.131 0.306,0.433 0.126,0.316 0.018,0.099 0.005,0.027 0.009,0.108 0.072,0.216 0.239,0.379 0.09,0.094 0.131,0.1 0.054,0.013 0.203,0.023 0.626,0.014 0.009,-0.005 0.036,-0.02 0.018,-0.012 0.14,-0.158 1.307,-1.766 0.437,-2.2670014 0.248,-1.2990003 0.41,-2.34 0.05,-0.259 0.405,-2.124 0.388,-2.01" 10 | }, 11 | { 12 | "id": "la paz", 13 | "name": "La Paz", 14 | "d": "m 12.785205,36.181793 4.151,1.866 3.826,-0.212 0.113,-0.019 0.085,-0.04 0.235,-0.202 -0.753,4.065 -1.46,7.923 -6.576,-1.239 0.212,-1.109 -3.2629996,-0.613 -1.082,5.512 -1.09,-0.184 -1.551,-0.307 -0.938,-0.157 -0.175,-0.077 -0.497,-0.348 -0.225,-0.599 -0.008,-0.022 0.635,-3.912 1.081,-0.267 1.298,-1.532 0.42,-1.46 0.306,-1.528 0.059,-0.419 0.275,-0.987 0.302,-0.523 0.969,-1.37 1.3289996,-0.509 0.911,-0.374 1.352,-0.78 0.023,-0.018 0.036,-0.559" 15 | }, 16 | { 17 | "id": "cochise", 18 | "name": "Cochise", 19 | "d": "m 61.943205,68.970793 0.713,0.094 -1.961,13.999 -4.101,-0.594 -11.246,-1.65 0.87,-5.065 1.366,-8.894 3.015,0.469 7.928,1.145 3.416,0.496" 20 | }, 21 | { 22 | "id": "santa cruz", 23 | "name": "Santa Cruz", 24 | "d": "m 35.694205,78.078793 0.198,-1.216 2.2,0.351 0.415,-2.605 3.349,0.46 4.362,0.686 -0.87,5.065 -5.616,-0.87 -1.302,-0.302 -2.736,-1.569" 25 | }, 26 | { 27 | "id": "pima", 28 | "name": "Pima", 29 | "d": "m 28.997205,62.796793 4.372,0.738 2.397,0.474 4.052,0.662 0.356,0.053 1.69,0.172 3.354,0.465 2.541,0.392 -0.175,1.108 -1.366,8.894 -4.362,-0.686 -3.349,-0.46 -0.415,2.605 -2.2,-0.351 -0.198,1.216 -0.518,-0.296 -1.645,-0.952 -13.012,-7.504 -2.605,-1.482 -2.074,-1.245 1.091,-5.932 12.066,2.129" 30 | }, 31 | { 32 | "id": "greenlee", 33 | "name": "Greenlee", 34 | "d": "m 60.091205,52.673793 0.225,-0.451 0.086,-0.073 1.478,-0.851 3.183,0.432 -2.407,17.334 -0.713,-0.094 -1.018,-1.488 0.022,-0.175 0.235,-0.509 0.144,-0.65 0,-0.586 -0.243,-0.946 -0.582,-1.29 -0.162,-0.03 -1.303,-3.259 1.055,-7.364" 35 | }, 36 | { 37 | "id": "graham", 38 | "name": "Graham", 39 | "d": "m 55.741205,53.155793 0.64,0.599 1.078,0.243 1.055,-0.658 1.577,-0.666 -1.055,7.364 1.303,3.259 0.162,0.03 0.582,1.29 0.243,0.946 0,0.586 -0.144,0.65 -0.235,0.509 -0.022,0.175 1.018,1.488 -3.416,-0.496 -7.928,-1.145 -3.015,-0.469 0.175,-1.108 0.023,0.004 0.221,-1.42 0.703,-4.646 0.41,-2.641 0.108,-1.249 0.221,-0.947 0.108,-0.171 0.375,-0.194 0.784,-0.243 0.297,-0.04 1.596,-0.176 1.789,0.261 0.212,-1.424 1.135,0.289" 40 | }, 41 | { 42 | "id": "apache", 43 | "name": "Apache", 44 | "d": "m 70.800205,10.319792 -1.78,12.826001 -2.529,18.3 -1.428,10.285 -3.183,-0.432 -1.478,0.851 -0.086,0.073 -0.225,0.451 -1.577,0.666 -1.055,0.658 -1.078,-0.243 -0.64,-0.599 0.316,-2.133 0.392,-0.513 0.852,-4.84 1.361,-8.98 0.897,-5.646 0.536,-2.813 0.271,-1.856 -1.789,-0.266 2.546,-17.1640014 9.677,1.3750004" 45 | }, 46 | { 47 | "id": "navajo", 48 | "name": "Navajo", 49 | "d": "m 61.123205,8.9447916 -2.546,17.1640014 1.789,0.266 -0.271,1.856 -0.536,2.813 -0.897,5.646 -1.361,8.98 -0.852,4.84 -0.392,0.513 -0.316,2.133 -1.135,-0.289 0.807,-5.422 -7.888,-1.204 6.026,-38.5170017 2.583,0.391 1.649,0.325 3.34,0.5050003" 50 | }, 51 | { 52 | "id": "gila", 53 | "name": "Gila", 54 | "d": "m 48.053205,42.869793 -0.528,3.371 7.888,1.204 -1.019,6.846 -1.789,-0.261 -1.596,0.176 -0.297,0.04 -0.784,0.243 -0.375,0.194 -0.108,0.171 -0.221,0.947 -0.108,1.249 -0.166,0.004 -1.898,0.361 -1.109,0.766 -0.013,0.058 0.063,0.253 -0.027,0.09 -0.622,0.612 -0.162,0.005 -0.032,-0.014 -1.204,-3.672 -0.094,-1.042 -0.239,-1.04 -0.216,-0.834 -0.767,-2.898 -0.315,0.18 -0.266,0.224 -1.582,-2.514 -0.139,-2.29 -0.064,-0.193 -0.027,-0.046 -0.216,-0.099 -0.311,0.033 0.482,-0.754 0,-0.644 -0.059,-0.221 -0.166,-0.324 -2.213,-0.374 -0.068,-0.122 0.004,-0.033 0.371,-0.95 0.743,-1.811 0.149,-0.06 0.788,-0.233 0.258,-0.181 0.018,-0.018 0.058,-0.423 2.993,0.864 2.271,1.552 1.718,1.351 0.996,0.257" 55 | }, 56 | { 57 | "id": "pinal", 58 | "name": "Pinal", 59 | "d": "m 43.397205,52.596793 0.216,0.834 0.239,1.04 0.094,1.042 1.204,3.672 0.032,0.014 0.162,-0.005 0.622,-0.612 0.027,-0.09 -0.063,-0.253 0.013,-0.058 1.109,-0.766 1.898,-0.361 0.166,-0.004 -0.41,2.641 -0.703,4.646 -0.221,1.42 -0.023,-0.004 -2.541,-0.392 -3.354,-0.465 -1.69,-0.172 -0.356,-0.053 -4.052,-0.662 -2.397,-0.474 -4.372,-0.738 0.383,-2.219 1.257,-7.22 0.099,-0.558 0.045,0.022 0.956,1.181 1.176,0.297 1.456,0.258 2.74,0.437 0.348,-2.219 0.225,-1.108 3.484,0.587 2.231,0.342" 60 | }, 61 | { 62 | "id": "yuma", 63 | "name": "Yuma", 64 | "d": "m 18.982205,49.562793 -2.051,11.105 -1.091,5.932 -0.18,-0.112 -14.5039996,-8.717 0.357,-1.551 0.031,-0.049 0.094,-0.032 0.185,0.041 0.46,-0.424 0.437,-0.635 1.132,0.085 1.496,-0.928 0.468,-0.658 0,-0.005 0.095,-0.329 0.104,-0.848 -0.32,-0.747 -0.031,-0.032 -0.032,-0.036 1.551,0.307 1.09,0.184 1.082,-5.512 3.2629996,0.613 -0.212,1.109 6.576,1.239" 65 | }, 66 | { 67 | "id": "maricopa", 68 | "name": "Maricopa", 69 | "d": "m 20.442205,41.639793 6.17,1.108 4.647,2.362 0.424,-0.257 0.64,-0.806 0.045,-0.177 0.437,-0.667 0.153,0.042 4.322,1.343 2.43,0.406 0.311,-0.033 0.216,0.099 0.027,0.046 0.064,0.193 0.139,2.29 1.582,2.514 0.266,-0.224 0.315,-0.18 0.767,2.898 -2.231,-0.342 -3.484,-0.587 -0.225,1.108 -0.348,2.219 -2.74,-0.437 -1.456,-0.258 -1.176,-0.297 -0.956,-1.181 -0.045,-0.022 -0.099,0.558 -1.257,7.22 -0.383,2.219 -12.066,-2.129 3.511,-19.028" 70 | }, 71 | { 72 | "id": "coconino", 73 | "name": "Coconino", 74 | "d": "m 46.858205,6.6737913 6.693,1.05 -5.498,35.1460017 -0.996,-0.257 -1.718,-1.351 -2.271,-1.552 -2.993,-0.864 0.384,-2.115 0.346,-2.109 -0.419,-0.072 -1.816,-0.32 -0.032,-0.505 0.307,-1.78 -2.479,-0.352 -0.356,-0.031 -2.948,-0.496 0.378,-2.244 -0.946,-1.082 -5.093,-3.209 -1.775,-1.821 -0.879,-0.474 -0.402,-0.09 -0.162,-0.022 -0.149,0.009 1.181,-5.697 0.721,-1.473 1.56,-0.695 1.095,-0.419 0.604,-0.077 0.085,0.028 0.451,-0.05 0.446,-0.095 2.407,-0.717 0.153,-0.049 0.131,-0.109 0.329,-0.387 0.122,-0.222 0.144,-0.841001 -0.112,-0.181 -0.122,-0.379 0,-0.207 0.027,-0.167 0.532,-1.6670007 0.045,-0.122 0.671,-1.695 0.992,-2.153 11.362,1.915" 75 | }, 76 | { 77 | "id": "yavapai", 78 | "name": "Yavapai", 79 | "d": "m 24.034205,22.132793 0.149,-0.009 0.162,0.022 0.402,0.09 0.879,0.474 1.775,1.821 5.093,3.209 0.946,1.082 -0.378,2.244 2.948,0.496 0.356,0.031 2.479,0.352 -0.307,1.78 0.032,0.505 1.816,0.32 0.419,0.072 -0.346,2.109 -0.384,2.115 -0.058,0.423 -0.018,0.018 -0.258,0.181 -0.788,0.233 -0.149,0.06 -0.743,1.811 -0.371,0.95 -0.004,0.033 0.068,0.122 2.213,0.374 0.166,0.324 0.059,0.221 0,0.644 -0.482,0.754 -2.43,-0.406 -4.322,-1.343 -0.153,-0.042 -0.437,0.667 -0.045,0.177 -0.64,0.806 -0.424,0.257 -4.647,-2.362 -6.17,-1.108 0.753,-4.065 2.839,-15.442" 80 | } 81 | ] 82 | } -------------------------------------------------------------------------------- /docs/static/maps/usa-ct.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "usa-ct", 3 | "name": "Usa Ct", 4 | "viewBox": "0 0 19.549999 19.530001", 5 | "layers": [ 6 | { 7 | "id": "hartford", 8 | "name": "Hartford", 9 | "d": "m 5.4087795,4.0390392 4.6329995,-1.095 0.433,1.059 1.775,3.786 0.032,0.071 0.054,0.298 -0.464,0.361 -0.563,-0.703 -1.119,0.37 -0.7609995,0.36 -0.203,0.703 -2.339,-0.23 -0.807,-1.924 0.605,-0.257 0.053,-2.245 -1.298,0.41 -0.031,-0.964" 10 | }, 11 | { 12 | "id": "litchfield", 13 | "name": "Litchfield", 14 | "d": "m 4.9937795,4.1330392 0.415,-0.094 0.031,0.964 1.298,-0.41 -0.053,2.245 -0.605,0.257 0.807,1.924 -0.996,1.2439998 -1.722,1.216999 -0.031,0.172 0.021,0.107 0.082,0.082 0.122,0.076 -0.018,0.027 -0.135,0.004 -0.515,-0.138 -0.757,-0.262 -0.084,-0.148 -0.181,-0.298 -0.505,-1.059999 -0.081,-0.094 -0.262,-0.054 -0.88300004,-4.9040002 4.05200004,-0.857" 15 | }, 16 | { 17 | "id": "fairfield", 18 | "name": "Fairfield", 19 | "d": "m 2.1307795,11.679038 -0.306,-1.7849986 0.262,0.054 0.081,0.094 0.505,1.059999 0.181,0.298 0.084,0.148 0.757,0.262 0.515,0.138 0.135,-0.004 0.018,-0.027 0.351,0.131 0.758,0.248 1.676,1.186 -0.032,0.626 -0.117,0.27 -0.023,0.104 0.028,0.614 0.027,0.061 0.154,0.096 -0.65,0.176 -1.632,1.234 -2.239,1.901 -0.055,0.105 -0.028,0.139 -1.008,-1.297 0.702,-0.717 0.06,-0.059 0.306,-2.082 -0.158,-0.91 -0.352,-2.064" 20 | }, 21 | { 22 | "id": "new haven", 23 | "name": "New Haven", 24 | "d": "m 9.2257795,9.2490392 0.329,1.0049998 0.6849995,0.707999 0.348,-0.172 0.135,0.086 0.419,0.473 1.126,1.398 -0.496,-0.027 -0.315,0.076 -1.298,0.393 -0.8109995,0.341 -0.442,0.064 -0.208,-0.257 -0.076,0.031 -1.1,1.281 -0.149,0.208 -0.176,0.333 -0.012,0.049 0,0.014 -0.154,-0.096 -0.027,-0.061 -0.028,-0.614 0.023,-0.104 0.117,-0.27 0.032,-0.626 -1.676,-1.186 -0.758,-0.248 -0.351,-0.131 -0.122,-0.076 -0.082,-0.082 -0.021,-0.107 0.031,-0.172 1.722,-1.216999 0.996,-1.2439998 2.339,0.23" 25 | }, 26 | { 27 | "id": "middlesex", 28 | "name": "Middlesex", 29 | "d": "m 11.871779,8.5190392 2.177,3.4929988 -1.781,0.735 -1.126,-1.398 -0.419,-0.473 -0.135,-0.086 -0.348,0.172 -0.6849995,-0.707999 -0.329,-1.0049998 0.203,-0.703 0.7609995,-0.36 1.119,-0.37 0.563,0.703" 30 | }, 31 | { 32 | "id": "new london", 33 | "name": "New London", 34 | "d": "m 18.126779,6.7390392 0.244,3.6189988 -1.194,0.334 -2.43,1.126 -0.509,0.199 -0.095,0.013 -0.094,-0.018 -2.177,-3.4929988 0.464,-0.361 1.23,-1.816 0.613,0.351 0.329,0.163 1.983,-0.199 0.843,-0.346 0.65,-0.113 0.143,0.541" 35 | }, 36 | { 37 | "id": "tolland", 38 | "name": "Tolland", 39 | "d": "m 13.822779,2.0610392 0.251,0.869 -0.89,0.225 -0.194,0.063 0.387,1.551 0.442,0.252 0.387,0.627 -0.274,0.324 -0.366,0.37 -1.23,1.816 -0.054,-0.298 -0.032,-0.071 -1.775,-3.786 -0.433,-1.059 3.466,-0.821 0.315,-0.062" 40 | }, 41 | { 42 | "id": "windham", 43 | "name": "Windham", 44 | "d": "m 16.688779,1.5960392 1.015,3.538 0.28,1.064 -0.65,0.113 -0.843,0.346 -1.983,0.199 -0.329,-0.163 -0.613,-0.351 0.366,-0.37 0.274,-0.324 -0.387,-0.627 -0.442,-0.252 -0.387,-1.551 0.194,-0.063 0.89,-0.225 -0.251,-0.869 0.397,-0.082 2.406,-0.572 0.063,0.189" 45 | } 46 | ] 47 | } -------------------------------------------------------------------------------- /docs/static/maps/usa-de.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "usa-de", 3 | "name": "Usa De", 4 | "viewBox": "0 0 12.85 19.82", 5 | "layers": [ 6 | { 7 | "id": "new castle", 8 | "name": "New Castle", 9 | "d": "m 4.2935993,1.6692217 -0.352,1.249 -0.207,-0.04 -0.438,0.648 -0.17,0.433 0,0.066 0.035,0.122 0.045,0.11 0.509,1.234 1.096,1.501 -2.208,1.397 -0.284,-1.009 -1.158,-4.331 1.536,-1.87 1.835,0.066 -0.239,0.424" 10 | }, 11 | { 12 | "id": "sussex", 13 | "name": "Sussex", 14 | "d": "m 4.9335993,16.682222 -0.686,-2.443 1.359,-0.355 0.563,-0.51 0.034,-0.194 0.164,-0.387 0.784,-0.559 0.752,-0.419 0.081,0.347 0.108,0.13 0.898,0.718 0.508,0.387 0.357,0.139 0.2659997,0.05 0.198,-0.054 0.139,-0.108 0.023,-0.077 0.252,0.527 0.604,1.764 0.442,1.518 0.108,0.441 -2.8609997,0.625 -0.145,0.034 -0.379,0.086 -0.159,0.03 -0.137,0.027 -0.037,0.006 -0.502,0.094 -0.206,0.041 -0.586,0.112 -0.293,0.055 -0.036,0.004 -0.689,0.117 -0.303,0.05 -0.116,-0.407 -0.108,-0.369 -0.135,-0.486 -0.262,-0.934" 15 | }, 16 | { 17 | "id": "kent", 18 | "name": "Kent", 19 | "d": "m 2.6035993,8.3892217 2.208,-1.397 0.852,0.505 0.433,0.555 0.081,0.117 0.238,0.612 0.028,0.212 0.991,2.0200003 0.469,0.802 -0.752,0.419 -0.784,0.559 -0.164,0.387 -0.034,0.194 -0.563,0.51 -1.359,0.355 -1.464,-5.2140003 -0.18,-0.636" 20 | } 21 | ] 22 | } -------------------------------------------------------------------------------- /docs/static/maps/usa-hi.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "usa-hi", 3 | "name": "Usa Hi", 4 | "viewBox": "0 0 69.739998 42.68", 5 | "layers": [ 6 | { 7 | "id": "kauai", 8 | "name": "Kauai", 9 | "d": "m 10.173552,1.5364262 1.317,0 0.567,0.377 0.186,0.564 0,0.378 -0.377,0.94 0,1.131 -0.753,0.752 -0.563,0.379 -1.883,-0.19 -0.754,-0.752 -1.13,-0.378 -0.377,-0.376 0,-0.566 0.566,-0.753 1.884,-1.506 1.317,0 m -8.852,6.028 -0.188,-0.191 0.188,-1.129 1.13,-0.754 0.189,-0.564 0.565,0 -0.188,1.318 -0.942,0.377 -0.565,0.943 -0.189,0" 10 | }, 11 | { 12 | "id": "honolulu", 13 | "name": "Honolulu", 14 | "d": "m 32.587552,12.081427 -0.755,0.568 0,-0.189 -1.13,0.376 -0.942,-0.565 -1.883,0.189 -0.754,0.189 -0.376,-0.944 -0.566,-0.376 -0.187,-0.564 -0.566,-0.566 0,-0.5650001 -0.565,-0.375001 1.884,-0.3789997 0.942,-1.316 0.565,-0.378 0.564,0.187 0.942,1.695 0.188,0 0.188,0.3779997 -0.188,0.376001 0.188,0.5640001 0.754,0.567 0.188,-0.567 0.377,0 0,0.567 0.377,0.189 0.188,0.753 0.567,0.186" 15 | }, 16 | { 17 | "id": "maui", 18 | "name": "Maui", 19 | "d": "m 41.060552,13.589427 0.19,0 0.377,0.187 0.187,0 -0.187,-0.376 1.693,-0.376 0.754,0.189 -0.377,0.754 -1.13,0.752 -0.565,0 -2.258,-0.375 -2.637,0.187 -0.19,0 0.567,-1.507 0.188,0 2.637,0.189 0.565,0.187 0.186,0.189 m 4.52,1.318 0.565,0.189 0.942,1.507 1.883,-0.941 1.13,0.188 0,0.188 1.507,0.943 1.318,0.376 0.188,0.376 0,0.752 -0.753,0.754 -0.942,0.377 -1.883,0.755 -1.319,0 -0.377,-0.19 -0.376,-2.259 -0.564,-0.189 -0.377,0.375 -1.13,-0.564 -0.753,-0.754 -0.189,-0.752 0.377,-0.754 0.188,-0.377 0.565,0 m -4.895,1.696 1.317,0 0.754,0.565 0.376,0.565 -0.189,0.752 -1.693,0.567 -0.19,-0.754 -0.186,-0.565 -0.753,-0.752 0,-0.191 0.564,-0.187 m 5.649,3.768 0.188,0.187 0.188,0.753 -1.507,0.377 -0.564,-0.19 0.376,-0.562 1.319,-0.565" 20 | }, 21 | { 22 | "id": "hawaii", 23 | "name": "Hawaii", 24 | "d": "m 59.142552,40.710427 -0.376,0.377 -0.754,-0.565 -1.883,-0.753 -0.379,-0.566 -0.188,-0.376 0.188,-3.014 -1.318,-3.203 -0.754,-0.752 -0.565,-0.753 0.189,-0.567 1.13,-1.129 1.318,-1.694 0,-0.753 -0.941,-1.319 -0.189,-0.753 0.189,-0.755 0.376,-0.188 1.131,0.188 0.376,0.565 1.696,0.755 2.073,0.376 2.26,0.943 1.507,0.941 0.753,0.941 0.188,1.508 0.941,-0.189 0.377,0.563 0,0.755 0.942,0.753 1.318,0.564 -0.377,0.754 -2.071,1.883 -1.695,0.944 -1.507,0.188 -1.695,1.317 -0.941,0.564 -1.319,2.45" 25 | }, 26 | { 27 | "id": "kalawao", 28 | "name": "Kalawao", 29 | "d": "m 40.874552,13.400427 -0.565,-0.187 1.318,0.187 0.187,0.376 -0.187,0 -0.377,-0.187 -0.19,0 -0.186,-0.189" 30 | } 31 | ] 32 | } -------------------------------------------------------------------------------- /docs/static/maps/usa-ma.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "usa-ma", 3 | "name": "Usa Ma", 4 | "viewBox": "0 0 38.73 22.26", 5 | "layers": [ 6 | { 7 | "id": "worcester", 8 | "name": "Worcester", 9 | "d": "m 14.226419,6.37558 0.04,0.09 0.694,0.707 0.465,-0.108 0.15,-0.135 0.751,0.094 0.369,0.045 1.375,0.559 0.145,0.267 0.067,0.703 0.036,0.7199998 -0.112,0.366001 -0.289,0.5680002 0.64,1.613 0.252,0.235 0.298,0.098 0.802,0.127 0.274,1.798 -2.749,0.843 -0.063,-0.189 -2.406,0.572 -0.397,0.082 -0.315,0.062 -0.415,-1.654 -0.604,0.162 -0.658,-0.139 -0.044,-0.163 0.004,-0.098 0.238,-0.609 -1.175,-1.014 -0.167,-0.663 -0.054,-1.104 0.112,-0.6710012 -0.197,-1.0729998 -0.614,-1.321 3.271,-0.708 0.276,-0.062" 10 | }, 11 | { 12 | "id": "middlesex", 13 | "name": "Middlesex", 14 | "d": "m 20.030419,4.55458 0.358,0.861 0.919,0.617 1.045,0.622 0.748,0.951 -0.054,0.347 -0.216,0.486 -0.37,0.3439998 -0.387,0.247 0.049,1.0140012 -0.455,-0.3560002 -0.027,-0.018 -0.23,-0.022 -0.157,0.022 -0.501,0.3380002 0.118,0.185 0.22,0.288 0.127,0.271 -0.222,0.699 -0.463,0.414 -0.623,0.46 -0.802,-0.127 -0.298,-0.098 -0.252,-0.235 -0.64,-1.613 0.289,-0.5680002 0.112,-0.366 -0.036,-0.7200004 -0.067,-0.703 -0.145,-0.267 -1.375,-0.559 -0.369,-0.045 -0.751,-0.094 -0.15,0.135 -0.465,0.108 -0.694,-0.707 -0.04,-0.09 2.28,-0.51 0.14,-0.031 0.04,-0.009 3.111,-0.717 0.233,-0.554" 15 | }, 16 | { 17 | "id": "nantucket", 18 | "name": "Nantucket", 19 | "d": "m 35.643419,19.603581 0.085,-0.045 0.15,-0.172 0.108,-0.202 0.072,-0.262 -0.044,-0.261 -0.051,-0.09 -0.099,-0.091 -0.091,-0.072 -0.053,-0.045 -0.009,-0.049 0.167,0.036 0.198,0.175 0.856,0.97 0.051,0.18 -0.006,0.135 -0.004,0.027 -0.068,0.09 -0.221,0.167 -0.122,0.054 -0.765,0.176 -0.207,0.04 -0.533,-0.036 -0.906,-0.18 -0.121,-0.054 -0.086,-0.072 -0.05,-0.104 0.14,-0.036 0.122,0.027 0.054,0.018 0.473,-0.018 0.671,-0.175 0.289,-0.131" 20 | }, 21 | { 22 | "id": "barnstable", 23 | "name": "Barnstable", 24 | "d": "m 29.744419,14.321581 0.063,0.067 0.19,0.135 0.274,0.153 0.248,0.1 0.605,0.063 0.363,-0.023 0.965,-0.099 1.303,-0.802 0.482,-0.325 0.316,-0.283 0.097,-0.212 0.02,-0.109 -0.113,-0.374 -0.176,-0.46 -0.081,-0.18 -0.297,-0.423 -0.963,-1.127 -0.15,-0.104 -0.167,-0.063 -0.266,-0.063 -0.067,0.014 -0.126,0.071 -0.069,0.064 -0.054,0.095 -0.031,0.157 0.009,0.068 -0.532,-0.207 -0.031,-0.037 0.036,-0.13 0.095,-0.104 0.162,-0.09 0.157,-0.05 0.278,-0.027 0.447,0.023 0.353,0.077 0.269,0.117 0.312,0.216 0.297,0.297 0.374,0.433 0.298,0.428 0.446,0.771 0.213,0.424 0.306,0.833 0.178,0.618 0.032,0.284 -0.148,1.231 -0.09,0.089 -0.031,-0.856 -0.022,-0.072 -0.046,-0.081 -0.239,-0.113 -0.112,-0.027 -0.068,0.014 -2.867,1.279 -0.121,0.055 -2.088,1.807 -0.333,0.433 -0.351,-0.036 -0.208,-2.51 0.659,-1.429" 25 | }, 26 | { 27 | "id": "suffolk", 28 | "name": "Suffolk", 29 | "d": "m 23.100419,7.60558 0.456,0.181 0.211,1.5139998 -1.645,0.7430012 -0.049,-1.0140012 0.387,-0.247 0.37,-0.3439998 0.216,-0.486 0.054,-0.347" 30 | }, 31 | { 32 | "id": "bristol", 33 | "name": "Bristol", 34 | "d": "m 21.365419,14.244581 2.407,-2.127 0.725,1.581 0.808,1.47 0.959,0.374 0.428,0.297 1.005,1.547 -0.171,-0.01 -0.428,0.063 -0.175,0.23 -0.105,0.136 -0.017,0.031 0.031,0.419 0.044,0.153 0.145,0.298 -0.829,0.775 -0.785,0.235 -1.288,-2.042 -0.392,-0.365 -1.078,-0.6 -1.284,-2.465" 35 | }, 36 | { 37 | "id": "plymouth", 38 | "name": "Plymouth", 39 | "d": "m 24.665419,9.6205796 0.878,-0.271 0.46,0.067 0.091,0.01 0.076,0.05 0.512,0.342001 1.16,1.2890004 1.68,2.217 0.162,0.37 0.06,0.627 -0.659,1.429 -1.388,1.636 -1.005,-1.547 -0.428,-0.297 -0.959,-0.374 -0.808,-1.47 -0.725,-1.581 0.893,-2.4970014" 40 | }, 41 | { 42 | "id": "norfolk", 43 | "name": "Norfolk", 44 | "d": "m 23.767419,9.3005796 0.898,0.32 -0.893,2.4970014 -2.407,2.127 -1.182,-0.122 -0.274,-1.798 0.623,-0.46 0.463,-0.414 0.222,-0.699 -0.127,-0.271 -0.22,-0.288 -0.118,-0.185 0.501,-0.3380014 0.157,-0.022 0.23,0.022 0.027,0.018 0.455,0.3560004 1.645,-0.7430014" 45 | }, 46 | { 47 | "id": "essex", 48 | "name": "Essex", 49 | "d": "m 23.556419,1.74658 0.067,0.27 0.347,0.829 0.54,1.037 0.559,0.248 -0.901,1.87 -0.612,1.786 -0.456,-0.181 -0.748,-0.951 -1.045,-0.622 -0.919,-0.617 -0.358,-0.861 0.06,-0.136 0.509,-1.022 0.122,-0.127 0.22,-0.189 0.667,-0.568 0.869,-0.645 0.004,0 0.074,-0.031 0.063,-0.032 0.274,-0.018 0.664,-0.04" 50 | }, 51 | { 52 | "id": "hampden", 53 | "name": "Hampden", 54 | "d": "m 12.774419,12.991581 -0.238,0.609 -0.004,0.098 0.044,0.163 0.658,0.139 0.604,-0.162 0.415,1.654 -3.466,0.821 -4.6329998,1.095 -0.415,0.094 -0.352,-0.635 -0.045,-0.117 -0.108,-0.573 0.352,-0.022 -0.028,-1.429 -0.18,-0.775 0.334,-0.505 0.544,-0.09 0.123,0.077 0.252,0.838 -0.144,0.27 0.392,0.199 0.874,0.131 0.925,-0.014 0.77,-0.572 1.6809998,-0.695 1.645,-0.599" 55 | }, 56 | { 57 | "id": "hampshire", 58 | "name": "Hampshire", 59 | "d": "m 11.599419,11.977581 1.175,1.014 -1.645,0.599 -1.6809998,0.695 -0.77,0.572 -0.925,0.014 -0.874,-0.131 -0.392,-0.199 0.144,-0.27 -0.252,-0.838 -0.123,-0.077 -0.544,0.09 -0.334,0.505 -0.031,0.108 -0.203,0.009 -0.392,-0.18 -0.212,-0.64 0,-0.113 0.527,-0.009 -0.04,-1.149 -0.063,-0.965 -0.114,-0.184 1.187,0.667 1.571,0.04 1.616,-0.077 0.476,-0.207 1.0959998,-0.099 0.803,0.825" 60 | }, 61 | { 62 | "id": "berkshire", 63 | "name": "Berkshire", 64 | "d": "m 1.6064192,9.0885798 2.235,-0.4829998 1.009,2.223001 0.114,0.184 0.063,0.965 0.04,1.149 -0.527,0.009 0,0.113 0.212,0.64 0.392,0.18 0.203,-0.009 0.031,-0.108 0.18,0.775 0.028,1.429 -0.352,0.022 0.108,0.573 0.045,0.117 0.352,0.635 -4.052,0.857 -0.09,0.022 -0.216,-0.437 0.142,-5.688 0.083,-3.1680012" 65 | }, 66 | { 67 | "id": "franklin", 68 | "name": "Franklin", 69 | "d": "m 9.0564192,7.49258 1.6229998,-0.347 0.614,1.321 0.197,1.0729998 -0.112,0.6710012 0.054,1.104 0.167,0.663 -0.803,-0.825 -1.0959998,0.099 -0.476,0.207 -1.616,0.077 -1.571,-0.04 -1.187,-0.667 -1.009,-2.223001 0.857,-0.18 4.358,-0.933" 70 | }, 71 | { 72 | "id": "dukes", 73 | "name": "Dukes", 74 | "d": "m 30.361419,18.715581 1.529,0.27 0.121,0.293 0.13,0.541 -0.009,0.077 -2.69,0.982 -0.28,-0.238 0.365,-1.145 0.1,-0.167 0.279,-0.343 0.35,-0.382 0.055,0.004 0.05,0.108 m -0.717,-0.419 -0.77,0.974 -0.226,0.256 -0.631,0.496 -0.329,0.104 -0.089,-0.018 0.436,-0.446 0.848,-0.933 0.41,-0.469 0.351,0.036" 75 | } 76 | ] 77 | } -------------------------------------------------------------------------------- /docs/static/maps/usa-md.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "usa-md", 3 | "name": "Usa Md", 4 | "viewBox": "0 0 49.57 25.6", 5 | "layers": [ 6 | { 7 | "id": "allegany", 8 | "name": "Allegany", 9 | "d": "m 12.004419,6.2252197 0.366,-0.068 0.301,1.091 -1.032,1.767 -1.8789998,0.103 -1.19,-0.473 -1.618,2.2270013 -1.064,-0.239 0.782,-3.4260013 1.188,-0.217 4.1459998,-0.765" 10 | }, 11 | { 12 | "id": "garrett", 13 | "name": "Garrett", 14 | "d": "m 6.6704192,7.2072197 -0.782,3.4260013 -1.834,2.213 -1.614,1.937 -1.059,-6.6120013 0.821,-0.148 4.468,-0.816" 15 | }, 16 | { 17 | "id": "st. mary's", 18 | "name": "St. Mary's", 19 | "d": "m 34.824419,20.310221 0.473,1.234 -0.527,1.149 -3.705,-0.748 -0.395,-0.532 -0.515,-0.896 0.004,-0.24 0.536,-1.644 0.087,-0.077 0.346,-0.049 0.185,-0.015 0.397,0.054 3.114,1.764" 20 | }, 21 | { 22 | "id": "charles", 23 | "name": "Charles", 24 | "d": "m 27.144419,16.740221 0.596,1.072 0.157,-0.338 0.026,-0.1 0.046,-0.058 0.13,-0.089 0.317,-0.149 1.027,-0.177 1.221,0.285 0.039,0.072 0.245,0.685 0.5,0.149 0.153,-0.005 0.109,0.459 -0.397,-0.054 -0.185,0.015 -0.346,0.049 -0.087,0.077 -0.536,1.644 -0.004,0.24 0.515,0.896 0.052,0.329 0,0.167 -0.022,0.1 -3.867,-0.618 -0.104,-0.023 -0.378,-0.184 -0.217,-0.374 -0.27,-0.838 0.026,-0.411 0.154,-0.554 0.406,-0.731 0.437,-0.541 0.257,-0.995" 25 | }, 26 | { 27 | "id": "worcester", 28 | "name": "Worcester", 29 | "d": "m 44.907419,16.359221 2.861,-0.625 0.05,0.473 0.004,0.338 -0.009,0.461 -0.04,0.419 -0.393,2.957 -0.026,0.181 -0.032,0.125 -0.056,0.207 -0.033,0.149 -0.159,0.495 -3.672,1.249 0.558,-1.392 -0.316,-1.155 -0.918,-1.094 2.41,-0.681 0.302,-0.667 0.05,-0.303 -0.217,-0.607 -0.364,-0.53" 30 | }, 31 | { 32 | "id": "wicomico", 33 | "name": "Wicomico", 34 | "d": "m 41.076419,15.753221 0.135,0.486 0.108,0.369 0.116,0.407 0.303,-0.05 0.689,-0.117 0.036,-0.004 0.293,-0.055 0.586,-0.112 0.206,-0.041 0.502,-0.094 0.037,-0.006 0.137,-0.027 0.159,-0.03 0.379,-0.086 0.145,-0.034 0.364,0.53 0.217,0.607 -0.05,0.303 -0.302,0.667 -2.41,0.681 -2.362,1.049 -0.587,-0.203 0.019,-0.968 0.306,-2.001 0.063,-0.118 0.208,-0.117 0.233,-0.212 0.47,-0.824" 35 | }, 36 | { 37 | "id": "washington", 38 | "name": "Washington", 39 | "d": "m 14.731419,5.7112197 6.099,-1.154 -0.145,0.708 -0.148,0.4 -0.081,0.137 -0.353,0.228 -0.025,0.14 -0.078,0.938 -0.023,1.208 -0.184,1.7620003 -0.387,0.045 -1.461,-2.0060018 -2.228,-1.23 -0.166,-0.184 -0.45,-0.326 -0.361,-0.135 -0.364,-0.04 -0.334,-0.009 -0.059,0.022 -0.068,0.077 -0.256,0.405 -0.348,0.641 -0.117,0.014 -0.523,-0.104 -0.301,-1.091 2.361,-0.446" 40 | }, 41 | { 42 | "id": "calvert", 43 | "name": "Calvert", 44 | "d": "m 34.824419,20.310221 -3.114,-1.764 -0.109,-0.459 -0.662,-2.682 0.049,-0.108 0.27,-0.234 0.248,-0.028 0.374,0.536 0.686,-0.03 0.004,0.171 0.059,0.27 0.513,1.745 0.046,0.126 0.157,0.289 0.19,0.252 0.446,0.324 0.834,0.672 0.036,0.067 0.045,0.267 -0.072,0.586" 45 | }, 46 | { 47 | "id": "talbot", 48 | "name": "Talbot", 49 | "d": "m 37.681419,11.728221 0.095,0.306 -0.12,1.839 -0.101,0.405 0.032,0.045 0.527,0.443 0.27,0.062 -1.906,0.951 0.031,-0.058 -0.139,-0.253 -1.019,-0.811 -0.167,0.019 -0.545,0.193 -0.032,0.023 -0.103,0.238 0,0.131 0.158,0.149 0.017,0.131 -0.153,0.139 -0.112,-0.171 -0.114,-0.852 0.009,-0.28 0.192,-0.747 0.021,-0.032 0.261,-0.311 0.699,-0.054 2.199,-1.505" 50 | }, 51 | { 52 | "id": "caroline", 53 | "name": "Caroline", 54 | "d": "m 37.681419,11.728221 1.343,-3.2820013 1.79,6.3730013 -2.43,0.009 -0.27,-0.062 -0.527,-0.443 -0.032,-0.045 0.101,-0.405 0.12,-1.839 -0.095,-0.306" 55 | }, 56 | { 57 | "id": "kent", 58 | "name": "Kent", 59 | "d": "m 35.928419,6.0632197 2.272,-0.546 0.284,1.009 0.18,0.636 -1.289,0.22 -0.821,0.231 -0.329,0.144 -0.383,0.486 -0.672,1.6859999 -0.418,0.1990014 -0.307,-0.009 -0.586,-0.5990004 -0.014,-0.262 0.036,-0.2070004 0.415,-1.93 0.113,-0.193 0.473,-0.636 1.046,-0.229" 60 | }, 61 | { 62 | "id": "baltimore city", 63 | "name": "Baltimore City", 64 | "d": "m 31.227419,9.1062197 -0.91,-0.064 -0.767,-0.253 -0.188,-1.222 1.856,0 0.009,1.539" 65 | }, 66 | { 67 | "id": "prince george's", 68 | "name": "Prince George's", 69 | "d": "m 27.973419,10.926221 0.536,0.269 1.695,1.236 0.37,0.825 0.365,2.149 0.662,2.682 -0.153,0.005 -0.5,-0.149 -0.245,-0.685 -0.039,-0.072 -1.221,-0.285 -1.027,0.177 -0.317,0.149 -0.13,0.089 -0.046,0.058 -0.026,0.1 -0.157,0.338 -0.596,-1.072 0.243,-1.124 -0.005,-0.057 1.074,-1.686 -1.173,-0.604 0.69,-2.343" 70 | }, 71 | { 72 | "id": "anne arundel", 73 | "name": "Anne Arundel", 74 | "d": "m 31.227419,9.1062197 0.019,0.002 1.198,1.1410013 0.586,1.077 0.067,0.14 -0.359,1.006 -0.249,0.797 -0.365,1.635 0.087,0.286 0.066,0.113 0.289,0.238 -0.686,0.03 -0.374,-0.536 -0.248,0.028 -0.27,0.234 -0.049,0.108 -0.365,-2.149 -0.37,-0.825 -1.695,-1.236 1.095,-1.6940014 0.713,-0.4589999 0.91,0.064" 75 | }, 76 | { 77 | "id": "howard", 78 | "name": "Howard", 79 | "d": "m 27.460419,8.1312197 2.144,1.3699999 -1.095,1.6940014 -0.536,-0.269 -0.162,0.121 -0.424,0.023 -0.113,-0.036 -2.068,-1.4070014 -0.474,-0.486 -0.198,-0.2579999 -0.009,-0.03 0.018,-0.069 0.123,-0.134 0.008,-0.009 2.786,-0.51" 80 | }, 81 | { 82 | "id": "montgomery", 83 | "name": "Montgomery", 84 | "d": "m 24.666419,8.6502197 -0.123,0.134 -0.018,0.069 0.009,0.03 0.198,0.2579999 0.474,0.486 2.068,1.4070014 0.113,0.036 0.424,-0.023 0.162,-0.121 -0.69,2.343 -0.513,-0.266 -0.551,0.897 -2.347,-1.176 -0.469,0.053 -0.483,0.023 -0.355,-0.023 -0.019,-0.008 -0.639,-0.429 -0.063,-0.045 -0.006,0 -0.057,-0.076 -0.069,-0.22 -0.003,-0.01 0.012,-0.117 0.024,-0.162 0.004,-0.059 0.041,-0.108 0.396,-0.626 2.48,-2.2670013" 85 | }, 86 | { 87 | "id": "queen anne's", 88 | "name": "Queen Anne's", 89 | "d": "m 37.681419,11.728221 -2.199,1.505 -0.312,-3.3040014 0.672,-1.6859999 0.383,-0.486 0.329,-0.144 0.821,-0.231 1.289,-0.22 0.36,1.284 -1.343,3.2820013" 90 | }, 91 | { 92 | "id": "cecil", 93 | "name": "Cecil", 94 | "d": "m 33.697419,1.9022197 3.345,-0.7160001 1.158,4.3310001 -2.272,0.546 -1.169,-2.015 -2.004,-1.942 0.942,-0.204" 95 | }, 96 | { 97 | "id": "harford", 98 | "name": "Harford", 99 | "d": "m 32.692419,2.1192197 0.063,-0.013 2.004,1.942 0.385,1.127 0.014,0.058 -0.965,1.135 -0.379,0.448 -0.406,0.445 -0.266,-0.175 -0.234,-0.168 -0.049,-0.116 -0.884,-1.051 -0.59,-0.446 -0.582,-0.176 -0.202,0.041 -0.262,-0.207 -0.405,-0.605 -0.095,-0.225 -0.325,-1.348 3.178,-0.666" 100 | }, 101 | { 102 | "id": "baltimore county", 103 | "name": "Baltimore County", 104 | "d": "m 27.415419,3.2222197 2.099,-0.437 0.325,1.348 0.095,0.225 0.405,0.605 0.262,0.207 0.202,-0.041 0.582,0.176 0.59,0.446 0.884,1.051 0.049,0.116 -0.049,0 -0.167,0.077 -0.234,0.78 -0.098,0.563 0.17,0.086 0.056,-0.019 -0.011,0.095 -0.031,0.105 -0.267,0.45 -0.139,0.1669999 -0.608,-0.059 -0.284,-0.055 -0.019,-0.002 -0.009,-1.539 -1.856,0 0.188,1.222 0.767,0.253 -0.713,0.4589999 -2.144,-1.3699999 -0.383,-1.343 0.157,-1.019 0.181,-2.547" 105 | }, 106 | { 107 | "id": "carroll", 108 | "name": "Carroll", 109 | "d": "m 27.415419,3.2222197 -0.181,2.547 -0.157,1.019 0.383,1.343 -2.786,0.51 0.203,-1.479 0.036,-0.396 -0.009,-0.027 -1.208,-0.883 -0.817,-0.741 0.387,-1.041 2.097,-0.424 2.052,-0.428" 110 | }, 111 | { 112 | "id": "frederick", 113 | "name": "Frederick", 114 | "d": "m 20.924419,4.5382197 2.342,-0.464 -0.387,1.041 0.817,0.741 1.208,0.883 0.009,0.027 -0.036,0.396 -0.203,1.479 -0.008,0.009 -2.48,2.2670013 -2.393,-0.839001 0.184,-1.7620003 0.023,-1.208 0.078,-0.938 0.025,-0.14 0.353,-0.228 0.081,-0.137 0.148,-0.4 0.145,-0.708 0.094,-0.019" 115 | }, 116 | { 117 | "id": "somerset", 118 | "name": "Somerset", 119 | "d": "m 40.364419,20.196221 2.362,-1.049 0.918,1.094 0.316,1.155 -0.558,1.392 -0.33,0.645 -1.186,-0.032 -0.874,-1.952 -0.648,-1.253 m -1.818,2.001 0.33,-0.116 0.126,-0.262 0.054,-0.256 0.14,0.328 0.143,0.424 0.073,0.23 -0.045,0.071 -0.109,0.045 -0.148,-0.045 -0.274,-0.197 -0.29,-0.222 m 0.8,2.001 -0.109,-0.374 -0.077,-0.4 -0.006,-0.14 0.028,-0.094 0.185,-0.131 0.077,-0.028 0.09,0.023 0.329,0.139 0.067,0.055 0.023,0.121 -0.131,0.06 -0.022,0.391 0.067,0.271 0.018,0.243 -0.027,0.247 -0.271,0.077 -0.179,-0.179 -0.062,-0.281" 120 | }, 121 | { 122 | "id": "dorchester", 123 | "name": "Dorchester", 124 | "d": "m 38.384419,14.828221 2.43,-0.009 0.262,0.934 -0.47,0.824 -0.233,0.212 -0.208,0.117 -0.063,0.118 -0.306,2.001 -0.019,0.968 -1.172,0.356 -1.366,0.204 -0.139,-0.045 -0.775,-0.473 -0.045,-0.033 -0.14,-0.252 -0.613,-1.204 -0.32,-0.707 0.083,-1.496 0.056,-0.095 0.222,-0.189 0.09,-0.05 0.82,-0.23 1.906,-0.951 m 0.162,7.369 -0.022,-0.018 -0.009,0.006 -0.086,-0.149 -0.072,-0.253 -0.072,-0.537 0.14,-0.171 0.221,-0.05 0.333,0.271 0.019,0.077 0.058,0.19 -0.054,0.256 -0.126,0.262 -0.33,0.116" 125 | } 126 | ] 127 | } -------------------------------------------------------------------------------- /docs/static/maps/usa-nh.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "usa-nh", 3 | "name": "Usa Nh", 4 | "viewBox": "0 0 18.969999 37.599998", 5 | "layers": [ 6 | { 7 | "id": "coos", 8 | "name": "Coos", 9 | "d": "m 6.8874923,0.82808577 0.347,0.99100003 1.907,5.751 0.135,0.433 1.6909997,5.3770012 -0.132,0.662 -2.5729997,1.65 -0.676,-0.441 -0.365,-0.397 -0.271,-0.072 -1.198,-0.284 -0.99,-0.167 -0.926,-0.69 0.193,0.018 0.289,-0.212 0.023,-0.035 0.126,-0.163 0.053,-0.077 0.037,-0.058 0.446,-0.784 0.045,-0.077 0,-0.004 0.104,-0.289 0.121,-1.122 -0.234,-0.378001 -0.04,-0.064 -0.226,-0.28 -0.414,-0.5089996 -0.339,-0.334 -0.076,-0.215 0.013,-3.1650006 0.217,-0.446 -0.076,-0.766 0.216,-2.33 0.725,-0.947 0.1,-0.071 0.193,0.099 0.081,0.161 0.041,0.046 0.289,0.144 0.473,0.032 0.396,-0.082 0.059,-0.049 0.216,-0.85600003" 10 | }, 11 | { 12 | "id": "grafton", 13 | "name": "Grafton", 14 | "d": "m 3.2324923,14.425087 0.604,-0.784 0.926,0.69 0.99,0.167 1.198,0.284 0.271,0.072 0.365,0.397 0.443,0.639 0.648,0.987 0.374,1.956 -1.744,0.757 0.508,1.163 0.203,0.365 0.316,0.825 -1.077,0.767 -0.338,1.392 -0.519,0.167 -0.734,-0.482 -0.266,0.563 -0.239,0.68 -0.592,0.046 -1.035,0.04 -1.05,-0.162 -1.118,0.09 0.572,-2.429 0.248,-5.201 -0.153,-0.122 -0.168,-0.226 -0.296,-1.032 0,-0.081 0.031,-0.131 0.302,-0.545 0.028,-0.022 0.047,-0.045 0.624,-0.388 0.631,-0.397" 15 | }, 16 | { 17 | "id": "strafford", 18 | "name": "Strafford", 19 | "d": "m 12.089492,23.061087 0.211,-0.51 0.365,0.789 1.027,-0.315 0.253,-0.586 0.157,1.758 0.069,0.288 0.085,0.181 0.262,0.364 0.166,0.086 0.452,0.225 1.09,0.65 0.028,0.031 0.35,1.406 -0.284,0.555 -0.081,0.117 -1.798,0.465 0.23,-0.817 -2.452,-1.167 0.068,-0.162 0.446,-1.073 -0.446,-1.001 -0.365,-0.879 0.167,-0.405" 20 | }, 21 | { 22 | "id": "rockingham", 23 | "name": "Rockingham", 24 | "d": "m 17.865492,27.933087 -0.39,2.628 -0.664,0.04 -0.274,0.018 -0.063,0.032 -0.074,0.031 -0.004,0 -0.869,0.645 -0.667,0.568 -0.22,0.189 -0.122,0.127 -0.509,1.022 -1.064,-0.117 -0.897,-0.55 -0.316,-0.703 -0.225,-0.491 0.28,-1.122 0.432,-3.669 2.452,1.167 -0.23,0.817 1.798,-0.465 0.081,-0.117 0.284,-0.555 1.261,0.505" 25 | }, 26 | { 27 | "id": "cheshire", 28 | "name": "Cheshire", 29 | "d": "m 1.6544923,30.836087 0.267,0.274 0.554,-0.094 0.027,-0.329 0.239,-0.149 1.532,-0.649 -0.046,0.451 0.01,0.229 1.284,-0.288 0.171,1.425 0.203,0.942 0.514,-0.122 1.065,1.803 0.395,0.923 -3.271,0.708 -1.623,0.347 -1.031,-0.829 -0.267,-0.573 -0.041,-0.13 0.587,-2.01 -0.246,-1.379 -0.02,-0.077 -0.303,-0.473" 30 | }, 31 | { 32 | "id": "sullivan", 33 | "name": "Sullivan", 34 | "d": "m 1.3664923,25.044087 1.118,-0.09 1.05,0.162 1.035,-0.04 0.592,-0.046 -0.625,1.74 -0.109,1.204 0.441,0.788 0.32,0.347 0.406,0.366 -0.073,0.806 -1.284,0.288 -0.01,-0.229 0.046,-0.451 -1.532,0.649 -0.239,0.149 -0.027,0.329 -0.554,0.094 -0.267,-0.274 -0.036,-0.951 0.041,-1.127 -0.193,-0.505 -0.447,-2.055 0.347,-1.154" 35 | }, 36 | { 37 | "id": "hillsborough", 38 | "name": "Hillsborough", 39 | "d": "m 5.5944923,29.475087 0.806,-0.469 2.407,0.103 1.7529997,0.938 1.227,0.203 -0.28,1.122 0.225,0.491 0.316,0.703 0.897,0.55 1.064,0.117 -0.06,0.136 -0.233,0.554 -3.111,0.717 -0.04,0.009 -0.14,0.031 -2.2799997,0.51 -0.276,0.062 -0.395,-0.923 -1.065,-1.803 -0.514,0.122 -0.203,-0.942 -0.171,-1.425 0.073,-0.806" 40 | }, 41 | { 42 | "id": "belknap", 43 | "name": "Belknap", 44 | "d": "m 8.0184923,21.118087 0.793,0.496 2.2899997,1.271 0.988,0.176 -0.167,0.405 0.365,0.879 0.446,1.001 -0.446,1.073 -1.213,-0.505 -2.1589997,-0.848 -0.423,0.348 -0.117,-0.014 -0.803,-0.64 -0.158,-0.149 -0.495,-0.509 0.338,-1.392 1.077,-0.767 -0.316,-0.825" 45 | }, 46 | { 47 | "id": "merrimack", 48 | "name": "Merrimack", 49 | "d": "m 6.9194923,24.102087 0.495,0.509 0.158,0.149 0.803,0.64 0.117,0.014 0.423,-0.348 2.1589997,0.848 1.213,0.505 -0.068,0.162 -0.432,3.669 -1.227,-0.203 -1.7529997,-0.938 -2.407,-0.103 -0.806,0.469 -0.406,-0.366 -0.32,-0.347 -0.441,-0.788 0.109,-1.204 0.625,-1.74 0.239,-0.68 0.266,-0.563 0.734,0.482 0.519,-0.167" 50 | }, 51 | { 52 | "id": "carroll", 53 | "name": "Carroll", 54 | "d": "m 10.967492,13.380087 1.842,6.098 1.136,2.961 -0.253,0.586 -1.027,0.315 -0.365,-0.789 -0.211,0.51 -0.988,-0.176 -2.2899997,-1.271 -0.793,-0.496 -0.203,-0.365 -0.508,-1.163 1.744,-0.757 -0.374,-1.956 -0.648,-0.987 -0.443,-0.639 0.676,0.441 2.5729997,-1.65 0.132,-0.662" 55 | } 56 | ] 57 | } -------------------------------------------------------------------------------- /docs/static/maps/usa-nj.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "usa-nj", 3 | "name": "Usa Nj", 4 | "viewBox": "0 0 15.8 33.450001", 5 | "layers": [ 6 | { 7 | "id": "monmouth", 8 | "name": "Monmouth", 9 | "d": "m 11.216069,11.487977 1.589,-0.054 0.443,-0.618 -0.009,-0.027 0.031,-0.037 0.068,0 0.13,0.06 0.249,0.32 0.268,0.852 0.073,0.3 0.006,0.024 0.081,0.603 0.022,0.262 0.014,0.555 0.027,1.844 -1.281,0.197 -0.324,0.009 -0.802,-0.573 -1.371,0.271 -1.1260003,1.501 -0.501,-0.671 -0.373,-0.505 0.5,-0.37 0.58,-0.685 0,-0.032 -0.053,-0.094 1.7590003,-3.132" 10 | }, 11 | { 12 | "id": "ocean", 13 | "name": "Ocean", 14 | "d": "m 9.3040687,16.976977 1.1260003,-1.501 1.371,-0.271 0.802,0.573 0.324,-0.009 1.281,-0.197 -0.005,0.239 0.055,1.054 0.017,0.293 0.076,0.892 0.199,1.433 0.05,0.482 -0.008,0.051 -0.205,0.981 -0.547,1.924 -0.237,0.601 -0.294,0.306 -1.197,-0.542 0.135,-0.233 0.032,-0.315 -0.519,-2.249 -2.2670003,-3.255 -0.189,-0.257" 15 | }, 16 | { 17 | "id": "richmond, ny", 18 | "name": "Richmond, Ny", 19 | "d": "m 11.859069,10.301977 -0.04,0.018 -0.091,0.127 -0.142,0.126 -0.041,-0.004 -0.145,0.153 -0.091,0.055 -0.067,0.107 -0.231,0.094 -0.053,-0.036 -0.019,-0.063 0.019,-0.072 0.053,-0.105 -0.012,-0.152 0.023,-0.117 0.194,-0.226 0.044,-0.202 -0.032,-0.2479998 0.028,-0.117 -0.008,-0.127 0.053,-0.198 0.084,-0.185 0.136,-0.1030001 0.248,-0.131 0.301,-0.158 0.105,-0.018 0.077,0.077 0.072,0.212 0.197,0.2250001 -0.026,0.14 -0.36,0.7069998 -0.231,0.231 -0.045,-0.01" 20 | }, 21 | { 22 | "id": "essex", 23 | "name": "Essex", 24 | "d": "m 9.5830687,6.0019771 1.5690003,0.667 -0.068,0.465 0.437,1.383 -2.4210003,-0.297 0.483,-2.218" 25 | }, 26 | { 27 | "id": "union", 28 | "name": "Union", 29 | "d": "m 9.1000687,8.2199771 2.4210003,0.297 -0.144,0.447 -0.194,0.013 -0.045,0.015 -0.022,0.035 -0.09,0.1890001 0.067,0.483 -0.405,0.013 -0.108,-0.005 -0.446,0.013 -1.2360003,0.4419998 -0.248,0.037 -0.198,-0.9609998 0.648,-1.0180001" 30 | }, 31 | { 32 | "id": "hudson", 33 | "name": "Hudson", 34 | "d": "m 12.567069,6.6199771 -0.091,1.212 -0.13,0.37 -0.969,0.762 0.144,-0.447 -0.437,-1.383 1.483,-0.514" 35 | }, 36 | { 37 | "id": "bergen", 38 | "name": "Bergen", 39 | "d": "m 9.4390687,2.8839771 3.4110003,1.02 0.015,1.057 -0.04,0.488 -0.258,1.171 -1.483,0.514 0.068,-0.465 0.045,-0.045 0.059,-0.477 -0.014,-0.068 -0.392,-0.689 -0.23,-0.309 -0.419,-0.295 -0.9740003,-0.366 0.212,-1.536" 40 | }, 41 | { 42 | "id": "middlesex", 43 | "name": "Middlesex", 44 | "d": "m 11.093069,9.6989772 0.009,0.072 0.023,0.153 -0.009,0.2109998 -0.023,0.054 -0.063,0 -0.067,0.006 -0.136,0.157 -0.004,0.099 0.112,0.256 -0.138,0.312 -0.006,0.014 -0.013,0.144 0.099,0.202 0.077,0.077 0.257,0.032 0.005,0 -1.7590003,3.132 -1.645,-1.249 0.059,-0.017 0.117,-0.135 0.888,-1.552 -0.018,-0.318 -0.189,-0.065 -0.244,-0.198 -0.252,-0.27 -0.014,-0.094 0.063,-0.186 0.059,-0.072 0.369,-0.265 0.248,-0.037 1.2360003,-0.4419998 0.446,-0.013 0.108,0.005 0.405,-0.013" 45 | }, 46 | { 47 | "id": "somerset", 48 | "name": "Somerset", 49 | "d": "m 8.4520687,9.2379772 0.198,0.9609998 -0.369,0.265 -0.059,0.072 -0.063,0.186 0.014,0.094 0.252,0.27 0.244,0.198 0.189,0.065 0.018,0.318 -0.888,1.552 -0.117,0.135 -0.059,0.017 -0.057,-0.107 -0.289,-0.032 -0.632,0.361 -0.387,-0.563 -0.06,-0.081 -0.422,-0.875 0.162,-0.69 0.067,-0.107 0.108,-0.838 -0.361,-1.0199998 -0.072,-0.135 -0.063,-0.046 1.501,-0.8520001 0.031,0.019 0.068,0.112 0.019,0.082 0.504,1.0950001 0.523,-0.456" 50 | }, 51 | { 52 | "id": "morris", 53 | "name": "Morris", 54 | "d": "m 6.8530687,4.1179771 0.914,0.586 0.618,0.032 0.622,-0.004 0.576,1.27 -0.483,2.218 -0.648,1.0180001 -0.523,0.456 -0.504,-1.0950001 -0.019,-0.082 -0.068,-0.112 -0.031,-0.019 -1.501,0.8520001 -1.749,-0.5080001 0.798,-1.835 1.998,-2.777" 55 | }, 56 | { 57 | "id": "passaic", 58 | "name": "Passaic", 59 | "d": "m 9.2140687,2.8159771 0.225,0.068 -0.212,1.536 0.9740003,0.366 0.419,0.295 0.23,0.309 0.392,0.689 0.014,0.068 -0.059,0.477 -0.045,0.045 -1.5690003,-0.667 -0.576,-1.27 -0.622,0.004 -0.618,-0.032 -0.914,-0.586 0.95,-1.78 1.411,0.478" 60 | }, 61 | { 62 | "id": "sussex", 63 | "name": "Sussex", 64 | "d": "m 7.8030687,2.3379771 -0.95,1.78 -1.998,2.777 -2.443,-1.925 -0.054,-0.067 0.384,-0.54 0.266,-0.627 0.058,-0.388 -0.018,-0.212 -0.04,-0.041 0.018,-0.176 0.117,-0.5 0.049,-0.144 0.23,-0.4729999 0.27,-0.293 0.569,-0.41 3.542,1.2389999" 65 | }, 66 | { 67 | "id": "warren", 68 | "name": "Warren", 69 | "d": "m 2.4120687,4.9699771 2.443,1.925 -0.798,1.835 -0.093,0.247 -0.42,0.8070001 -0.077,0.104 -0.549,0.5509998 -0.947,1.057 -0.211,0.361 -0.105,-0.203 -0.064,-0.117 -0.238,-0.92 -0.1,-0.7779998 0.164,-0.385 0.076,-0.021 0.144,0.014 0.146,-0.02 0.197,-0.273 0.324,-0.9930001 0.005,-0.076 -0.032,-0.076 -0.915,-1.078 1.05,-1.961" 70 | }, 71 | { 72 | "id": "hunterdon", 73 | "name": "Hunterdon", 74 | "d": "m 4.0570687,8.7299771 1.749,0.5080001 0.063,0.046 0.072,0.135 0.361,1.0199998 -0.108,0.838 -0.067,0.107 -0.162,0.69 0.422,0.875 0.06,0.081 -0.515,0.324 -0.285,0.896 -0.679,0.244 -0.094,0 -0.064,-0.036 -0.937,-0.568 -0.73,-1.469 -1.383,-0.564 0.211,-0.361 0.947,-1.057 0.549,-0.5509998 0.077,-0.104 0.42,-0.8070001 0.093,-0.247" 75 | }, 76 | { 77 | "id": "mercer", 78 | "name": "Mercer", 79 | "d": "m 6.4470687,13.029977 0.387,0.563 0.632,-0.361 0.289,0.032 0.057,0.107 1.645,1.249 0.053,0.094 0,0.032 -0.58,0.685 -0.5,0.37 0.373,0.505 -1.329,0.185 -2.6,-1.997 0.094,0 0.679,-0.244 0.285,-0.896 0.515,-0.324" 80 | }, 81 | { 82 | "id": "camden", 83 | "name": "Camden", 84 | "d": "m 4.0040687,20.550977 0.734,-1.365 3.826,2.618 -1.01,1.844 -1.248,-0.983 -1.401,-1.537 -0.527,-0.384 -0.374,-0.193" 85 | }, 86 | { 87 | "id": "gloucester", 88 | "name": "Gloucester", 89 | "d": "m 3.6190687,21.100977 0.385,-0.55 0.374,0.193 0.527,0.384 1.401,1.537 1.248,0.983 -0.769,1.425 -0.893,-0.519 -4.295,-1.781 0.239,-0.424 1.783,-1.248" 90 | }, 91 | { 92 | "id": "salem", 93 | "name": "Salem", 94 | "d": "m 1.5970687,22.772977 4.295,1.781 0.118,1.126 0,0.267 -0.014,0.063 -1.789,-0.951 -0.956,1.581 -0.153,1.028 -2.074,-2.533 -0.098,-0.298 0.31899997,-0.815 0.352,-1.249" 95 | }, 96 | { 97 | "id": "cumberland", 98 | "name": "Cumberland", 99 | "d": "m 8.5280687,27.226977 -0.098,1.969 -1.965,-0.01 -0.677,-0.156 -1.301,-0.448 -1.169,-0.652 -0.058,-0.063 -0.162,-0.199 0.153,-1.028 0.956,-1.581 1.789,0.951 0.014,-0.063 0,-0.267 -0.118,-1.126 0.893,0.519 1.743,2.154" 100 | }, 101 | { 102 | "id": "cape may", 103 | "name": "Cape May", 104 | "d": "m 8.5280687,27.226977 3.1430003,-0.393 -0.411,0.636 -0.122,0.217 -0.139,0.346 -0.221,0.599 -0.243,0.858 0,0.04 0.004,0.008 0.013,0.014 -0.365,1.303 -0.2650003,0.644 -0.339,0.582 -0.5,0.279 -0.126,0.036 -0.297,0.032 -0.046,-0.023 -0.063,-0.077 -0.014,-0.806 0.018,-0.199 0.05,-0.27 0.19,-0.739 0.022,-0.157 0.009,-0.195 -0.023,-0.401 -0.053,-0.19 -0.222,-0.162 -0.098,-0.013 0.098,-1.969" 105 | }, 106 | { 107 | "id": "atlantic", 108 | "name": "Atlantic", 109 | "d": "m 13.309069,23.827977 -1.638,3.006 -3.1430003,0.393 -1.743,-2.154 0.769,-1.425 1.01,-1.844 0.136,0.072 0.553,0.284 0.714,0.704 0.8920003,0.414 0.239,0.072 0.432,0.086 0.582,-0.15 1.197,0.542" 110 | }, 111 | { 112 | "id": "burlington", 113 | "name": "Burlington", 114 | "d": "m 7.4740687,16.490977 1.329,-0.185 0.501,0.671 0.189,0.257 2.2670003,3.255 0.519,2.249 -0.032,0.315 -0.135,0.233 -0.582,0.15 -0.432,-0.086 -0.239,-0.072 -0.8920003,-0.414 -0.714,-0.704 -0.553,-0.284 -0.136,-0.072 -3.826,-2.618 0.622,-0.906 2.114,-1.789" 115 | } 116 | ] 117 | } -------------------------------------------------------------------------------- /docs/static/maps/usa-nv.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "usa-nv", 3 | "name": "Usa Nv", 4 | "viewBox": "0 0 69.110001 103.62", 5 | "layers": [ 6 | { 7 | "id": "elko", 8 | "name": "Elko", 9 | "d": "m 57.962499,12.246657 1.167,0.184 1.411,0.284 2.47,0.559 2.028,0.401 2.244,0.442 -2.438,12.67 -2.204,11.257 -1.974,-0.378 -5.905,-1.245 -2.172,-0.441 -2.194,-0.473 -1.902,-0.442 -3.002,-0.63 -1.592,-0.329 -0.031,-5.685 0.005,-1.252 0.026,-0.36 0.879,-4.11 -4.051,-0.889 -4.079,-0.904 2.848,-12.6579989 3.642,0.8339997 1.082,0.248 13.742,2.9169992" 10 | }, 11 | { 12 | "id": "white pine", 13 | "name": "White Pine", 14 | "d": "m 45.491499,34.434657 3.002,0.63 1.902,0.442 2.194,0.473 2.172,0.441 5.905,1.245 1.974,0.378 -0.523,2.692 -0.897,4.633 -2.145,11.046 -9.33,-1.843 -7.558,-8 0.739,-3.484 0.094,-0.279 0.402,-0.297 0.239,-0.231 0.248,-0.293 0.351,-0.716 0.879,-3.273 0.365,-3.249 -0.013,-0.315" 15 | }, 16 | { 17 | "id": "clark", 18 | "name": "Clark", 19 | "d": "m 36.048499,76.079657 1.312,0.292 0.279,-0.088 7.442,1.536 1.622,0.329 0.739,0.275 7.121,1.406 -0.405,2.124 -0.05,0.259 -0.41,2.34 -0.248,1.299 -0.437,2.267 -1.307,1.766 -0.14,0.158 -0.018,0.012 -0.036,0.02 -0.009,0.005 -0.626,-0.014 -0.203,-0.023 -0.054,-0.013 -0.131,-0.1 -0.09,-0.094 -0.239,-0.379 -0.072,-0.216 -0.009,-0.108 -0.005,-0.027 -0.018,-0.099 -0.126,-0.316 -0.306,-0.433 -0.14,-0.131 -1.312,-0.387 -0.594,-0.122 -0.632,0 -1.154,0.271 -0.103,0.054 -0.14,0.126 -0.009,0.082 -0.131,1.262 -0.279,3.695 -0.126,2.259 0.135,1.595 0.094,0.756 0.014,0.379004 -0.072,1.573003 -0.013,0.288013 -0.055,0.257003 -0.094,0.307 -0.965,1.61301 -1.41,-2.09901 -3.823,-5.720023 -0.265,-0.393 -0.713,-1.063 -2.068,-3.106 -2.028,-3.019 2.307,-10.655" 20 | }, 21 | { 22 | "id": "lincoln", 23 | "name": "Lincoln", 24 | "d": "m 49.745499,54.571657 9.33,1.843 -0.262,1.335 -1.036,5.417 -1.361,6.937 -1.465,7.716 -0.388,2.01 -7.121,-1.406 -0.739,-0.275 -1.622,-0.329 -7.442,-1.536 -0.279,0.088 -1.312,-0.292 0.189,-1.004 0.577,-2.714 2.498,-11.633 8.815,1.83 1.618,-7.987" 25 | }, 26 | { 27 | "id": "esmeralda", 28 | "name": "Esmeralda", 29 | "d": "m 22.870499,51.440657 3.781,7.161 -2.965,13.07 -5.184,-7.783 -4.593,-6.856 0.135,0.068 0.627,0.148 3.655,-2.609 4.544,-3.199" 30 | }, 31 | { 32 | "id": "nye", 33 | "name": "Nye", 34 | "d": "m 22.951499,43.449657 0.924,-0.051 2.794,0.036 1.708,0.072 7.076,1.61 6.734,1.455 7.558,8 -1.618,7.987 -8.815,-1.83 -2.498,11.633 -0.577,2.714 -0.189,1.004 -2.307,10.655 -0.117,-0.172 -1.479,-2.217 -0.356,-0.532 -2.758,-4.142 -3.403,-5.093 -0.645,-0.978 -1.104,-1.641 -0.193,-0.288 2.965,-13.07 -7.369,-13.955 0.243,-1.023 3.426,-0.174" 35 | }, 36 | { 37 | "id": "eureka", 38 | "name": "Eureka", 39 | "d": "m 40.727499,21.809657 4.051,0.889 -0.879,4.11 -0.026,0.36 -0.005,1.252 0.031,5.685 1.592,0.329 0.013,0.315 -0.365,3.249 -0.879,3.273 -0.351,0.716 -0.248,0.293 -0.239,0.231 -0.402,0.297 -0.094,0.279 -0.739,3.484 -6.734,-1.455 0.185,-0.672 0.554,-2.312 0.969,-4.291 0.938,-4.263 -0.058,-0.023 -0.027,-0.018 0.96,-4.093 1.505,-6.973 0.248,-0.662" 40 | }, 41 | { 42 | "id": "lander", 43 | "name": "Lander", 44 | "d": "m 36.648499,20.905657 4.079,0.904 -0.248,0.662 -1.505,6.973 -0.96,4.093 0.027,0.018 0.058,0.023 -0.938,4.263 -0.969,4.291 -0.554,2.312 -0.185,0.672 -7.076,-1.61 -1.708,-0.072 -2.794,-0.036 -0.095,-0.342 0.054,-0.356 0.929,-2.555 0.08,-0.198 0.131,-0.15 1.28,-0.87 0.658,-0.31 0.82,-0.16 0.073,0.019 0.068,-0.022 0.13,-0.126 0.095,-0.203 0.284,-1.132 0.757,-3.732 -0.347,-0.833 3.822,-6.121 0.847,-1.361 2.168,0.482 1.019,-4.523" 45 | }, 46 | { 47 | "id": "mineral", 48 | "name": "Mineral", 49 | "d": "m 14.360499,41.378657 8.591,2.071 -3.426,0.174 -0.243,1.023 3.588,6.794 -4.544,3.199 -3.655,2.609 -0.627,-0.148 -0.135,-0.068 -5.5070002,-8.285 2.4330002,0.601 0.316,-1.253 0.771,-3.169 0.076,-1.139 -0.851,-0.208 0.284,-1.159 0.554,-0.671 0.671,-0.776 1.704,0.405" 50 | }, 51 | { 52 | "id": "douglas", 53 | "name": "Douglas", 54 | "d": "m 2.4354988,37.877657 1.176,0.297 1.127,0.47 0.027,0.202 1.938,0.483 2.303,0.608 -0.284,1.173 -0.384,0 -0.518,-0.127 -0.275,0.315 -0.414,0.868 -0.095,0.372 0.05,1.18 0.09,0.415 0.207,0.757 -0.112,1.248 -0.163,0.682 -1.924,-2.88 -2.375,-3.562 -0.51,-1.933 0.136,-0.568" 55 | }, 56 | { 57 | "id": "carson city", 58 | "name": "Carson City", 59 | "d": "m 2.5974988,37.205657 3.078,-0.351 0.162,0.595 0.275,0.261 0.834,0.208 0.005,0.067 -0.208,1.294 -0.04,0.05 -1.938,-0.483 -0.027,-0.202 -1.127,-0.47 -1.176,-0.297 0.162,-0.672" 60 | }, 61 | { 62 | "id": "lyon nv", 63 | "name": "Lyon Nv", 64 | "d": "m 11.881499,33.325657 1.082,-0.681 0.266,-0.104 -0.347,0.952 -0.645,1.421 -0.41,1.639 0.924,1.604 0.577,0.92 0.455,0.671 0.69,1.159 -0.113,0.472 -1.704,-0.405 -0.671,0.776 -0.554,0.671 -0.284,1.159 0.851,0.208 -0.076,1.139 -0.771,3.169 -0.316,1.253 -2.4330002,-0.601 -1.294,-1.927 0.163,-0.682 0.112,-1.248 -0.207,-0.757 -0.09,-0.415 -0.05,-1.18 0.095,-0.372 0.414,-0.868 0.275,-0.315 0.518,0.127 0.384,0 0.284,-1.173 -2.303,-0.608 0.04,-0.05 0.208,-1.294 -0.005,-0.067 -0.834,-0.208 -0.275,-0.261 -0.162,-0.595 0.681,-0.04 1.843,-0.483 2.7720002,-3.109 0.91,0.103" 65 | }, 66 | { 67 | "id": "churchill", 68 | "name": "Churchill", 69 | "d": "m 28.792499,32.428657 0.347,0.833 -0.757,3.732 -0.284,1.132 -0.095,0.203 -0.13,0.126 -0.068,0.022 -0.073,-0.019 -0.82,0.16 -0.658,0.31 -1.28,0.87 -0.131,0.15 -0.08,0.198 -0.929,2.555 -0.054,0.356 0.095,0.342 -0.924,0.051 -8.591,-2.071 0.113,-0.472 -0.69,-1.159 -0.455,-0.671 -0.577,-0.92 -0.924,-1.604 0.41,-1.639 0.645,-1.421 0.347,-0.952 -0.266,0.104 -1.082,0.681 0.244,-0.6 0.293,-1.356 -0.086,-0.464 0.257,-1.768 0.131,-0.545 5.899,1.47 3.399,0.761 2.916,0.685 3.858,0.92" 70 | }, 71 | { 72 | "id": "pershing", 73 | "name": "Pershing", 74 | "d": "m 32.614499,26.307657 -3.822,6.121 -3.858,-0.92 -2.916,-0.685 -3.399,-0.761 -5.899,-1.47 -1.091,-0.262 1.649,-6.539 0.244,0.054 1.424,-5.566 4.917,1.212 -0.324,1.326 10.785,2.541 -0.509,2.195 3.168,0.74 0.077,0.032 -0.004,0.08 -0.442,1.902" 75 | }, 76 | { 77 | "id": "storey", 78 | "name": "Storey", 79 | "d": "m 10.971499,33.222657 -2.7720002,3.109 -1.843,0.483 -0.681,0.04 0.78,-0.884 0.405,-1.456 -0.122,-0.355 0.036,-0.635 1.506,-0.186 0.744,0.076 1.0000002,0.028 0.465,-0.072 0.482,-0.148" 80 | }, 81 | { 82 | "id": "washoe", 83 | "name": "Washoe", 84 | "d": "m 17.740499,3.1416588 0.33,0.085 -0.456,1.722 -0.843,3.3579993 -0.342,2.2629989 -0.343,1.37 -0.239,0.577 -0.234,0.252 -0.617,2.457 -0.239,1.009 0.189,0.045 -1.424,5.566 -0.244,-0.054 -1.649,6.539 1.091,0.262 -0.131,0.545 -0.257,1.768 0.086,0.464 -0.293,1.356 -0.244,0.6 -0.91,-0.103 -0.482,0.148 -0.465,0.072 -1.0000002,-0.028 -0.744,-0.076 -1.506,0.186 -0.036,0.635 0.122,0.355 -0.405,1.456 -0.78,0.884 -3.078,0.351 0.482,-1.897 0.437,-1.618 0.92,-3.484 0.198,-0.735 0.973,-3.65 0.631,-2.399 0.005,-0.013 0.185,-0.726 0.581,-2.248 1.158,-4.611 1.028,-4.002 2.6370002,-10.1859982 5.908,1.505" 85 | }, 86 | { 87 | "id": "humboldt", 88 | "name": "Humboldt", 89 | "d": "m 18.070499,3.2266588 5.061,1.276 5.395,1.24 10.898,2.4779993 0.072,0.027 -3.867,17.1809989 -2.168,-0.482 -0.847,1.361 0.442,-1.902 0.004,-0.08 -0.077,-0.032 -3.168,-0.74 0.509,-2.195 -10.785,-2.541 0.324,-1.326 -4.917,-1.212 -0.189,-0.045 0.239,-1.009 0.617,-2.457 0.234,-0.252 0.239,-0.577 0.343,-1.37 0.342,-2.2629989 0.843,-3.3579993 0.456,-1.722" 90 | } 91 | ] 92 | } -------------------------------------------------------------------------------- /docs/static/maps/usa-ri.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "usa-ri", 3 | "name": "Usa Ri", 4 | "viewBox": "0 0 10.1 11.75", 5 | "layers": [ 6 | { 7 | "id": "kent", 8 | "name": "Kent", 9 | "d": "m 6.3329186,4.5258644 -0.257,0.991 -0.533,0.825 -2.812,0.816 -0.143,-0.541 -0.28,-1.064 3.051,-0.901 0.027,-0.014 0.072,-0.122 -0.027,-0.13 0.027,-0.131 0.028,-0.027 0.288,-0.167 0.126,0.023 0.117,0.086 0.185,0.212 0.131,0.144" 10 | }, 11 | { 12 | "id": "providence", 13 | "name": "Providence", 14 | "d": "m 4.0419186,1.1718644 1.182,0.122 1.284,2.465 -0.306,0.623 -0.185,-0.212 -0.117,-0.086 -0.126,-0.023 -0.288,0.167 -0.028,0.027 -0.027,0.131 0.027,0.13 -0.072,0.122 -0.027,0.014 -3.051,0.901 -1.015,-3.538 2.749,-0.843" 15 | }, 16 | { 17 | "id": "bristol", 18 | "name": "Bristol", 19 | "d": "m 6.3329186,4.5258644 -0.131,-0.144 0.306,-0.623 1.078,0.6 0.392,0.365 -0.392,0.591 -0.144,0.238 -0.015,0.05 -0.707,-0.217 -0.387,-0.86" 20 | }, 21 | { 22 | "id": "newport", 23 | "name": "Newport", 24 | "d": "m 7.9779186,4.7238644 1.288,2.042 -0.342,0.441 -1.271,0.617 -0.369,0.095 -0.14,-0.09 -0.005,-0.058 0.284,-2.155 0.004,-0.013 0.015,-0.05 0.144,-0.238 0.392,-0.591" 25 | }, 26 | { 27 | "id": "washington", 28 | "name": "Washington", 29 | "d": "m 2.7309186,7.1578644 2.812,-0.816 0.533,-0.825 0.257,0.794 0.139,0.946 0.061,0.406 0.011,0.161 0.009,0.244 -0.017,0.131 -0.083,0.518 -0.138,0.5229999 -3.078,1.5589997 -0.262,-0.022 -0.244,-3.6189996" 30 | } 31 | ] 32 | } -------------------------------------------------------------------------------- /docs/static/maps/usa-vt.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "usa-vt", 3 | "name": "Usa Vt", 4 | "viewBox": "0 0 19.52 35.580002", 5 | "layers": [ 6 | { 7 | "id": "essex", 8 | "name": "Essex", 9 | "d": "m 13.950779,2.9602144 3.476,-0.965 -0.217,0.446 -0.013,3.165 0.076,0.215 0.339,0.334 0.414,0.509 0.226,0.28 0.04,0.064 0.234,0.378 -0.121,1.122 -0.104,0.289 0,0.004 -0.045,0.077 -0.446,0.7839997 -0.037,0.058 -0.053,0.077 -0.126,0.163 -0.023,0.035 -0.289,0.2119999 -0.193,-0.018 -0.604,0.784 -1.014,-0.829 -0.428,-2.6139996 0.392,-1.055 -1.082,-0.414 -0.361,-0.14 0.014,-1.618 -0.055,-1.343" 10 | }, 11 | { 12 | "id": "orleans", 13 | "name": "Orleans", 14 | "d": "m 13.950779,2.9602144 0.055,1.343 -0.014,1.618 0.361,0.14 -0.32,0.798 -0.239,0.189 -0.93,-0.348 -0.359,1.682 -0.297,1.2519997 -1.127,-0.27 -0.166,-0.162 -0.78,-0.9599997 -0.06,-0.559 -1.4280001,-0.333 -0.523,-2.934 5.8270001,-1.456" 15 | }, 16 | { 17 | "id": "bennington", 18 | "name": "Bennington", 19 | "d": "m 11.270779,27.037214 -0.285,-0.023 0.054,0.753 0.226,1.172 -1.191,0.216 0.045,0.27 0.442,2.132 0.804,-0.153 0.504,2.384 -0.857,0.18 -2.2350001,0.483 -0.69,-2.47 -0.964,-4.71 3.5600001,-0.694 0.587,0.46" 20 | }, 21 | { 22 | "id": "grand isle", 23 | "name": "Grand Isle", 24 | "d": "m 2.4767789,5.7952144 0.563,3.7219997 -0.703,2.2949999 -0.149,-0.126 -0.27,-0.505 -0.459,-2.6909996 -0.33,-2.114 0.014,-0.221 1.334,-0.36" 25 | }, 26 | { 27 | "id": "washington", 28 | "name": "Washington", 29 | "d": "m 10.796779,10.473214 2.136,0.545 0.036,0.028 0.068,0.126 -0.014,0.207 -0.675,2.732 -0.514,-0.095 -1.329,1.145 -0.132,0.986 -0.253,1.073 -0.5710001,-0.077 -2.313,-1.185 0.154,-1.568 -0.154,-0.036 0.271,-1.686 0.153,-0.68 1.514,0.333 1.3750001,-0.712 0.248,-1.136" 30 | }, 31 | { 32 | "id": "caledonia", 33 | "name": "Caledonia", 34 | "d": "m 14.352779,6.0612144 1.082,0.414 -0.392,1.055 0.428,2.6139996 1.014,0.829 -0.631,0.397 -0.624,0.388 -0.047,0.045 -0.028,0.022 -0.302,0.545 -0.031,0.131 0,0.081 0.296,1.032 0.168,0.226 0.153,0.122 -1.28,-0.154 -1.181,0.419 -0.63,-0.116 0.675,-2.732 0.014,-0.207 -0.068,-0.126 -0.036,-0.028 -2.136,-0.545 0.284,-1.1089999 1.127,0.27 0.297,-1.2519997 0.359,-1.682 0.93,0.348 0.239,-0.189 0.32,-0.798" 35 | }, 36 | { 37 | "id": "lamoille", 38 | "name": "Lamoille", 39 | "d": "m 8.6467789,7.3502144 1.4280001,0.333 0.06,0.559 0.78,0.9599997 0.166,0.162 -0.284,1.1089999 -0.248,1.136 -1.3750001,0.712 -1.514,-0.333 -1.627,-2.0109999 0.405,-1.1399997 0.691,-1.172 1.153,-0.491 0.365,0.176" 40 | }, 41 | { 42 | "id": "franklin", 43 | "name": "Franklin", 44 | "d": "m 8.1237789,4.4162144 0.523,2.934 -0.365,-0.176 -1.153,0.491 -0.691,1.172 -0.405,1.1399997 -2.993,-0.46 -0.563,-3.7219997 5.647,-1.379" 45 | }, 46 | { 47 | "id": "chittenden,vt", 48 | "name": "Chittenden,vt", 49 | "d": "m 3.0397789,9.5172141 2.993,0.46 1.627,2.0109999 -0.153,0.68 -0.271,1.686 0.154,0.036 -0.154,1.568 -0.41,-1.073 -0.541,-0.333 -2.203,0.865 -0.487,0.054 -0.302,-1.568 0.05,-0.541 -0.014,-0.14 -0.005,-0.008 -0.167,-0.451 -0.129,-0.28 -0.429,-0.518 -0.262,-0.153 0.703,-2.2949999" 50 | }, 51 | { 52 | "id": "addison", 53 | "name": "Addison", 54 | "d": "m 3.5947789,15.471214 0.487,-0.054 2.203,-0.865 0.541,0.333 0.41,1.073 2.313,1.185 -0.235,0.96 -0.189,0.569 -0.393,0.374 -0.753,0.635 0.159,0.343 0.086,0.153 -0.708,-0.095 -1.122,0.329 -0.545,0.207 0.328,0.861 -1.357,0.505 -0.334,-0.649 -0.157,-0.284 -1.075,-2.538 -0.02,-0.044 0,-0.004 -0.022,-0.429 0,-0.42 0.005,-1.067 0.378,-1.078" 55 | }, 56 | { 57 | "id": "rutland", 58 | "name": "Rutland", 59 | "d": "m 4.8197789,21.984214 1.357,-0.505 -0.328,-0.861 0.545,-0.207 1.122,-0.329 0.708,0.095 0.664,-0.586 0.788,0.185 0.161,0.175 1.1680001,1.452 0.212,2.727 -0.398,1.357 -0.135,1.09 -3.5600001,0.694 -0.546,-2.538 -1.55,-0.342 -0.306,-0.127 -0.036,-0.048 -0.091,-0.753 0.051,-0.523 0.174,-0.956" 60 | }, 61 | { 62 | "id": "windham", 63 | "name": "Windham", 64 | "d": "m 11.270779,27.037214 1.32,0.112 1.172,-0.473 1.108,-0.243 0.036,0.951 0.303,0.473 0.02,0.077 0.246,1.379 -0.587,2.01 0.041,0.13 0.267,0.573 1.031,0.829 -4.358,0.933 -0.504,-2.384 -0.804,0.153 -0.442,-2.132 -0.045,-0.27 1.191,-0.216 -0.226,-1.172 -0.054,-0.753 0.285,0.023" 65 | }, 66 | { 67 | "id": "windsor", 68 | "name": "Windsor", 69 | "d": "m 9.3137789,18.103214 0.054,0.199 0.122,0.194 0.7350001,0.063 1.058,0.126 2.704,0.311 1.204,0.167 -0.572,2.429 -0.347,1.154 0.447,2.055 0.193,0.505 -0.041,1.127 -1.108,0.243 -1.172,0.473 -1.32,-0.112 -0.587,-0.46 0.135,-1.09 0.398,-1.357 -0.212,-2.727 -1.1680001,-1.452 -0.161,-0.175 -0.788,-0.185 -0.664,0.586 -0.086,-0.153 -0.159,-0.343 0.753,-0.635 0.393,-0.374 0.189,-0.569" 70 | }, 71 | { 72 | "id": "orange", 73 | "name": "Orange", 74 | "d": "m 15.438779,13.962214 -0.248,5.201 -1.204,-0.167 -2.704,-0.311 -1.058,-0.126 -0.7350001,-0.063 -0.122,-0.194 -0.054,-0.199 0.235,-0.96 0.5710001,0.077 0.253,-1.073 0.132,-0.986 1.329,-1.145 0.514,0.095 0.63,0.116 1.181,-0.419 1.28,0.154" 75 | } 76 | ] 77 | } -------------------------------------------------------------------------------- /docs/static/maps/usa-wdc.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "usa-wdc", 3 | "name": "Usa Wdc", 4 | "viewBox": "0 0 4.3600001 4.6799998", 5 | "layers": [ 6 | { 7 | "id": "washington, dc", 8 | "name": "Washington, Dc", 9 | "d": "m 1.1341218,2.0792201 0.551,-0.8969999 0.513,0.266 1.173,0.6039999 -1.074,1.686 -0.072,-0.64 -0.265,-0.515 -0.451,-0.198 -0.375,-0.306" 10 | } 11 | ] 12 | } -------------------------------------------------------------------------------- /docs/static/maps/usa-wy.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "usa-wy", 3 | "name": "Usa Wy", 4 | "viewBox": "0 0 74.650002 62.490002", 5 | "layers": [ 6 | { 7 | "id": "laramie", 8 | "name": "Laramie", 9 | "d": "m 57.804239,51.121936 5.963,0.612 -0.103,1.137 5.741,0.517 -0.184,2.214 -0.437,5.067 -8.586,-0.727 -3.214,-0.311 0.82,-8.509" 10 | }, 11 | { 12 | "id": "goshen", 13 | "name": "Goshen", 14 | "d": "m 70.555239,39.848936 -0.667,7.883 -0.338,3.927 -0.145,1.729 -5.741,-0.517 0.103,-1.137 1.105,-12.357 1.618,0.142 2.284,0.173 1.781,0.157" 15 | }, 16 | { 17 | "id": "teton", 18 | "name": "Teton", 19 | "d": "m 9.0202391,5.5599365 3.5099999,0.55 -0.162,1.068 2.655,0.405 0.591,0.505 0.098,0.135 0.077,0.3469996 -0.04,0.181 -0.01,1.221 0.344,1.1769999 0.567,1.681 0.442,0.95 -1.258,8.551 -0.216,1.109 -2.655,-0.402 -0.166,1.109 -2.169,-0.338 -0.117,0.721 -2.1769999,-0.338 0.127,-0.825 -1.019,-0.374 -1.077,-0.171 1.329,-8.537 0.992,-6.2639995 0.334,-2.461" 20 | }, 21 | { 22 | "id": "lincoln", 23 | "name": "Lincoln", 24 | "d": "m 6.3652391,22.821936 1.077,0.171 1.019,0.374 -0.127,0.825 2.1769999,0.338 -0.211,1.397 -0.7759999,4.43 -0.157,0.884 -0.519,3.354 0.118,2.258 2.1449999,0.356 2.425,0.429 -0.28,1.869 -0.212,1.903 -0.779,5.133 -9.4699999,-1.493 0.861,-5.409 1.051,-6.551 1.058,-6.482 0.6,-3.786" 25 | }, 26 | { 27 | "id": "uinta", 28 | "name": "Uinta", 29 | "d": "m 2.7952391,45.049936 9.4699999,1.493 -1.114,7.45 -4.3359999,-0.622 -5.214,-0.861 0.523,-3.254 0.671,-4.206" 30 | }, 31 | { 32 | "id": "sublette", 33 | "name": "Sublette", 34 | "d": "m 15.834239,22.330936 2.74,0.427 0.379,1.334 0.099,0.754 -0.013,0.103 -0.117,0.307 -0.059,0.27 -0.018,0.514 0.122,0.505 0.649,2.262 1.893,2.277 1.528,1.806 0.477,0.641 -0.189,3.376 -0.302,2.181 -4.3,-0.6 -2.348,-0.369 -2.839,-0.481 -2.425,-0.429 -2.1449999,-0.356 -0.118,-2.258 0.519,-3.354 0.157,-0.884 0.7759999,-4.43 0.211,-1.397 0.117,-0.721 2.169,0.338 0.166,-1.109 2.655,0.402 0.216,-1.109" 35 | }, 36 | { 37 | "id": "park", 38 | "name": "Park", 39 | "d": "m 21.049239,3.0089365 4.791,0.649 1.677,0.307 0.184,0.026 1.195,0.162 2.799,0.37 -0.212,1.65 0.207,0.396 -0.311,2.7589996 -0.067,1.3919999 -0.604,4.516 0.211,0.027 -0.152,1.141 -2.214,-0.298 -1.293,0.983 -0.122,1.104 -1.654,-0.221 -0.153,1.132 -1.659,-0.23 -0.379,-0.018 -0.053,-0.212 -0.695,-1.15 -0.473,-0.45 -0.167,-0.126 -0.45,-0.257 -0.095,-0.005 -0.888,0.365 -0.144,0.185 -0.239,0.473 -1.699,0.163 -0.888,-1.686 -0.645,-0.78 0.235,-1.596 -0.442,-0.95 -0.567,-1.681 -0.344,-1.1769999 0.01,-1.221 0.04,-0.181 -0.077,-0.3469996 -0.098,-0.135 -0.591,-0.505 -2.655,-0.405 0.162,-1.068 -3.5099999,-0.55 0.784,-4.26 1.5189999,0.235 1.122,0.229 0.396,0.136 1.357,0.212 0.023,0.004 2.997,0.406 1.018,0.049 0.758,0.118 2.055,0.32" 40 | }, 41 | { 42 | "id": "sweetwater", 43 | "name": "Sweetwater", 44 | "d": "m 13.536239,37.637936 2.839,0.481 2.348,0.369 4.3,0.6 14.337,1.888 -0.122,1.501 0.028,0.761 -0.559,4.473 -0.171,1.068 -3.994,-0.523 -0.243,2.244 -0.059,1.131 -0.658,5.107 -3.191,-0.384 -7.666,-1.032 -1.511,-0.22 -4.497,-0.6 -0.375,-0.054 -1.343,-0.189 -1.383,-0.198 -0.01,0 -0.455,-0.068 1.114,-7.45 0.779,-5.133 0.212,-1.903 0.28,-1.869" 45 | }, 46 | { 47 | "id": "fremont", 48 | "name": "Fremont", 49 | "d": "m 38.636239,24.948936 0.554,0.068 0.122,0.392 -0.257,2.218 -0.28,2.213 0.109,0.234 -0.509,4.241 -0.438,1.456 -0.487,2.961 0.18,0.023 -0.27,2.221 -14.337,-1.888 0.302,-2.181 0.189,-3.376 -0.477,-0.641 -1.528,-1.806 -1.893,-2.277 -0.649,-2.262 -0.122,-0.505 0.018,-0.514 0.059,-0.27 0.117,-0.307 0.013,-0.103 -0.099,-0.754 -0.379,-1.334 -2.74,-0.427 1.023,-6.955 0.645,0.78 0.888,1.686 1.699,-0.163 0.239,-0.473 0.144,-0.185 0.888,-0.365 0.095,0.005 0.45,0.257 0.167,0.126 0.473,0.45 0.695,1.15 0.053,0.212 0.627,0.734 0.473,0.911 -0.131,0.928 1.132,0.253 1.045,0.148 1.087,0.329 0.676,0.536 0.298,0.55 1.049,0.519 2.132,0.847 0.811,0.108 0.587,0.027 0.306,-0.054 5.201,0.631 0.05,-0.374" 50 | }, 51 | { 52 | "id": "hot springs", 53 | "name": "Hot Springs", 54 | "d": "m 30.767239,16.403936 0.558,0.067 0.428,1.204 -0.171,1.136 1.01,0.869 1.194,0.519 1.456,0.189 0.473,0.757 0.171,0.438 1.997,0.247 0.978,1.258 -0.225,1.861 -0.05,0.374 -5.201,-0.631 -0.306,0.054 -0.587,-0.027 -0.811,-0.108 -2.132,-0.847 -1.049,-0.519 -0.298,-0.55 -0.676,-0.536 -1.087,-0.329 -1.045,-0.148 -1.132,-0.253 0.131,-0.928 -0.473,-0.911 -0.627,-0.734 0.379,0.018 1.659,0.23 0.153,-1.132 1.654,0.221 0.122,-1.104 1.293,-0.983 2.214,0.298" 55 | }, 56 | { 57 | "id": "washakie", 58 | "name": "Washakie", 59 | "d": "m 30.767239,16.403936 0.152,-1.141 10.777,1.37 2.1,0.28 0.167,0.018 -0.518,4.493 -0.325,4.08 -3.93,-0.487 -0.554,-0.068 0.225,-1.861 -0.978,-1.258 -1.997,-0.247 -0.171,-0.438 -0.473,-0.757 -1.456,-0.189 -1.194,-0.519 -1.01,-0.869 0.171,-1.136 -0.428,-1.204 -0.558,-0.067" 60 | }, 61 | { 62 | "id": "big horn", 63 | "name": "Big Horn", 64 | "d": "m 31.695239,4.5229365 3.367,0.456 3.069,0.374 0.18,0.153 0.059,0.076 0.148,1.095 0.163,1.497 0.59,1.0409996 0.428,0.356 0.243,0.122 0.163,-0.068 0.257,-0.054 0.5,0.311 1.388,1.2529999 0.081,0.198 0.027,0.28 1.335,1.644 0.225,0.754 0.135,0.87 -0.257,2.032 -2.1,-0.28 -10.777,-1.37 -0.211,-0.027 0.604,-4.516 0.067,-1.3919999 0.311,-2.7589996 -0.207,-0.396 0.212,-1.65" 65 | }, 66 | { 67 | "id": "sheridan", 68 | "name": "Sheridan", 69 | "d": "m 53.063239,7.1959365 2.167,0.234 -0.152,1.6049996 -0.086,1.5319999 -0.117,1.501 -0.091,0.893 -1.55,-0.163 -2.285,-0.211 -0.005,0.054 -8.586,-1.028 -0.027,-0.28 -0.081,-0.198 -1.388,-1.2529999 -0.5,-0.311 -0.257,0.054 -0.163,0.068 -0.243,-0.122 -0.428,-0.356 -0.59,-1.0409996 -0.163,-1.497 -0.148,-1.095 -0.059,-0.076 -0.18,-0.153 2.744,0.342 4.296,0.527 0.482,0.099 1.74,0.212 5.67,0.663" 70 | }, 71 | { 72 | "id": "johnson", 73 | "name": "Johnson", 74 | "d": "m 43.796239,16.912936 0.257,-2.032 -0.135,-0.87 -0.225,-0.754 -1.335,-1.644 8.586,1.028 0.005,-0.054 2.285,0.211 1.55,0.163 -0.161,1.081 -0.159,1.343 -0.256,2.443 0.004,0.131 0.022,0.067 -0.094,1.055 -0.284,2.713 -0.153,0.708 -0.28,2.528 -0.162,1.672 -0.563,-0.053 -4.733,-0.478 -4.858,-0.568 0.013,-0.099 0.325,-4.08 0.518,-4.493 -0.167,-0.018" 75 | }, 76 | { 77 | "id": "natrona", 78 | "name": "Natrona", 79 | "d": "m 39.190239,25.016936 3.93,0.487 -0.013,0.099 4.858,0.568 4.733,0.478 -0.018,0.531 -0.271,2.623 -0.36,3.3 -0.428,3.844 -0.356,3.381 -5.463,-0.574 -2.835,-0.35 -5.337,-0.649 -0.18,-0.023 0.487,-2.961 0.438,-1.456 0.509,-4.241 -0.109,-0.234 0.28,-2.213 0.257,-2.218 -0.122,-0.392" 80 | }, 81 | { 82 | "id": "carbon", 83 | "name": "Carbon", 84 | "d": "m 37.630239,38.754936 5.337,0.649 2.835,0.35 5.463,0.574 0.022,0 -0.848,8 -0.437,4.281 -0.094,1.123 -1.339,-0.127 -1.095,-0.14 -0.388,3.511 -0.153,1.605 -5.151,-0.625 -4.427,-0.521 -5.773,-0.697 0.658,-5.107 0.059,-1.131 0.243,-2.244 3.994,0.523 0.171,-1.068 0.559,-4.473 -0.028,-0.761 0.122,-1.501 0.27,-2.221" 85 | }, 86 | { 87 | "id": "albany", 88 | "name": "Albany", 89 | "d": "m 51.287239,40.327936 4.877,0.541 -0.037,0.315 -0.22,0.356 -0.369,-0.04 -0.086,0.941 0.126,0.104 0.928,0.193 1.181,0.113 0.194,-0.545 0.045,-0.554 0.131,-0.36 0.212,-0.32 0.464,0.04 -0.338,4.435 -0.131,1.518 -0.288,2.961 -0.172,1.096 -0.82,8.509 -8.798,-0.901 -1.253,-0.149 0.153,-1.605 0.388,-3.511 1.095,0.14 1.339,0.127 0.094,-1.123 0.437,-4.281 0.848,-8" 90 | }, 91 | { 92 | "id": "weston", 93 | "name": "Weston", 94 | "d": "m 62.816239,18.810936 6.256,0.509 3.186,0.289 -0.044,0.504 -0.32,3.705 -0.379,4.521 -7.865,-0.659 -1.672,-0.144 0.838,-8.725" 95 | }, 96 | { 97 | "id": "crook", 98 | "name": "Crook", 99 | "d": "m 63.740239,8.2009365 0.464,0.045 8.92,0.843 -0.866,10.5199995 -3.186,-0.289 -6.256,-0.509 -0.027,-0.005 0.031,-0.523 0.654,-6.95 0.117,-1.5949995 0.149,-1.5369996" 100 | }, 101 | { 102 | "id": "campbell", 103 | "name": "Campbell", 104 | "d": "m 55.230239,7.4299365 0.97,0.045 0.649,0.036 6.891,0.69 -0.149,1.5369996 -0.117,1.5949999 -0.654,6.95 -0.031,0.523 0.027,0.005 -0.838,8.725 -8.717,-0.834 0.162,-1.672 0.28,-2.528 0.153,-0.708 0.284,-2.713 0.094,-1.055 -0.022,-0.067 -0.004,-0.131 0.256,-2.443 0.159,-1.343 0.161,-1.081 0.091,-0.893 0.117,-1.501 0.086,-1.5319999 0.152,-1.6049996" 105 | }, 106 | { 107 | "id": "converse", 108 | "name": "Converse", 109 | "d": "m 53.261239,26.701936 8.717,0.834 1.672,0.144 -0.158,1.87 -0.559,5.932 -0.09,1.447 -0.202,2.249 -1.907,-0.176 -1.807,-0.139 -0.194,2.249 -0.464,-0.04 -0.212,0.32 -0.131,0.36 -0.045,0.554 -0.194,0.545 -1.181,-0.113 -0.928,-0.193 -0.126,-0.104 0.086,-0.941 0.369,0.04 0.22,-0.356 0.037,-0.315 -4.877,-0.541 -0.022,0 0.356,-3.381 0.428,-3.844 0.36,-3.3 0.271,-2.623 0.018,-0.531 0.563,0.053" 110 | }, 111 | { 112 | "id": "niobrara", 113 | "name": "Niobrara", 114 | "d": "m 71.515239,28.338936 -0.536,6.485 -0.424,5.025 -1.781,-0.157 -2.284,-0.173 -1.618,-0.142 -2.231,-0.199 0.202,-2.249 0.09,-1.447 0.559,-5.932 0.158,-1.87 7.865,0.659" 115 | }, 116 | { 117 | "id": "platte", 118 | "name": "Platte", 119 | "d": "m 62.641239,39.177936 2.231,0.199 -1.105,12.357 -5.963,-0.612 0.172,-1.096 0.288,-2.961 0.131,-1.518 0.338,-4.435 0.194,-2.249 1.807,0.139 1.907,0.176" 120 | } 121 | ] 122 | } -------------------------------------------------------------------------------- /docs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": ["./src/**/*", "./gatsby-node.ts", "./gatsby-config.ts", "./plugins/**/*"], 3 | "compilerOptions": { 4 | "target": "esnext", 5 | "lib": ["dom", "esnext"], 6 | "jsx": "react", 7 | "module": "esnext", 8 | "moduleResolution": "node", 9 | "esModuleInterop": true, 10 | "forceConsistentCasingInFileNames": true, 11 | "strict": true, 12 | "skipLibCheck": true, 13 | "resolveJsonModule": true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('ts-jest').JestConfigWithTsJest} */ 2 | module.exports = { 3 | preset: 'ts-jest', 4 | testEnvironment: 'jsdom', 5 | setupFilesAfterEnv: ['/test/setupJest.ts'], 6 | testPathIgnorePatterns: ['/node_modules/', '/docs/'], 7 | }; 8 | -------------------------------------------------------------------------------- /lib/react-shim.js: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | 3 | export { React }; 4 | -------------------------------------------------------------------------------- /maps/convert-svgs._test.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | const { name } = require('../package.json'); 4 | const { capitalize, stringify } = require('./convert-svgs'); 5 | 6 | xdescribe(name, () => { 7 | describe('convert-svgs', () => { 8 | // TODO 9 | describe('asyncForEach', () => { 10 | xtest('that given a parameter and an async function, it will loop through them as a forEach would.', () => {}); 11 | }); 12 | 13 | describe('capitalize', () => { 14 | test('that given a word, the word is capitalized', () => { 15 | const given = 'apples'; 16 | const expected = 'Apples'; 17 | 18 | expect(capitalize(given)).toBe(expected); 19 | }); 20 | 21 | test('that given a sentence, each word is capitalized', () => { 22 | const given = 'the quick brown fox jumped over the lazy dog.'; 23 | const expected = 'The Quick Brown Fox Jumped Over The Lazy Dog.'; 24 | 25 | expect(capitalize(given)).toBe(expected); 26 | }); 27 | }); 28 | 29 | describe('stringify', () => { 30 | test('that given a javascript array, the stringify function will return a formatted string of the array', () => { 31 | const object = [ 32 | { key: 1, items: ['a', 'b', 'c'] }, 33 | { key: 2, items: ['d', 'e', 'f'] }, 34 | { key: 3, items: ['g', 'h', 'i'] }, 35 | ]; 36 | 37 | const expected = `[ 38 | { 39 | "key": 1, 40 | "items": [ "a", "b", "c" ] 41 | }, 42 | { 43 | "key": 2, 44 | "items": [ "d", "e", "f" ] 45 | }, 46 | { 47 | "key": 3, 48 | "items": [ "g", "h", "i" ] 49 | } 50 | ]`; 51 | 52 | expect(stringify(object)).toBe(expected); 53 | }); 54 | }); 55 | 56 | // TODO 57 | describe('ConvertSVGs', () => { 58 | test('constructor', () => {}); 59 | 60 | test('cleanAndCreateFolder', () => {}); 61 | 62 | test('cleanAndCreateFile', () => {}); 63 | 64 | describe('run', () => { 65 | test('todo', () => {}); 66 | }); 67 | }); 68 | }); 69 | }); 70 | -------------------------------------------------------------------------------- /maps/convert-svgs.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | const fs = require('fs'); 4 | const rimraf = require('rimraf'); 5 | const svgson = require('svgson'); 6 | 7 | const asyncForEach = async (a, cb) => { 8 | for (let i = 0; i < a.length; i += 1) { 9 | await cb(a[i], i, a); 10 | } 11 | }; 12 | 13 | const capitalize = s => 14 | s 15 | .toLowerCase() 16 | .split(' ') 17 | .map(word => word[0].toUpperCase() + word.slice(1)) 18 | .join(' '); 19 | 20 | // Human readable json stringify where simple arrays use only one line. 21 | // https://gist.github.com/nrkn/c7a89bb7039182314415 22 | const stringify = object => { 23 | const isPrimitive = obj => obj === null || ['string', 'number', 'boolean'].includes(typeof obj); 24 | const isArrayOfPrimitive = obj => Array.isArray(obj) && obj.every(isPrimitive); 25 | const format = arr => `^^^[ ${arr.map(val => JSON.stringify(val)).join(', ')} ]`; 26 | const replacer = (key, value) => (isArrayOfPrimitive(value) ? format(value) : value); 27 | const expand = str => str.replace(/(?:"\^\^\^)(\[ .* \])(?:")/g, (match, a) => a.replace(/\\"/g, '"')); 28 | return expand(JSON.stringify(object, replacer, 2)); 29 | }; 30 | 31 | class ConvertSVGs { 32 | constructor(config) { 33 | const { inputSvgsPath, outputJsonPath, outputSummary = false } = config; 34 | 35 | this.inputSvgsPath = inputSvgsPath; 36 | this.outputJsonPath = outputJsonPath; 37 | this.outputSummary = outputSummary; 38 | } 39 | 40 | async cleanAndCreateFolder(path) { 41 | await rimraf.sync(path); 42 | 43 | if (!fs.existsSync(path)) { 44 | fs.mkdirSync(path); 45 | } 46 | } 47 | 48 | async run() { 49 | await this.cleanAndCreateFolder(this.outputJsonPath); 50 | 51 | const files = fs.readdirSync(this.inputSvgsPath); 52 | 53 | const output = []; 54 | 55 | await asyncForEach(files, async filename => { 56 | const path = `${this.inputSvgsPath}\\${filename}`; 57 | const svg = fs.readFileSync(path, 'utf8'); 58 | 59 | svgson.parse(svg).then(json => { 60 | const name = filename.split('.')[0]; 61 | 62 | const layers = json.children 63 | .filter(({ name }) => name === 'path') 64 | .map(({ attributes }) => ({ 65 | id: attributes.id.toLowerCase(), 66 | name: attributes.title || capitalize(attributes.id), 67 | d: attributes.d, 68 | })); 69 | 70 | const map = { 71 | id: name, 72 | name: capitalize(name.split('-').join(' ')), 73 | viewBox: `0 0 ${parseFloat(json.attributes.width)} ${parseFloat(json.attributes.height)}`, 74 | layers, 75 | }; 76 | 77 | output.push({ 78 | name: capitalize(name.split('-').join(' ')), 79 | filename, 80 | }); 81 | 82 | fs.writeFileSync(`${this.outputJsonPath}\\${name}.json`, stringify(map)); 83 | }); 84 | }); 85 | 86 | if (this.outputSummary) { 87 | fs.writeFileSync(`${this.outputJsonPath}\\..\\summary.json`, stringify(output)); 88 | } 89 | } 90 | } 91 | 92 | module.exports = { 93 | ConvertSVGs, 94 | asyncForEach, 95 | capitalize, 96 | stringify, 97 | }; 98 | -------------------------------------------------------------------------------- /maps/run.js: -------------------------------------------------------------------------------- 1 | const { ConvertSVGs } = require('./convert-svgs'); 2 | 3 | const SVG_MAP_FILES = `${__dirname}\\svg`; 4 | const JSON_MAP_FILES = `${__dirname}\\json`; 5 | 6 | const convertSVGs = new ConvertSVGs({ 7 | inputSvgsPath: SVG_MAP_FILES, 8 | outputJsonPath: JSON_MAP_FILES, 9 | outputSummary: true, 10 | }); 11 | convertSVGs.run(); 12 | -------------------------------------------------------------------------------- /maps/svg/djibouti.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 13 | 17 | 21 | 25 | 29 | 33 | 37 | 38 | -------------------------------------------------------------------------------- /maps/svg/empty.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 13 | 14 | -------------------------------------------------------------------------------- /maps/svg/rwanda.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 13 | 17 | 21 | 25 | 29 | 33 | 34 | -------------------------------------------------------------------------------- /maps/svg/usa-ct.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 20 | 22 | 23 | 25 | image/svg+xml 26 | 28 | 29 | 30 | 31 | 33 | 57 | 62 | 67 | 72 | 77 | 82 | 87 | 92 | 97 | 98 | -------------------------------------------------------------------------------- /maps/svg/usa-de.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 20 | 22 | 23 | 25 | image/svg+xml 26 | 28 | 29 | 30 | 31 | 33 | 57 | 62 | 67 | 72 | 73 | -------------------------------------------------------------------------------- /maps/svg/usa-hi.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 20 | 22 | 23 | 25 | image/svg+xml 26 | 28 | 29 | 30 | 31 | 33 | 57 | 62 | 67 | 72 | 77 | 82 | 83 | -------------------------------------------------------------------------------- /maps/svg/usa-nh.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 20 | 22 | 23 | 25 | image/svg+xml 26 | 28 | 29 | 30 | 31 | 57 | 59 | 64 | 69 | 74 | 79 | 84 | 89 | 94 | 99 | 104 | 109 | 110 | -------------------------------------------------------------------------------- /maps/svg/usa-ri.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 20 | 22 | 23 | 25 | image/svg+xml 26 | 28 | 29 | 30 | 31 | 57 | 59 | 64 | 69 | 74 | 79 | 84 | 85 | -------------------------------------------------------------------------------- /maps/svg/usa-vt.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 20 | 22 | 23 | 25 | image/svg+xml 26 | 28 | 29 | 30 | 31 | 33 | 57 | 62 | 67 | 72 | 77 | 82 | 87 | 92 | 97 | 102 | 107 | 112 | 117 | 122 | 127 | 128 | -------------------------------------------------------------------------------- /maps/svg/usa-wdc.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 20 | 22 | 23 | 25 | image/svg+xml 26 | 28 | 29 | 30 | 31 | 33 | 57 | 62 | 63 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@south-paw/react-vector-maps", 3 | "version": "3.2.0", 4 | "description": "A React component for interactive vector maps of the world and 100+ countries", 5 | "keywords": [ 6 | "react", 7 | "component", 8 | "map", 9 | "maps", 10 | "svg", 11 | "interactive", 12 | "world", 13 | "country", 14 | "countries" 15 | ], 16 | "homepage": "https://react-vector-maps.netlify.com", 17 | "bugs": "https://github.com/South-Paw/react-vector-maps/issues", 18 | "license": "MIT", 19 | "author": { 20 | "name": "Alex Gabites", 21 | "email": "hello@southpaw.co.nz", 22 | "url": "http://southpaw.co.nz/" 23 | }, 24 | "files": [ 25 | "dist" 26 | ], 27 | "main": "dist/index.js", 28 | "typings": "dist/index.d.ts", 29 | "repository": { 30 | "type": "git", 31 | "url": "https://github.com/South-Paw/react-vector-maps.git" 32 | }, 33 | "scripts": { 34 | "clean": "rimraf dist coverage", 35 | "build": "tsup", 36 | "lint:eslint": "eslint src/**/*.{js,ts,tsx}", 37 | "lint:type-check": "tsc --noEmit", 38 | "lint": "npm run lint:type-check && npm run lint:eslint", 39 | "test": "jest --passWithNoTests", 40 | "docs:install": "cd docs && npm i", 41 | "docs:start": "cd docs && npm run start", 42 | "docs:build": "cd docs && npm run build", 43 | "docs:serve": "cd docs && npm run serve", 44 | "docs:clean": "cd docs && npm run clean" 45 | }, 46 | "devDependencies": { 47 | "@testing-library/jest-dom": "^5.16.5", 48 | "@testing-library/react": "^13.4.0", 49 | "@types/jest": "^29.0.3", 50 | "@types/react": "^18.0.21", 51 | "@typescript-eslint/eslint-plugin": "^5.38.1", 52 | "@typescript-eslint/parser": "^5.38.1", 53 | "eslint": "^8.2.0", 54 | "eslint-config-airbnb": "^19.0.4", 55 | "eslint-config-airbnb-typescript": "^17.0.0", 56 | "eslint-config-prettier": "^8.5.0", 57 | "eslint-plugin-import": "^2.25.3", 58 | "eslint-plugin-jest": "^27.0.4", 59 | "eslint-plugin-jsx-a11y": "^6.5.1", 60 | "eslint-plugin-prettier": "^4.2.1", 61 | "eslint-plugin-react": "^7.28.0", 62 | "eslint-plugin-react-hooks": "^4.3.0", 63 | "jest": "^29.1.1", 64 | "jest-environment-jsdom": "^29.1.1", 65 | "prettier": "^2.7.1", 66 | "prettier-plugin-organize-imports": "^3.1.1", 67 | "react": "^18.2.0", 68 | "rimraf": "^3.0.2", 69 | "svgson": "^5.2.1", 70 | "ts-jest": "^29.0.2", 71 | "tsup": "^6.2.3", 72 | "typescript": "^4.8.4" 73 | }, 74 | "peerDependencies": { 75 | "react": ">=16.8.0" 76 | }, 77 | "publishConfig": { 78 | "access": "public" 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /src/VectorMap.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export interface VectorMapLayer { 4 | /** Unique ID of each layer. */ 5 | id: string; 6 | /** Name of the layer. */ 7 | name: string; 8 | /** SVG path for the layer. */ 9 | d: string; 10 | } 11 | 12 | export interface VectorMapProps extends React.SVGProps { 13 | children?: React.ReactNode; 14 | /** Unique ID of the SVG element. */ 15 | id: string; 16 | /** Name of the map. */ 17 | name: string; 18 | /** View box for the map. */ 19 | viewBox: string; 20 | /** Layers that represent the regions of the map. */ 21 | layers: VectorMapLayer[]; 22 | /** Tab index for each layer. Set to '-1' to disable layer focusing. */ 23 | tabIndex?: number; 24 | /** Props to spread onto each layer. */ 25 | layerProps?: React.SVGProps; 26 | /** Layer IDs to 'select' with the 'aria-checked' attribute. */ 27 | checkedLayers?: string[]; 28 | /** Layer IDs to 'select' with the 'aria-current' attribute. */ 29 | currentLayers?: string[]; 30 | } 31 | 32 | export function VectorMap({ 33 | id, 34 | name, 35 | layers, 36 | tabIndex = 0, 37 | layerProps, 38 | checkedLayers, 39 | currentLayers, 40 | children, 41 | ...other 42 | }: VectorMapProps) { 43 | if (!layers || layers.length === 0) { 44 | // eslint-disable-next-line no-console 45 | console.error( 46 | `[@south-paw/react-vector-maps] No 'layers' prop provided. Did you spread a map object onto the component?`, 47 | ); 48 | return null; 49 | } 50 | 51 | return ( 52 | 53 | {children} 54 | {layers.map((layer) => ( 55 | 64 | ))} 65 | 66 | ); 67 | } 68 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './VectorMap'; 2 | -------------------------------------------------------------------------------- /test/setupJest.ts: -------------------------------------------------------------------------------- 1 | import '@testing-library/jest-dom'; 2 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": ["lib/react-shim.js", "src", "test", "jest.config.js", "tsup.config.ts"], 3 | "exclude": ["node_modules"], 4 | "compilerOptions": { 5 | "allowJs": true, 6 | "declaration": true, 7 | "esModuleInterop": true, 8 | "forceConsistentCasingInFileNames": true, 9 | "isolatedModules": true, 10 | "jsx": "react-jsx", 11 | "lib": ["dom", "ES2015"], 12 | "module": "ESNext", 13 | "moduleResolution": "node", 14 | "noFallthroughCasesInSwitch": true, 15 | "noImplicitReturns": true, 16 | "noUnusedLocals": true, 17 | "noUnusedParameters": true, 18 | "outDir": "dist", 19 | "skipLibCheck": true, 20 | "sourceMap": true, 21 | "strict": true, 22 | "target": "ES6" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /tsup.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'tsup'; 2 | 3 | export default defineConfig({ 4 | clean: true, 5 | dts: true, 6 | entry: ['src/index.ts'], 7 | format: ['cjs', 'esm'], 8 | inject: ['./lib/react-shim.js'], 9 | metafile: true, 10 | sourcemap: true, 11 | splitting: false, 12 | }); 13 | --------------------------------------------------------------------------------