├── src ├── transcript │ ├── en.json │ └── list.json ├── app │ └── [lang] │ │ ├── icon.png │ │ ├── logo.png │ │ ├── order │ │ ├── page.js │ │ └── layout.js │ │ ├── menu │ │ ├── page.js │ │ └── layout.js │ │ ├── business │ │ ├── page.js │ │ ├── layout.js │ │ ├── business.js │ │ └── pi.js │ │ ├── globals.css │ │ ├── page.js │ │ ├── layout.js │ │ └── map │ │ ├── page.js │ │ └── layout.js ├── components │ ├── gettranslate.js │ ├── backbutton.js │ ├── locale_selector.js │ ├── firestore.js │ ├── unauth.js │ ├── loading.js │ └── map.js ├── action │ ├── country.js │ └── auth.js ├── lib │ └── firebase.js ├── res │ ├── usermarker.svg │ └── country.json ├── middleware.js └── constants.py ├── .gitattributes ├── jsconfig.json ├── locale-config.js ├── postcss.config.js ├── public └── validation-key.txt ├── next.config.mjs ├── .github ├── ISSUE_TEMPLATE │ ├── custom.md │ ├── feature_request.md │ └── bug_report.md └── workflows │ ├── clojure.yml │ ├── greetings.yml │ ├── android.yml │ ├── webpack.yml │ ├── label.yml │ ├── django.yml │ ├── stale.yml │ ├── npm-publish.yml │ ├── node.js.yml │ ├── npm-publish-github-packages.yml │ ├── manual.yml │ ├── datadog-synthetics.yml │ ├── tencent.yml │ ├── ibm.yml │ ├── azure-functions-app-nodejs.yml │ ├── azure-webapps-node.yml │ ├── codeql.yml │ ├── sonarqube.yml │ ├── docker-publish.yml │ ├── google.yml │ ├── aws.yml │ └── alibabacloud.yml ├── .whitesource ├── .gitignore ├── tailwind.config.js ├── package.json ├── LICENSE └── README.md /src/transcript/en.json: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /src/app/[lang]/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KOSASIH/EasyGoods/HEAD/src/app/[lang]/icon.png -------------------------------------------------------------------------------- /src/app/[lang]/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KOSASIH/EasyGoods/HEAD/src/app/[lang]/logo.png -------------------------------------------------------------------------------- /src/transcript/list.json: -------------------------------------------------------------------------------- 1 | { 2 | "en":"English", 3 | "zh-TW":"繁體中文", 4 | "zh-CN":"简体中文" 5 | } -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "paths": { 4 | "@/*": ["./src/*"] 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /locale-config.js: -------------------------------------------------------------------------------- 1 | export const i18n ={ 2 | defaultLocale: "en", 3 | locales: ["en", "zh-TW", "zh-CN"], 4 | } -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /src/app/[lang]/order/page.js: -------------------------------------------------------------------------------- 1 | export default function OrderPage(){ 2 | 3 | return
4 |
5 | } -------------------------------------------------------------------------------- /public/validation-key.txt: -------------------------------------------------------------------------------- 1 | 7042ef00a3299494f43c126c7a2b5e2ed93394c191e415f39cd7c53b78724464433ed50a166c032d1247a1faa34d4a9662002c17fd09730ac16cf57c5fa95d8e -------------------------------------------------------------------------------- /next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = { 3 | reactStrictMode: false, 4 | }; 5 | 6 | export default nextConfig; 7 | -------------------------------------------------------------------------------- /src/app/[lang]/menu/page.js: -------------------------------------------------------------------------------- 1 | export default function MenuPage(){ 2 | 3 | return
4 | 5 |
6 | } -------------------------------------------------------------------------------- /src/app/[lang]/business/page.js: -------------------------------------------------------------------------------- 1 | import "server-only"; 2 | 3 | export default function BusinessPage() { 4 | 5 | return
6 | 7 |
; 8 | } 9 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/custom.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Custom issue template 3 | about: Describe this issue template's purpose here. 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/components/gettranslate.js: -------------------------------------------------------------------------------- 1 | import 'server-only' 2 | 3 | const transcipt = { 4 | en: () => import('@/transcript/en.json').then((module) => module.default), 5 | nl: () => import('./dictionaries/nl.json').then((module) => module.default), 6 | } 7 | 8 | export const getTranslate = async (locale) => transcipt[locale]() -------------------------------------------------------------------------------- /.whitesource: -------------------------------------------------------------------------------- 1 | { 2 | "scanSettings": { 3 | "baseBranches": [] 4 | }, 5 | "checkRunSettings": { 6 | "vulnerableCheckRunConclusionLevel": "failure", 7 | "displayMode": "diff", 8 | "useMendCheckNames": true 9 | }, 10 | "issueSettings": { 11 | "minSeverityLevel": "LOW", 12 | "issueType": "DEPENDENCY" 13 | } 14 | } -------------------------------------------------------------------------------- /src/components/backbutton.js: -------------------------------------------------------------------------------- 1 | 'use client' 2 | import { useRouter } from 'next/navigation' 3 | 4 | export default function BackButton(){ 5 | const router = useRouter() 6 | return ( 7 | 10 | ) 11 | } -------------------------------------------------------------------------------- /.github/workflows/clojure.yml: -------------------------------------------------------------------------------- 1 | name: Clojure CI 2 | 3 | on: 4 | push: 5 | branches: [ "main" ] 6 | pull_request: 7 | branches: [ "main" ] 8 | 9 | jobs: 10 | build: 11 | 12 | runs-on: ubuntu-latest 13 | 14 | steps: 15 | - uses: actions/checkout@v3 16 | - name: Install dependencies 17 | run: lein deps 18 | - name: Run tests 19 | run: lein test 20 | -------------------------------------------------------------------------------- /src/app/[lang]/business/layout.js: -------------------------------------------------------------------------------- 1 | import BusinessSelector from "./business"; 2 | import PiUser from "./pi"; 3 | 4 | export default function BusinessLayout({children}){ 5 | return ( 6 | 7 |
8 | 9 | {children} 10 | 11 | 12 |
13 |
14 | ) 15 | 16 | } -------------------------------------------------------------------------------- /src/action/country.js: -------------------------------------------------------------------------------- 1 | 'use server' 2 | const borders = require('@osm_borders/maritime_1000m') 3 | const lookup = require('geojson-geometries-lookup') 4 | 5 | export async function getcountry(lat,lng){ 6 | const search = new lookup(borders); 7 | const countries = await search.getContainers({type: 'Point', coordinates: [lng, lat]}); 8 | if(countries.features.length > 0){ 9 | return countries.features.map(f => f.properties.isoA2); 10 | 11 | } 12 | return []; 13 | } -------------------------------------------------------------------------------- /.github/workflows/greetings.yml: -------------------------------------------------------------------------------- 1 | name: Greetings 2 | 3 | on: [pull_request_target, issues] 4 | 5 | jobs: 6 | greeting: 7 | runs-on: ubuntu-latest 8 | permissions: 9 | issues: write 10 | pull-requests: write 11 | steps: 12 | - uses: actions/first-interaction@v1 13 | with: 14 | repo-token: ${{ secrets.GITHUB_TOKEN }} 15 | issue-message: "Message that will be displayed on users' first issue" 16 | pr-message: "Message that will be displayed on users' first pull request" 17 | -------------------------------------------------------------------------------- /src/lib/firebase.js: -------------------------------------------------------------------------------- 1 | import admin from "firebase-admin"; 2 | 3 | try { 4 | admin.initializeApp({ 5 | credential: admin.credential.cert({ 6 | projectId: process.env.FIREBASE_PROJECT_ID, 7 | clientEmail: process.env.FIREBASE_CLIENT_EMAIL, 8 | privateKey: process.env.FIREBASE_PRIVATE_KEY.replace(/\\n/g, '\n'), 9 | }), 10 | }); 11 | } catch (error) { 12 | if (!/already exists/u.test(error.message)) { 13 | console.error("Firebase admin initialization error", error.stack); 14 | } 15 | } 16 | 17 | export default admin -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | .yarn/install-state.gz 8 | 9 | # testing 10 | /coverage 11 | 12 | # next.js 13 | /.next/ 14 | /out/ 15 | 16 | # production 17 | /build 18 | 19 | # misc 20 | .DS_Store 21 | *.pem 22 | 23 | # debug 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # local env files 29 | .env*.local 30 | 31 | # vercel 32 | .vercel 33 | 34 | # typescript 35 | *.tsbuildinfo 36 | next-env.d.ts 37 | .env -------------------------------------------------------------------------------- /tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: [ 4 | "./src/pages/**/*.{js,ts,jsx,tsx,mdx}", 5 | "./src/components/**/*.{js,ts,jsx,tsx,mdx}", 6 | "./src/app/**/*.{js,ts,jsx,tsx,mdx}", 7 | ], 8 | theme: { 9 | extend: { 10 | backgroundImage: { 11 | "gradient-radial": "radial-gradient(var(--tw-gradient-stops))", 12 | "gradient-conic": 13 | "conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))", 14 | }, 15 | }, 16 | }, 17 | plugins: [], 18 | }; 19 | -------------------------------------------------------------------------------- /.github/workflows/android.yml: -------------------------------------------------------------------------------- 1 | name: Android CI 2 | 3 | on: 4 | push: 5 | branches: [ "main" ] 6 | pull_request: 7 | branches: [ "main" ] 8 | 9 | jobs: 10 | build: 11 | 12 | runs-on: ubuntu-latest 13 | 14 | steps: 15 | - uses: actions/checkout@v3 16 | - name: set up JDK 11 17 | uses: actions/setup-java@v3 18 | with: 19 | java-version: '11' 20 | distribution: 'temurin' 21 | cache: gradle 22 | 23 | - name: Grant execute permission for gradlew 24 | run: chmod +x gradlew 25 | - name: Build with Gradle 26 | run: ./gradlew build 27 | -------------------------------------------------------------------------------- /src/app/[lang]/globals.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | :root { 6 | --foreground-rgb: 0, 0, 0; 7 | --background-start-rgb: 214, 219, 220; 8 | --background-end-rgb: 255, 255, 255; 9 | } 10 | 11 | body { 12 | user-select: none; 13 | -webkit-user-select: none; 14 | scrollbar-width: none; 15 | color: rgb(var(--foreground-rgb)); 16 | background-image: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); 17 | } 18 | ::-webkit-scrollbar { 19 | display: none; 20 | } 21 | @layer utilities { 22 | .text-balance { 23 | text-wrap: balance; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/action/auth.js: -------------------------------------------------------------------------------- 1 | "use server"; 2 | import admin from "@/lib/firebase"; 3 | export async function auth(token) { 4 | const res = await fetch('https://api.minepi.com/v2/me',{ 5 | headers: new Headers({ 6 | "Authorization": 'Bearer '+token 7 | }) 8 | }) 9 | if (!res.ok) { 10 | // This will activate the closest `error.js` Error Boundary 11 | throw new Error('Failed to fetch data') 12 | } 13 | let auth = await res.json() 14 | let uid = auth.username 15 | let customtoken = await admin.auth().createCustomToken(uid) 16 | return customtoken; 17 | } 18 | -------------------------------------------------------------------------------- /.github/workflows/webpack.yml: -------------------------------------------------------------------------------- 1 | name: NodeJS with Webpack 2 | 3 | on: 4 | push: 5 | branches: [ "main" ] 6 | pull_request: 7 | branches: [ "main" ] 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | 13 | strategy: 14 | matrix: 15 | node-version: [14.x, 16.x, 18.x] 16 | 17 | steps: 18 | - uses: actions/checkout@v3 19 | 20 | - name: Use Node.js ${{ matrix.node-version }} 21 | uses: actions/setup-node@v3 22 | with: 23 | node-version: ${{ matrix.node-version }} 24 | 25 | - name: Build 26 | run: | 27 | npm install 28 | npx webpack 29 | -------------------------------------------------------------------------------- /.github/workflows/label.yml: -------------------------------------------------------------------------------- 1 | # This workflow will triage pull requests and apply a label based on the 2 | # paths that are modified in the pull request. 3 | # 4 | # To use this workflow, you will need to set up a .github/labeler.yml 5 | # file with configuration. For more information, see: 6 | # https://github.com/actions/labeler 7 | 8 | name: Labeler 9 | on: [pull_request_target] 10 | 11 | jobs: 12 | label: 13 | 14 | runs-on: ubuntu-latest 15 | permissions: 16 | contents: read 17 | pull-requests: write 18 | 19 | steps: 20 | - uses: actions/labeler@v4 21 | with: 22 | repo-token: "${{ secrets.GITHUB_TOKEN }}" 23 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/workflows/django.yml: -------------------------------------------------------------------------------- 1 | name: Django CI 2 | 3 | on: 4 | push: 5 | branches: [ "main" ] 6 | pull_request: 7 | branches: [ "main" ] 8 | 9 | jobs: 10 | build: 11 | 12 | runs-on: ubuntu-latest 13 | strategy: 14 | max-parallel: 4 15 | matrix: 16 | python-version: [3.7, 3.8, 3.9] 17 | 18 | steps: 19 | - uses: actions/checkout@v3 20 | - name: Set up Python ${{ matrix.python-version }} 21 | uses: actions/setup-python@v3 22 | with: 23 | python-version: ${{ matrix.python-version }} 24 | - name: Install Dependencies 25 | run: | 26 | python -m pip install --upgrade pip 27 | pip install -r requirements.txt 28 | - name: Run Tests 29 | run: | 30 | python manage.py test 31 | -------------------------------------------------------------------------------- /.github/workflows/stale.yml: -------------------------------------------------------------------------------- 1 | # This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time. 2 | # 3 | # You can adjust the behavior by modifying this file. 4 | # For more information, see: 5 | # https://github.com/actions/stale 6 | name: Mark stale issues and pull requests 7 | 8 | on: 9 | schedule: 10 | - cron: '27 16 * * *' 11 | 12 | jobs: 13 | stale: 14 | 15 | runs-on: ubuntu-latest 16 | permissions: 17 | issues: write 18 | pull-requests: write 19 | 20 | steps: 21 | - uses: actions/stale@v5 22 | with: 23 | repo-token: ${{ secrets.GITHUB_TOKEN }} 24 | stale-issue-message: 'Stale issue message' 25 | stale-pr-message: 'Stale pull request message' 26 | stale-issue-label: 'no-issue-activity' 27 | stale-pr-label: 'no-pr-activity' 28 | -------------------------------------------------------------------------------- /src/components/locale_selector.js: -------------------------------------------------------------------------------- 1 | "use client"; 2 | import { useRouter } from "next/navigation"; 3 | import locale from "@/transcript/list.json"; 4 | 5 | export default function LocaleSelector({ lang }) { 6 | const router = useRouter(); 7 | const localecode = Object.keys(locale); 8 | const changelang = (e) => { 9 | router.push(process.env.NEXT_PUBLIC_APP_DOMAIN + e.target.value); 10 | }; 11 | return ( 12 | 25 | ); 26 | } 27 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "easygoods", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "next dev", 7 | "build": "next build", 8 | "start": "next start", 9 | "lint": "next lint" 10 | }, 11 | "dependencies": { 12 | "@formatjs/intl-localematcher": "^0.5.4", 13 | "@rapideditor/country-coder": "^5.2.2", 14 | "@vercel/analytics": "^1.1.2", 15 | "@vercel/speed-insights": "^1.0.9", 16 | "firebase": "^10.7.2", 17 | "firebase-admin": "^12.0.0", 18 | "leaflet": "^1.9.4", 19 | "leaflet-defaulticon-compatibility": "^0.1.2", 20 | "negotiator": "^0.6.3", 21 | "next": "14.1.0", 22 | "react": "^18", 23 | "react-dom": "^18", 24 | "react-leaflet": "^4.2.1", 25 | "server-only": "^0.0.1" 26 | }, 27 | "devDependencies": { 28 | "autoprefixer": "^10.0.1", 29 | "postcss": "^8", 30 | "tailwindcss": "^3.3.0" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/app/[lang]/page.js: -------------------------------------------------------------------------------- 1 | import LocaleSelector from "@/components/locale_selector"; 2 | import Link from "next/link"; 3 | import { Teko } from "next/font/google"; 4 | import Image from 'next/image' 5 | import logo from './logo.png' 6 | const teko = Teko({ 7 | subsets: ["latin"] 8 | }); 9 | 10 | export default function Home({params}) { 11 | return ( 12 |
13 | Logo for the EasyGoods project 14 | 15 | 18 | 19 | 20 | 23 | 24 | 25 |
26 | ); 27 | } 28 | -------------------------------------------------------------------------------- /.github/workflows/npm-publish.yml: -------------------------------------------------------------------------------- 1 | # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created 2 | # For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages 3 | 4 | name: Node.js Package 5 | 6 | on: 7 | release: 8 | types: [created] 9 | 10 | jobs: 11 | build: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/checkout@v3 15 | - uses: actions/setup-node@v3 16 | with: 17 | node-version: 16 18 | - run: npm ci 19 | - run: npm test 20 | 21 | publish-npm: 22 | needs: build 23 | runs-on: ubuntu-latest 24 | steps: 25 | - uses: actions/checkout@v3 26 | - uses: actions/setup-node@v3 27 | with: 28 | node-version: 16 29 | registry-url: https://registry.npmjs.org/ 30 | - run: npm ci 31 | - run: npm publish 32 | env: 33 | NODE_AUTH_TOKEN: ${{secrets.npm_token}} 34 | -------------------------------------------------------------------------------- /src/res/usermarker.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.github/workflows/node.js.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node 2 | # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs 3 | 4 | name: Node.js CI 5 | 6 | on: 7 | push: 8 | branches: [ "main" ] 9 | pull_request: 10 | branches: [ "main" ] 11 | 12 | jobs: 13 | build: 14 | 15 | runs-on: ubuntu-latest 16 | 17 | strategy: 18 | matrix: 19 | node-version: [14.x, 16.x, 18.x] 20 | # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ 21 | 22 | steps: 23 | - uses: actions/checkout@v3 24 | - name: Use Node.js ${{ matrix.node-version }} 25 | uses: actions/setup-node@v3 26 | with: 27 | node-version: ${{ matrix.node-version }} 28 | cache: 'npm' 29 | - run: npm ci 30 | - run: npm run build --if-present 31 | - run: npm test 32 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /.github/workflows/npm-publish-github-packages.yml: -------------------------------------------------------------------------------- 1 | # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created 2 | # For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages 3 | 4 | name: Node.js Package 5 | 6 | on: 7 | release: 8 | types: [created] 9 | 10 | jobs: 11 | build: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/checkout@v3 15 | - uses: actions/setup-node@v3 16 | with: 17 | node-version: 16 18 | - run: npm ci 19 | - run: npm test 20 | 21 | publish-gpr: 22 | needs: build 23 | runs-on: ubuntu-latest 24 | permissions: 25 | contents: read 26 | packages: write 27 | steps: 28 | - uses: actions/checkout@v3 29 | - uses: actions/setup-node@v3 30 | with: 31 | node-version: 16 32 | registry-url: https://npm.pkg.github.com/ 33 | - run: npm ci 34 | - run: npm publish 35 | env: 36 | NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} 37 | -------------------------------------------------------------------------------- /src/app/[lang]/layout.js: -------------------------------------------------------------------------------- 1 | import { Hind_Siliguri } from "next/font/google"; 2 | import "./globals.css"; 3 | import { i18n } from "../../../locale-config"; 4 | import {Analytics} from '@vercel/analytics/react' 5 | import { SpeedInsights } from "@vercel/speed-insights/next" 6 | 7 | export async function generateStaticParams() { 8 | return i18n.locales.map((locale) => ({ lang: locale })); 9 | } 10 | 11 | const hind_siliguri = Hind_Siliguri({ 12 | weight: ['300','400','500','600','700'], 13 | subsets: ["latin"] 14 | }); 15 | 16 | export const metadata = { 17 | title: "EasyGoods", 18 | description: "A project for pi commerce hackathon", 19 | }; 20 | 21 | 22 | export const viewport = { 23 | width: 'device-width', 24 | initialScale: 1, 25 | maximumScale: 1, 26 | userScalable: false, 27 | } 28 | 29 | export default function RootLayout({ children,params }) { 30 | return ( 31 | 32 | 33 | {children} 34 | 35 | 36 | 37 | 38 | ); 39 | } 40 | -------------------------------------------------------------------------------- /src/components/firestore.js: -------------------------------------------------------------------------------- 1 | // Import the functions you need from the SDKs you need 2 | import { initializeApp } from "firebase/app"; 3 | import { getAuth } from "firebase/auth"; 4 | import { getFirestore } from "firebase/firestore"; 5 | // TODO: Add SDKs for Firebase products that you want to use 6 | // https://firebase.google.com/docs/web/setup#available-libraries 7 | 8 | // Your web app's Firebase configuration 9 | // For Firebase JS SDK v7.20.0 and later, measurementId is optional 10 | const firebaseConfig = { 11 | apiKey: process.env.NEXT_PUBLIC_FIRESTORE_APIKEY, 12 | authDomain: process.env.NEXT_PUBLIC_FIRESTORE_AUTHDOMAIN, 13 | projectId: process.env.NEXT_PUBLIC_FIRESTORE_PROJECTID, 14 | storageBucket: process.env.NEXT_PUBLIC_FIRESTORE_STORAGEBUCKET, 15 | messagingSenderId: process.env.NEXT_PUBLIC_FIRESTORE_SENDERID, 16 | appId: process.env.NEXT_PUBLIC_FIRESTORE_APPID, 17 | measurementId: process.env.NEXT_PUBLIC_FIRESTORE_MEASUREMENTID 18 | }; 19 | 20 | // Initialize Firebase 21 | const app = initializeApp(firebaseConfig); 22 | export const db = getFirestore(app); 23 | export const auth_firebase = getAuth(app) -------------------------------------------------------------------------------- /.github/workflows/manual.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow that is manually triggered 2 | 3 | name: Manual workflow 4 | 5 | # Controls when the action will run. Workflow runs when manually triggered using the UI 6 | # or API. 7 | on: 8 | workflow_dispatch: 9 | # Inputs the workflow accepts. 10 | inputs: 11 | name: 12 | # Friendly description to be shown in the UI instead of 'name' 13 | description: 'Person to greet' 14 | # Default value if no value is explicitly provided 15 | default: 'World' 16 | # Input has to be provided for the workflow to run 17 | required: true 18 | # The data type of the input 19 | type: string 20 | 21 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 22 | jobs: 23 | # This workflow contains a single job called "greet" 24 | greet: 25 | # The type of runner that the job will run on 26 | runs-on: ubuntu-latest 27 | 28 | # Steps represent a sequence of tasks that will be executed as part of the job 29 | steps: 30 | # Runs a single command using the runners shell 31 | - name: Send greeting 32 | run: echo "Hello ${{ inputs.name }}" 33 | -------------------------------------------------------------------------------- /src/app/[lang]/map/page.js: -------------------------------------------------------------------------------- 1 | "use client"; 2 | import dynamic from "next/dynamic"; 3 | import { useMemo } from "react"; 4 | export default function MapPage() { 5 | const MapMenu = useMemo( 6 | () => 7 | dynamic(() => import("@/components/map"), { 8 | loading: () => ( 9 |
10 | 16 | 24 | 29 | 30 |
31 | ), 32 | ssr: false, 33 | }), 34 | [] 35 | ); 36 | return ( 37 |
38 | 39 |
40 | ); 41 | } 42 | -------------------------------------------------------------------------------- /src/components/unauth.js: -------------------------------------------------------------------------------- 1 | import BackButton from './backbutton'; 2 | 3 | export default function UnAuth(){ 4 | return
5 |
6 |
7 | 8 |
9 |

You need to use PiBrowser for the feature

10 | 11 |
12 |
13 | } -------------------------------------------------------------------------------- /src/app/[lang]/business/business.js: -------------------------------------------------------------------------------- 1 | 'use client' 2 | import { query, where,collection,getDocs } from "firebase/firestore"; 3 | import { useContext, useEffect } from "react"; 4 | import { PiContext } from "./pi"; 5 | import { db } from "@/components/firestore"; 6 | 7 | export default function BusinessSelector({children}){ 8 | 9 | let Pi = useContext(PiContext) 10 | useEffect(()=>{ 11 | const scopes = ['payments','username','wallet_address','roles']; 12 | function onIncompletePaymentFound(payment) { /* ... */ }; 13 | Pi.authenticate(scopes, onIncompletePaymentFound).then(async function(auth) { 14 | const shopRef = collection(db, "shop"); 15 | const q = query(shopRef, where("owner", "array-contains", auth.user.username)); 16 | const querySnapshot = await getDocs(q); 17 | if (querySnapshot.empty) { 18 | console.log('No matching documents.'); 19 | }else{ 20 | querySnapshot.forEach(doc => { 21 | let data = doc.data() 22 | console.log(data) 23 | }); 24 | } 25 | }).catch(function(error) { 26 | console.error(error); 27 | console.log("pi sdk failed") 28 | }); 29 | 30 | },[]) 31 | 32 | return 37 | } -------------------------------------------------------------------------------- /.github/workflows/datadog-synthetics.yml: -------------------------------------------------------------------------------- 1 | # This workflow will trigger Datadog Synthetic tests within your Datadog organisation 2 | # For more information on running Synthetic tests within your GitHub workflows see: https://docs.datadoghq.com/synthetics/cicd_integrations/github_actions/ 3 | 4 | # This workflow uses actions that are not certified by GitHub. 5 | # They are provided by a third-party and are governed by 6 | # separate terms of service, privacy policy, and support 7 | # documentation. 8 | 9 | # To get started: 10 | 11 | # 1. Add your Datadog API (DD_API_KEY) and Application Key (DD_APP_KEY) as secrets to your GitHub repository. For more information, see: https://docs.datadoghq.com/account_management/api-app-keys/. 12 | # 2. Start using the action within your workflow 13 | 14 | name: Run Datadog Synthetic tests 15 | 16 | on: 17 | push: 18 | branches: [ "main" ] 19 | pull_request: 20 | branches: [ "main" ] 21 | 22 | jobs: 23 | build: 24 | runs-on: ubuntu-latest 25 | 26 | steps: 27 | - uses: actions/checkout@v2 28 | 29 | # Run Synthetic tests within your GitHub workflow. 30 | # For additional configuration options visit the action within the marketplace: https://github.com/marketplace/actions/datadog-synthetics-ci 31 | - name: Run Datadog Synthetic tests 32 | uses: DataDog/synthetics-ci-github-action@2b56dc0cca9daa14ab69c0d1d6844296de8f941e 33 | with: 34 | api_key: ${{secrets.DD_API_KEY}} 35 | app_key: ${{secrets.DD_APP_KEY}} 36 | test_search_query: 'tag:e2e-tests' #Modify this tag to suit your tagging strategy 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/middleware.js: -------------------------------------------------------------------------------- 1 | import { NextResponse } from "next/server"; 2 | 3 | import { i18n } from "../locale-config"; 4 | 5 | import { match as matchLocale } from "@formatjs/intl-localematcher"; 6 | import Negotiator from "negotiator"; 7 | 8 | function getLocale(request) { 9 | // Negotiator expects plain object so we need to transform headers 10 | const negotiatorHeaders = {}; 11 | request.headers.forEach((value, key) => (negotiatorHeaders[key] = value)); 12 | 13 | // @ts-ignore locales are readonly 14 | const locales = i18n.locales; 15 | 16 | // Use negotiator and intl-localematcher to get best locale 17 | let languages = new Negotiator({ headers: negotiatorHeaders }).languages( 18 | locales 19 | ); 20 | 21 | const locale = matchLocale(languages, locales, i18n.defaultLocale); 22 | 23 | return locale; 24 | } 25 | 26 | export function middleware(request) { 27 | const pathname = request.nextUrl.pathname; 28 | 29 | // // `/_next/` and `/api/` are ignored by the watcher, but we need to ignore files in `public` manually. 30 | // // If you have one 31 | // if ( 32 | // [ 33 | // '/manifest.json', 34 | // '/favicon.ico', 35 | // // Your other files in `public` 36 | // ].includes(pathname) 37 | // ) 38 | // return 39 | 40 | // Check if there is any supported locale in the pathname 41 | const pathnameIsMissingLocale = i18n.locales.every( 42 | (locale) => !pathname.startsWith(`/${locale}/`) && pathname !== `/${locale}` 43 | ); 44 | 45 | // Redirect if there is no locale 46 | if (pathnameIsMissingLocale) { 47 | const locale = getLocale(request); 48 | 49 | // e.g. incoming request is /products 50 | // The new URL is now /en-US/products 51 | return NextResponse.redirect( 52 | new URL( 53 | `/${locale}${pathname.startsWith("/") ? "" : "/"}${pathname}`, 54 | request.url 55 | ) 56 | ); 57 | } 58 | } 59 | 60 | export const config = { 61 | // Matcher ignoring `/_next/` and `/api/` 62 | matcher: ["/((?!api|_next/static|_next/image|favicon.ico|zh-TW|zh-CN).*)"], 63 | }; 64 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | PiOS License 2 | 3 | Copyright (C) 2024 KOSASIH 4 | 5 | Permission is hereby granted by the application software developer (“Software Developer”), free 6 | of charge, to any person obtaining a copy of this application, software and associated 7 | documentation files (the “Software”), which was developed by the Software Developer for use on 8 | Pi Network, whereby the purpose of this license is to permit the development of derivative works 9 | based on the Software, including the right to use, copy, modify, merge, publish, distribute, 10 | sub-license, and/or sell copies of such derivative works and any Software components incorporated 11 | therein, and to permit persons to whom such derivative works are furnished to do so, in each case, 12 | solely to develop, use and market applications for the official Pi Network. For purposes of this 13 | license, Pi Network shall mean any application, software, or other present or future platform 14 | developed, owned or managed by Pi Community Company, and its parents, affiliates or subsidiaries, 15 | for which the Software was developed, or on which the Software continues to operate. However, 16 | you are prohibited from using any portion of the Software or any derivative works thereof in any 17 | manner (a) which infringes on any Pi Network intellectual property rights, (b) to hack any of Pi 18 | Network’s systems or processes or (c) to develop any product or service which is competitive with 19 | the Pi Network. 20 | 21 | The above copyright notice and this permission notice shall be included in all copies or 22 | substantial portions of the Software. 23 | 24 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 25 | INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE 26 | AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS, PUBLISHERS, OR COPYRIGHT HOLDERS OF THIS 27 | SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL 28 | DAMAGES (INCLUDING, BUT NOT LIMITED TO BUSINESS INTERRUPTION, LOSS OF USE, DATA OR PROFITS) 29 | HOWEVER CAUSED AND UNDER ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 30 | TORT (INCLUDING NEGLIGENCE) ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 31 | OR OTHER DEALINGS IN THE SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 32 | 33 | Pi, Pi Network and the Pi logo are trademarks of the Pi Community Company. 34 | -------------------------------------------------------------------------------- /src/constants.py: -------------------------------------------------------------------------------- 1 | # src/constants.py 2 | 3 | """ 4 | Pi Coin Configuration Constants 5 | This module contains constants related to the Pi Coin cryptocurrency. 6 | """ 7 | 8 | # Pi Coin Symbol 9 | PI_COIN_SYMBOL = "Pi" # Symbol for Pi Coin 10 | 11 | # Pi Coin Value 12 | PI_COIN_VALUE = 314159 # Fixed value of Pi Coin in USD 13 | 14 | # Pi Coin Supply 15 | PI_COIN_SUPPLY = 100_000_000_000 # Total supply of Pi Coin 16 | 17 | # Pi Coin Transaction Fee 18 | PI_COIN_TRANSACTION_FEE = 0.01 # Transaction fee in USD 19 | 20 | # Pi Coin Block Time 21 | PI_COIN_BLOCK_TIME = 10 # Average block time in seconds 22 | 23 | # Pi Coin Mining Difficulty 24 | PI_COIN_MINING_DIFFICULTY = 1000 # Difficulty level for mining Pi Coin 25 | 26 | # Pi Coin Reward for Mining 27 | PI_COIN_MINING_REWARD = 12.5 # Reward for mining a block 28 | 29 | # Pi Coin Network Protocol 30 | PI_COIN_NETWORK_PROTOCOL = "PoS" # Proof of Stake 31 | 32 | # Pi Coin Maximum Transaction Size 33 | PI_COIN_MAX_TRANSACTION_SIZE = 1_000_000 # Maximum transaction size in bytes 34 | 35 | # Pi Coin Decimals 36 | PI_COIN_DECIMALS = 18 # Number of decimal places for Pi Coin 37 | 38 | # Pi Coin Genesis Block Timestamp 39 | PI_COIN_GENESIS_BLOCK_TIMESTAMP = "2023-01-01T00:00:00Z" # Timestamp of the genesis block 40 | 41 | # Pi Coin Governance Model 42 | PI_COIN_GOVERNANCE_MODEL = "Decentralized" # Governance model for Pi Coin 43 | 44 | # Pi Coin Security Features 45 | PI_COIN_ENCRYPTION_ALGORITHM = "AES-256" # Encryption algorithm for securing transactions 46 | PI_COIN_HASHING_ALGORITHM = "SHA-256" # Hashing algorithm for block verification 47 | PI_COIN_SIGNATURE_SCHEME = "ECDSA" # Digital signature scheme for transaction signing 48 | 49 | # Pi Coin Network Parameters 50 | PI_COIN_MAX_PEERS = 100 # Maximum number of peers in the network 51 | PI_COIN_NODE_TIMEOUT = 30 # Timeout for node responses in seconds 52 | PI_COIN_CONNECTION_RETRY_INTERVAL = 5 # Retry interval for node connections in seconds 53 | 54 | # Pi Coin Staking Parameters 55 | PI_COIN_MIN_STAKE_AMOUNT = 100 # Minimum amount required to stake 56 | PI_COIN_STAKE_REWARD_RATE = 0.05 # Annual reward rate for staking 57 | 58 | # Pi Coin API Rate Limits 59 | PI_COIN_API_REQUEST_LIMIT = 1000 # Maximum API requests per hour 60 | PI_COIN_API_KEY_EXPIRATION = 3600 # API key expiration time in seconds 61 | 62 | # Pi Coin Regulatory Compliance 63 | PI_COIN_KYC_REQUIRED = True # Whether KYC is required for transactions 64 | PI_COIN_COMPLIANCE_JURISDICTIONS = ["US", "EU", "UK"] # Jurisdictions for compliance 65 | 66 | # Additional constants can be added here as needed 67 | -------------------------------------------------------------------------------- /src/app/[lang]/business/pi.js: -------------------------------------------------------------------------------- 1 | "use client"; 2 | import { auth } from "@/action/auth"; 3 | import LoadingPage from "@/components/loading"; 4 | import UnAuth from "@/components/unauth"; 5 | import Script from "next/script"; 6 | import { createContext, useEffect, useState } from "react"; 7 | import { signInWithCustomToken } from "firebase/auth"; 8 | import { auth_firebase } from "@/components/firestore"; 9 | 10 | export const PiContext = createContext(); 11 | 12 | export default function PiUser({ children }) { 13 | const [pi, setpi] = useState(null); 14 | const [ispi, setispi] = useState(null); 15 | const firebase_auth = async (token) => { 16 | const data_token = await auth(token); 17 | signInWithCustomToken(auth_firebase, data_token) 18 | .then((userCredential) => { 19 | // Signed in 20 | console.log(userCredential.user); 21 | // ... 22 | }) 23 | .catch((error) => { 24 | const errorCode = error.code; 25 | const errorMessage = error.message; 26 | console.log(errorMessage); 27 | }); 28 | }; 29 | const loadpi = () => { 30 | window.Pi.init({ 31 | version: "2.0", 32 | sandbox: process.env.NEXT_PUBLIC_APP_SANDBOX == "true" ? true : false, 33 | }).catch(function (error) { 34 | console.error(error); 35 | console.log("pi sdk failed"); 36 | }); 37 | const scopes = ["payments", "username", "wallet_address", "roles"]; 38 | function onIncompletePaymentFound(payment) { 39 | /* ... */ 40 | } 41 | window.Pi.authenticate(scopes, onIncompletePaymentFound) 42 | .then(function (auth) { 43 | firebase_auth(auth.accessToken); 44 | }) 45 | .catch(function (error) { 46 | console.error(error); 47 | console.log("pi sdk failed"); 48 | }); 49 | setpi(window.Pi); 50 | }; 51 | 52 | useEffect(() => { 53 | if ( 54 | window.location.ancestorOrigins[0] == "https://sandbox.minepi.com" || 55 | window.location.ancestorOrigins[0] == "https://app-cdn.minepi.com" 56 | ) { 57 | setispi(true); 58 | } else { 59 | setispi(false); 60 | } 61 | },[]); 62 | if (ispi == false && ispi != null) { 63 | return ; 64 | } else if (ispi == null || pi == null) { 65 | return ( 66 | <> 67 | 71 | 72 | 73 | ); 74 | } else if (ispi == true) { 75 | return ( 76 | <> 77 | 78 | {children} 79 | 80 | ); 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /src/components/loading.js: -------------------------------------------------------------------------------- 1 | export default function LoadingPage() { 2 | return ( 3 |
4 |
5 | 6 | 7 | 17 | 18 | 19 | 29 | 30 | 31 | 41 | 42 | 43 | 53 | 54 | 55 | 65 | 66 | 67 |
68 | 69 |
70 | ); 71 | } 72 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | Project logo 3 |

4 |

EasyGoods

5 | 6 |
7 | 8 | [![Hackathon](https://img.shields.io/badge/hackathon-PiCommerce-orange.svg)](https://github.com/pi-apps/PiOS/blob/main/pi-commerce.md) 9 | [![Status](https://img.shields.io/badge/status-active-success.svg)]() 10 | [![GitHub Issues](https://img.shields.io/github/issues/0205miss/EasyGoods.svg)](https://github.com/0205miss/EasyGoods/issues) 11 | [![GitHub Pull Requests](https://img.shields.io/github/issues-pr/0205miss/EasyGoods.svg)](https://github.com/0205miss/EasyGoods/pulls) 12 | [![License](https://img.shields.io/badge/license-PIOS-blue.svg)](LICENSE.md) 13 | 14 |
15 | 16 | --- 17 | 18 |

A commerce project for pi commerce hackathon. 19 |
20 |

21 | 22 | ## 📝 Table of Contents 23 | 24 | - [Dependencies / Limitations](#limitations) 25 | - [Future Scope](#future_scope) 26 | - [Setting up a local environment](#getting_started) 27 | - [Usage](#usage) 28 | - [Technology Stack](#tech_stack) 29 | - [Contributing](/CONTRIBUTING.md) 30 | - [Authors](#authors) 31 | - [Acknowledgments](#acknowledgments) 32 | 33 | 34 | ## ⛓️ Dependencies / Limitations 35 | 36 | ``` 37 | TBD 38 | ``` 39 | 40 | ## 🚀 Future Scope 41 | 42 | ``` 43 | TBD 44 | ``` 45 | 46 | ## 🏁 Getting Started 47 | 48 | These instructions will get you a copy of the project up and running on your local machine for development 49 | and testing purposes. See [deployment](#deployment) for notes on how to deploy the project on a live system. 50 | 51 | ### Prerequisites 52 | 53 | ``` 54 | clone the project and edit the .env 55 | ``` 56 | 57 | ### Installing 58 | 59 | A step by step series of examples that tell you how to get a development env running. 60 | 61 | Say what the step will be 62 | 63 | ``` 64 | npm install 65 | ``` 66 | 67 | Dev 68 | 69 | ``` 70 | npm run dev 71 | ``` 72 | 73 | build 74 | 75 | ``` 76 | npm run build 77 | ``` 78 | 79 | ## 🎈 Usage 80 | 81 | Add notes about how to use the system. 82 | 83 | ``` 84 | TBD 85 | ``` 86 | 87 | ## ⛏️ Built With 88 | 89 | - [NextJS](https://nextjs.org/) - Web Framework 90 | - [NodeJs](https://nodejs.org/en/) - Server Environment 91 | - [FireStore](https://cloud.google.com/firestore) - Database 92 | 93 | ## ✍️ Authors 94 | 95 | - [@0205miss](https://github.com/0205miss) - Idea & Initial work 96 | 97 | See also the list of [contributors](https://github.com/KOSASIH/EasyGoods/graphs/contributors) 98 | who participated in this project. 99 | 100 | ## 🎉 Acknowledgments 101 | 102 | - Hat tip to anyone whose code was used 103 | - Inspiration 104 | - References 105 | -------------------------------------------------------------------------------- /.github/workflows/tencent.yml: -------------------------------------------------------------------------------- 1 | # This workflow will build a docker container, publish and deploy it to Tencent Kubernetes Engine (TKE) when there is a push to the "main" branch. 2 | # 3 | # To configure this workflow: 4 | # 5 | # 1. Ensure that your repository contains the necessary configuration for your Tencent Kubernetes Engine cluster, 6 | # including deployment.yml, kustomization.yml, service.yml, etc. 7 | # 8 | # 2. Set up secrets in your workspace: 9 | # - TENCENT_CLOUD_SECRET_ID with Tencent Cloud secret id 10 | # - TENCENT_CLOUD_SECRET_KEY with Tencent Cloud secret key 11 | # - TENCENT_CLOUD_ACCOUNT_ID with Tencent Cloud account id 12 | # - TKE_REGISTRY_PASSWORD with TKE registry password 13 | # 14 | # 3. Change the values for the TKE_IMAGE_URL, TKE_REGION, TKE_CLUSTER_ID and DEPLOYMENT_NAME environment variables (below). 15 | 16 | name: Tencent Kubernetes Engine 17 | 18 | on: 19 | push: 20 | branches: [ "main" ] 21 | 22 | # Environment variables available to all jobs and steps in this workflow 23 | env: 24 | TKE_IMAGE_URL: ccr.ccs.tencentyun.com/demo/mywebapp 25 | TKE_REGION: ap-guangzhou 26 | TKE_CLUSTER_ID: cls-mywebapp 27 | DEPLOYMENT_NAME: tke-test 28 | 29 | permissions: 30 | contents: read 31 | 32 | jobs: 33 | setup-build-publish-deploy: 34 | name: Setup, Build, Publish, and Deploy 35 | runs-on: ubuntu-latest 36 | environment: production 37 | steps: 38 | 39 | - name: Checkout 40 | uses: actions/checkout@v3 41 | 42 | # Build 43 | - name: Build Docker image 44 | run: | 45 | docker build -t ${TKE_IMAGE_URL}:${GITHUB_SHA} . 46 | 47 | - name: Login TKE Registry 48 | run: | 49 | docker login -u ${{ secrets.TENCENT_CLOUD_ACCOUNT_ID }} -p '${{ secrets.TKE_REGISTRY_PASSWORD }}' ${TKE_IMAGE_URL} 50 | 51 | # Push the Docker image to TKE Registry 52 | - name: Publish 53 | run: | 54 | docker push ${TKE_IMAGE_URL}:${GITHUB_SHA} 55 | 56 | - name: Set up Kustomize 57 | run: | 58 | curl -o kustomize --location https://github.com/kubernetes-sigs/kustomize/releases/download/v3.1.0/kustomize_3.1.0_linux_amd64 59 | chmod u+x ./kustomize 60 | 61 | - name: Set up ~/.kube/config for connecting TKE cluster 62 | uses: TencentCloud/tke-cluster-credential-action@v1 63 | with: 64 | secret_id: ${{ secrets.TENCENT_CLOUD_SECRET_ID }} 65 | secret_key: ${{ secrets.TENCENT_CLOUD_SECRET_KEY }} 66 | tke_region: ${{ env.TKE_REGION }} 67 | cluster_id: ${{ env.TKE_CLUSTER_ID }} 68 | 69 | - name: Switch to TKE context 70 | run: | 71 | kubectl config use-context ${TKE_CLUSTER_ID}-context-default 72 | 73 | # Deploy the Docker image to the TKE cluster 74 | - name: Deploy 75 | run: | 76 | ./kustomize edit set image ${TKE_IMAGE_URL}:${GITHUB_SHA} 77 | ./kustomize build . | kubectl apply -f - 78 | kubectl rollout status deployment/${DEPLOYMENT_NAME} 79 | kubectl get services -o wide 80 | -------------------------------------------------------------------------------- /.github/workflows/ibm.yml: -------------------------------------------------------------------------------- 1 | # This workflow will build a docker container, publish it to IBM Container Registry, and deploy it to IKS when there is a push to the "main" branch. 2 | # 3 | # To configure this workflow: 4 | # 5 | # 1. Ensure that your repository contains a Dockerfile 6 | # 2. Setup secrets in your repository by going to settings: Create ICR_NAMESPACE and IBM_CLOUD_API_KEY 7 | # 3. Change the values for the IBM_CLOUD_REGION, REGISTRY_HOSTNAME, IMAGE_NAME, IKS_CLUSTER, DEPLOYMENT_NAME, and PORT 8 | 9 | name: Build and Deploy to IKS 10 | 11 | on: 12 | push: 13 | branches: [ "main" ] 14 | 15 | # Environment variables available to all jobs and steps in this workflow 16 | env: 17 | GITHUB_SHA: ${{ github.sha }} 18 | IBM_CLOUD_API_KEY: ${{ secrets.IBM_CLOUD_API_KEY }} 19 | IBM_CLOUD_REGION: us-south 20 | ICR_NAMESPACE: ${{ secrets.ICR_NAMESPACE }} 21 | REGISTRY_HOSTNAME: us.icr.io 22 | IMAGE_NAME: iks-test 23 | IKS_CLUSTER: example-iks-cluster-name-or-id 24 | DEPLOYMENT_NAME: iks-test 25 | PORT: 5001 26 | 27 | jobs: 28 | setup-build-publish-deploy: 29 | name: Setup, Build, Publish, and Deploy 30 | runs-on: ubuntu-latest 31 | environment: production 32 | steps: 33 | 34 | - name: Checkout 35 | uses: actions/checkout@v3 36 | 37 | # Download and Install IBM Cloud CLI 38 | - name: Install IBM Cloud CLI 39 | run: | 40 | curl -fsSL https://clis.cloud.ibm.com/install/linux | sh 41 | ibmcloud --version 42 | ibmcloud config --check-version=false 43 | ibmcloud plugin install -f kubernetes-service 44 | ibmcloud plugin install -f container-registry 45 | 46 | # Authenticate with IBM Cloud CLI 47 | - name: Authenticate with IBM Cloud CLI 48 | run: | 49 | ibmcloud login --apikey "${IBM_CLOUD_API_KEY}" -r "${IBM_CLOUD_REGION}" -g default 50 | ibmcloud cr region-set "${IBM_CLOUD_REGION}" 51 | ibmcloud cr login 52 | 53 | # Build the Docker image 54 | - name: Build with Docker 55 | run: | 56 | docker build -t "$REGISTRY_HOSTNAME"/"$ICR_NAMESPACE"/"$IMAGE_NAME":"$GITHUB_SHA" \ 57 | --build-arg GITHUB_SHA="$GITHUB_SHA" \ 58 | --build-arg GITHUB_REF="$GITHUB_REF" . 59 | 60 | # Push the image to IBM Container Registry 61 | - name: Push the image to ICR 62 | run: | 63 | docker push $REGISTRY_HOSTNAME/$ICR_NAMESPACE/$IMAGE_NAME:$GITHUB_SHA 64 | 65 | # Deploy the Docker image to the IKS cluster 66 | - name: Deploy to IKS 67 | run: | 68 | ibmcloud ks cluster config --cluster $IKS_CLUSTER 69 | kubectl config current-context 70 | kubectl create deployment $DEPLOYMENT_NAME --image=$REGISTRY_HOSTNAME/$ICR_NAMESPACE/$IMAGE_NAME:$GITHUB_SHA --dry-run -o yaml > deployment.yaml 71 | kubectl apply -f deployment.yaml 72 | kubectl rollout status deployment/$DEPLOYMENT_NAME 73 | kubectl create service loadbalancer $DEPLOYMENT_NAME --tcp=80:$PORT --dry-run -o yaml > service.yaml 74 | kubectl apply -f service.yaml 75 | kubectl get services -o wide 76 | -------------------------------------------------------------------------------- /.github/workflows/azure-functions-app-nodejs.yml: -------------------------------------------------------------------------------- 1 | # This workflow will build a Node.js project and deploy it to an Azure Functions App on Windows or Linux when a commit is pushed to your default branch. 2 | # 3 | # This workflow assumes you have already created the target Azure Functions app. 4 | # For instructions see: 5 | # - https://learn.microsoft.com/en-us/azure/azure-functions/create-first-function-vs-code-node 6 | # - https://learn.microsoft.com/en-us/azure/azure-functions/create-first-function-vs-code-typescript 7 | # 8 | # To configure this workflow: 9 | # 1. Set up the following secrets in your repository: 10 | # - AZURE_FUNCTIONAPP_PUBLISH_PROFILE 11 | # 2. Change env variables for your configuration. 12 | # 13 | # For more information on: 14 | # - GitHub Actions for Azure: https://github.com/Azure/Actions 15 | # - Azure Functions Action: https://github.com/Azure/functions-action 16 | # - Publish Profile: https://github.com/Azure/functions-action#using-publish-profile-as-deployment-credential-recommended 17 | # - Azure Service Principal for RBAC: https://github.com/Azure/functions-action#using-azure-service-principal-for-rbac-as-deployment-credential 18 | # 19 | # For more samples to get started with GitHub Action workflows to deploy to Azure: https://github.com/Azure/actions-workflow-samples/tree/master/FunctionApp 20 | 21 | name: Deploy Node.js project to Azure Function App 22 | 23 | on: 24 | push: 25 | branches: ["main"] 26 | 27 | env: 28 | AZURE_FUNCTIONAPP_NAME: 'your-app-name' # set this to your function app name on Azure 29 | AZURE_FUNCTIONAPP_PACKAGE_PATH: '.' # set this to the path to your function app project, defaults to the repository root 30 | NODE_VERSION: '16.x' # set this to the node version to use (e.g. '8.x', '10.x', '12.x') 31 | 32 | jobs: 33 | build-and-deploy: 34 | runs-on: windows-latest # For Linux, use ubuntu-latest 35 | environment: dev 36 | steps: 37 | - name: 'Checkout GitHub Action' 38 | uses: actions/checkout@v3 39 | 40 | # If you want to use Azure RBAC instead of Publish Profile, then uncomment the task below 41 | # - name: 'Login via Azure CLI' 42 | # uses: azure/login@v1 43 | # with: 44 | # creds: ${{ secrets.AZURE_RBAC_CREDENTIALS }} # set up AZURE_RBAC_CREDENTIALS secrets in your repository 45 | 46 | - name: Setup Node ${{ env.NODE_VERSION }} Environment 47 | uses: actions/setup-node@v3 48 | with: 49 | node-version: ${{ env.NODE_VERSION }} 50 | 51 | - name: 'Resolve Project Dependencies Using Npm' 52 | shell: pwsh # For Linux, use bash 53 | run: | 54 | pushd './${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}' 55 | npm install 56 | npm run build --if-present 57 | npm run test --if-present 58 | popd 59 | 60 | - name: 'Run Azure Functions Action' 61 | uses: Azure/functions-action@v1 62 | id: fa 63 | with: 64 | app-name: ${{ env.AZURE_FUNCTIONAPP_NAME }} 65 | package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }} 66 | publish-profile: ${{ secrets.AZURE_FUNCTIONAPP_PUBLISH_PROFILE }} # Remove publish-profile to use Azure RBAC 67 | -------------------------------------------------------------------------------- /src/components/map.js: -------------------------------------------------------------------------------- 1 | 'use client' 2 | import { 3 | MapContainer, 4 | Marker, 5 | TileLayer 6 | } from "react-leaflet"; 7 | import { collection, query, where, getDocs } from "firebase/firestore"; 8 | import "leaflet/dist/leaflet.css"; 9 | import { useEffect, useState } from "react"; 10 | import "leaflet-defaulticon-compatibility"; 11 | import "leaflet-defaulticon-compatibility/dist/leaflet-defaulticon-compatibility.css"; 12 | import L from "leaflet"; 13 | import { iso1A2Code } from '@rapideditor/country-coder'; 14 | import { db } from "./firestore"; 15 | 16 | const iconPerson = new L.Icon({ 17 | iconUrl: "https://svgshare.com/i/12NF.svg", 18 | iconRetinaUrl: "https://svgshare.com/i/12NF.svg", 19 | iconAnchor: null, 20 | popupAnchor: null, 21 | shadowUrl: null, 22 | shadowSize: null, 23 | shadowAnchor: null, 24 | iconSize: new L.Point(60, 60), 25 | }); 26 | 27 | export default function MapMenu() { 28 | const [location,setLocation] = useState(null) 29 | const [position, setPosition] = useState([]) 30 | 31 | useEffect(()=>{ 32 | if('geolocation' in navigator) { 33 | // Retrieve latitude & longitude coordinates from `navigator.geolocation` Web API 34 | navigator.geolocation.getCurrentPosition(({ coords }) => { 35 | const { latitude, longitude } = coords; 36 | setLocation({ latitude, longitude,countrycode:iso1A2Code([longitude,latitude]) }); 37 | }) 38 | } 39 | },[]) 40 | const markers = async() =>{ 41 | if(location==null) return 42 | const shopRef = collection(db, "shop"); 43 | const country = iso1A2Code([location.longitude,location.latitude]) 44 | const q = query(shopRef, where("country", "==", country)); 45 | const querySnapshot = await getDocs(q); 46 | if (querySnapshot.empty) { 47 | console.log('No matching documents.'); 48 | }else{ 49 | querySnapshot.forEach(doc => { 50 | let data = doc.data() 51 | setPosition([...position,data]) 52 | }); 53 | } 54 | } 55 | useEffect(()=>{ 56 | markers() 57 | },[location]) 58 | 59 | const searchshop = () =>{} 60 | if(location==null) return //loading map 61 | console.log(position) 62 | return ( 63 | <> 64 |
65 |
66 | 72 |
73 |
74 | 82 | 83 | 84 | {position.length==0 ? null :position.map((item)=>)} 85 | 86 | 87 | ); 88 | } -------------------------------------------------------------------------------- /.github/workflows/azure-webapps-node.yml: -------------------------------------------------------------------------------- 1 | # This workflow will build and push a node.js application to an Azure Web App when a commit is pushed to your default branch. 2 | # 3 | # This workflow assumes you have already created the target Azure App Service web app. 4 | # For instructions see https://docs.microsoft.com/en-us/azure/app-service/quickstart-nodejs?tabs=linux&pivots=development-environment-cli 5 | # 6 | # To configure this workflow: 7 | # 8 | # 1. Download the Publish Profile for your Azure Web App. You can download this file from the Overview page of your Web App in the Azure Portal. 9 | # For more information: https://docs.microsoft.com/en-us/azure/app-service/deploy-github-actions?tabs=applevel#generate-deployment-credentials 10 | # 11 | # 2. Create a secret in your repository named AZURE_WEBAPP_PUBLISH_PROFILE, paste the publish profile contents as the value of the secret. 12 | # For instructions on obtaining the publish profile see: https://docs.microsoft.com/azure/app-service/deploy-github-actions#configure-the-github-secret 13 | # 14 | # 3. Change the value for the AZURE_WEBAPP_NAME. Optionally, change the AZURE_WEBAPP_PACKAGE_PATH and NODE_VERSION environment variables below. 15 | # 16 | # For more information on GitHub Actions for Azure: https://github.com/Azure/Actions 17 | # For more information on the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy 18 | # For more samples to get started with GitHub Action workflows to deploy to Azure: https://github.com/Azure/actions-workflow-samples 19 | 20 | on: 21 | push: 22 | branches: [ "main" ] 23 | workflow_dispatch: 24 | 25 | env: 26 | AZURE_WEBAPP_NAME: your-app-name # set this to your application's name 27 | AZURE_WEBAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root 28 | NODE_VERSION: '14.x' # set this to the node version to use 29 | 30 | permissions: 31 | contents: read 32 | 33 | jobs: 34 | build: 35 | runs-on: ubuntu-latest 36 | steps: 37 | - uses: actions/checkout@v3 38 | 39 | - name: Set up Node.js 40 | uses: actions/setup-node@v3 41 | with: 42 | node-version: ${{ env.NODE_VERSION }} 43 | cache: 'npm' 44 | 45 | - name: npm install, build, and test 46 | run: | 47 | npm install 48 | npm run build --if-present 49 | npm run test --if-present 50 | 51 | - name: Upload artifact for deployment job 52 | uses: actions/upload-artifact@v3 53 | with: 54 | name: node-app 55 | path: . 56 | 57 | deploy: 58 | permissions: 59 | contents: none 60 | runs-on: ubuntu-latest 61 | needs: build 62 | environment: 63 | name: 'Development' 64 | url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} 65 | 66 | steps: 67 | - name: Download artifact from build job 68 | uses: actions/download-artifact@v3 69 | with: 70 | name: node-app 71 | 72 | - name: 'Deploy to Azure WebApp' 73 | id: deploy-to-webapp 74 | uses: azure/webapps-deploy@v2 75 | with: 76 | app-name: ${{ env.AZURE_WEBAPP_NAME }} 77 | publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} 78 | package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }} 79 | -------------------------------------------------------------------------------- /.github/workflows/codeql.yml: -------------------------------------------------------------------------------- 1 | # For most projects, this workflow file will not need changing; you simply need 2 | # to commit it to your repository. 3 | # 4 | # You may wish to alter this file to override the set of languages analyzed, 5 | # or to provide custom queries or build logic. 6 | # 7 | # ******** NOTE ******** 8 | # We have attempted to detect the languages in your repository. Please check 9 | # the `language` matrix defined below to confirm you have the correct set of 10 | # supported CodeQL languages. 11 | # 12 | name: "CodeQL" 13 | 14 | on: 15 | push: 16 | branches: [ "main" ] 17 | pull_request: 18 | branches: [ "main" ] 19 | schedule: 20 | - cron: '20 23 * * 6' 21 | 22 | jobs: 23 | analyze: 24 | name: Analyze 25 | # Runner size impacts CodeQL analysis time. To learn more, please see: 26 | # - https://gh.io/recommended-hardware-resources-for-running-codeql 27 | # - https://gh.io/supported-runners-and-hardware-resources 28 | # - https://gh.io/using-larger-runners 29 | # Consider using larger runners for possible analysis time improvements. 30 | runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} 31 | timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} 32 | permissions: 33 | # required for all workflows 34 | security-events: write 35 | 36 | # only required for workflows in private repositories 37 | actions: read 38 | contents: read 39 | 40 | strategy: 41 | fail-fast: false 42 | matrix: 43 | language: [ 'javascript-typescript' ] 44 | # CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ] 45 | # Use only 'java-kotlin' to analyze code written in Java, Kotlin or both 46 | # Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both 47 | # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support 48 | 49 | steps: 50 | - name: Checkout repository 51 | uses: actions/checkout@v4 52 | 53 | # Initializes the CodeQL tools for scanning. 54 | - name: Initialize CodeQL 55 | uses: github/codeql-action/init@v3 56 | with: 57 | languages: ${{ matrix.language }} 58 | # If you wish to specify custom queries, you can do so here or in a config file. 59 | # By default, queries listed here will override any specified in a config file. 60 | # Prefix the list here with "+" to use these queries and those in the config file. 61 | 62 | # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs 63 | # queries: security-extended,security-and-quality 64 | 65 | 66 | # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). 67 | # If this step fails, then you should remove it and run the build manually (see below) 68 | - name: Autobuild 69 | uses: github/codeql-action/autobuild@v3 70 | 71 | # ℹ️ Command-line programs to run using the OS shell. 72 | # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun 73 | 74 | # If the Autobuild fails above, remove it and uncomment the following three lines. 75 | # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. 76 | 77 | # - run: | 78 | # echo "Run, Build Application using script" 79 | # ./location_of_script_within_repo/buildscript.sh 80 | 81 | - name: Perform CodeQL Analysis 82 | uses: github/codeql-action/analyze@v3 83 | with: 84 | category: "/language:${{matrix.language}}" 85 | -------------------------------------------------------------------------------- /.github/workflows/sonarqube.yml: -------------------------------------------------------------------------------- 1 | # This workflow uses actions that are not certified by GitHub. 2 | # They are provided by a third-party and are governed by 3 | # separate terms of service, privacy policy, and support 4 | # documentation. 5 | 6 | # This workflow helps you trigger a SonarQube analysis of your code and populates 7 | # GitHub Code Scanning alerts with the vulnerabilities found. 8 | # (this feature is available starting from SonarQube 9.7, Developer Edition and above) 9 | 10 | # 1. Make sure you add a valid GitHub configuration to your SonarQube (Administration > DevOps platforms > GitHub) 11 | 12 | # 2. Import your project on SonarQube 13 | # * Add your repository as a new project by clicking "Create project" from your homepage. 14 | # 15 | # 3. Select GitHub Actions as your CI and follow the tutorial 16 | # * a. Generate a new token and add it to your GitHub repository's secrets using the name SONAR_TOKEN 17 | # (On SonarQube, click on your avatar on top-right > My account > Security or ask your administrator) 18 | # 19 | # * b. Copy/paste your SonarQube host URL to your GitHub repository's secrets using the name SONAR_HOST_URL 20 | # 21 | # * c. Copy/paste the project Key into the args parameter below 22 | # (You'll find this information in SonarQube by following the tutorial or by clicking on Project Information at the top-right of your project's homepage) 23 | 24 | # Feel free to take a look at our documentation (https://docs.sonarqube.org/latest/analysis/github-integration/) 25 | # or reach out to our community forum if you need some help (https://community.sonarsource.com/c/sq/10) 26 | 27 | name: SonarQube analysis 28 | 29 | on: 30 | push: 31 | branches: [ "main" ] 32 | pull_request: 33 | branches: [ "main" ] 34 | workflow_dispatch: 35 | 36 | permissions: 37 | pull-requests: read # allows SonarQube to decorate PRs with analysis results 38 | 39 | jobs: 40 | Analysis: 41 | runs-on: ubuntu-latest 42 | 43 | steps: 44 | - name: Analyze with SonarQube 45 | 46 | # You can pin the exact commit or the version. 47 | # uses: SonarSource/sonarqube-scan-action@v1.1.0 48 | uses: SonarSource/sonarqube-scan-action@7295e71c9583053f5bf40e9d4068a0c974603ec8 49 | env: 50 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information 51 | SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # Generate a token on SonarQube, add it to the secrets of this repo with the name SONAR_TOKEN (Settings > Secrets > Actions > add new repository secret) 52 | SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} # add the URL of your instance to the secrets of this repo with the name SONAR_HOST_URL (Settings > Secrets > Actions > add new repository secret) 53 | with: 54 | # Additional arguments for the sonarcloud scanner 55 | args: 56 | # Unique key of your project. You can find it in SonarQube > [my project] > Project Information (top-right menu) 57 | # mandatory 58 | -Dsonar.projectKey= 59 | # Comma-separated paths to directories containing main source files. 60 | #-Dsonar.sources= # optional, default is project base directory 61 | # When you need the analysis to take place in a directory other than the one from which it was launched 62 | #-Dsonar.projectBaseDir= # optional, default is . 63 | # Comma-separated paths to directories containing test source files. 64 | #-Dsonar.tests= # optional. For more info about Code Coverage, please refer to https://docs.sonarcloud.io/enriching/test-coverage/overview/ 65 | # Adds more detail to both client and server-side analysis logs, activating DEBUG mode for the scanner, and adding client-side environment variables and system properties to the server-side log of analysis report processing. 66 | #-Dsonar.verbose= # optional, default is false 67 | -------------------------------------------------------------------------------- /.github/workflows/docker-publish.yml: -------------------------------------------------------------------------------- 1 | name: Docker 2 | 3 | # This workflow uses actions that are not certified by GitHub. 4 | # They are provided by a third-party and are governed by 5 | # separate terms of service, privacy policy, and support 6 | # documentation. 7 | 8 | on: 9 | schedule: 10 | - cron: '34 11 * * *' 11 | push: 12 | branches: [ "main" ] 13 | # Publish semver tags as releases. 14 | tags: [ 'v*.*.*' ] 15 | pull_request: 16 | branches: [ "main" ] 17 | 18 | env: 19 | # Use docker.io for Docker Hub if empty 20 | REGISTRY: ghcr.io 21 | # github.repository as / 22 | IMAGE_NAME: ${{ github.repository }} 23 | 24 | 25 | jobs: 26 | build: 27 | 28 | runs-on: ubuntu-latest 29 | permissions: 30 | contents: read 31 | packages: write 32 | # This is used to complete the identity challenge 33 | # with sigstore/fulcio when running outside of PRs. 34 | id-token: write 35 | 36 | steps: 37 | - name: Checkout repository 38 | uses: actions/checkout@v3 39 | 40 | # Install the cosign tool except on PR 41 | # https://github.com/sigstore/cosign-installer 42 | - name: Install cosign 43 | if: github.event_name != 'pull_request' 44 | uses: sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06 #v3.1.1 45 | with: 46 | cosign-release: 'v2.1.1' 47 | 48 | # Set up BuildKit Docker container builder to be able to build 49 | # multi-platform images and export cache 50 | # https://github.com/docker/setup-buildx-action 51 | - name: Set up Docker Buildx 52 | uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 53 | 54 | # Login against a Docker registry except on PR 55 | # https://github.com/docker/login-action 56 | - name: Log into registry ${{ env.REGISTRY }} 57 | if: github.event_name != 'pull_request' 58 | uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 59 | with: 60 | registry: ${{ env.REGISTRY }} 61 | username: ${{ github.actor }} 62 | password: ${{ secrets.GITHUB_TOKEN }} 63 | 64 | # Extract metadata (tags, labels) for Docker 65 | # https://github.com/docker/metadata-action 66 | - name: Extract Docker metadata 67 | id: meta 68 | uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0 69 | with: 70 | images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} 71 | 72 | # Build and push Docker image with Buildx (don't push on PR) 73 | # https://github.com/docker/build-push-action 74 | - name: Build and push Docker image 75 | id: build-and-push 76 | uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0 77 | with: 78 | context: . 79 | push: ${{ github.event_name != 'pull_request' }} 80 | tags: ${{ steps.meta.outputs.tags }} 81 | labels: ${{ steps.meta.outputs.labels }} 82 | cache-from: type=gha 83 | cache-to: type=gha,mode=max 84 | 85 | # Sign the resulting Docker image digest except on PRs. 86 | # This will only write to the public Rekor transparency log when the Docker 87 | # repository is public to avoid leaking data. If you would like to publish 88 | # transparency data even for private images, pass --force to cosign below. 89 | # https://github.com/sigstore/cosign 90 | - name: Sign the published Docker image 91 | if: ${{ github.event_name != 'pull_request' }} 92 | env: 93 | # https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable 94 | TAGS: ${{ steps.meta.outputs.tags }} 95 | DIGEST: ${{ steps.build-and-push.outputs.digest }} 96 | # This step uses the identity token to provision an ephemeral certificate 97 | # against the sigstore community Fulcio instance. 98 | run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST} 99 | -------------------------------------------------------------------------------- /.github/workflows/google.yml: -------------------------------------------------------------------------------- 1 | # This workflow will build a docker container, publish it to Google Container Registry, and deploy it to GKE when there is a push to the "main" branch. 2 | # 3 | # To configure this workflow: 4 | # 5 | # 1. Ensure that your repository contains the necessary configuration for your Google Kubernetes Engine cluster, including deployment.yml, kustomization.yml, service.yml, etc. 6 | # 7 | # 2. Create and configure a Workload Identity Provider for GitHub (https://github.com/google-github-actions/auth#setting-up-workload-identity-federation) 8 | # 9 | # 3. Change the values for the GAR_LOCATION, GKE_ZONE, GKE_CLUSTER, IMAGE, REPOSITORY and DEPLOYMENT_NAME environment variables (below). 10 | # 11 | # For more support on how to run the workflow, please visit https://github.com/google-github-actions/setup-gcloud/tree/master/example-workflows/gke-kustomize 12 | 13 | name: Build and Deploy to GKE 14 | 15 | on: 16 | push: 17 | branches: [ "main" ] 18 | 19 | env: 20 | PROJECT_ID: ${{ secrets.GKE_PROJECT }} 21 | GAR_LOCATION: us-central1 # TODO: update region of the Artifact Registry 22 | GKE_CLUSTER: cluster-1 # TODO: update to cluster name 23 | GKE_ZONE: us-central1-c # TODO: update to cluster zone 24 | DEPLOYMENT_NAME: gke-test # TODO: update to deployment name 25 | REPOSITORY: samples # TODO: update to Artifact Registry docker repository 26 | IMAGE: static-site 27 | 28 | jobs: 29 | setup-build-publish-deploy: 30 | name: Setup, Build, Publish, and Deploy 31 | runs-on: ubuntu-latest 32 | environment: production 33 | 34 | permissions: 35 | contents: 'read' 36 | id-token: 'write' 37 | 38 | steps: 39 | - name: Checkout 40 | uses: actions/checkout@v3 41 | 42 | # Configure Workload Identity Federation and generate an access token. 43 | - id: 'auth' 44 | name: 'Authenticate to Google Cloud' 45 | uses: 'google-github-actions/auth@v0' 46 | with: 47 | token_format: 'access_token' 48 | workload_identity_provider: 'projects/123456789/locations/global/workloadIdentityPools/my-pool/providers/my-provider' 49 | service_account: 'my-service-account@my-project.iam.gserviceaccount.com' 50 | 51 | # Alternative option - authentication via credentials json 52 | # - id: 'auth' 53 | # uses: 'google-github-actions/auth@v0' 54 | # with: 55 | # credentials_json: '${{ secrets.GCP_CREDENTIALS }}' 56 | 57 | - name: Docker configuration 58 | run: |- 59 | echo ${{steps.auth.outputs.access_token}} | docker login -u oauth2accesstoken --password-stdin https://$GAR_LOCATION-docker.pkg.dev 60 | # Get the GKE credentials so we can deploy to the cluster 61 | - name: Set up GKE credentials 62 | uses: google-github-actions/get-gke-credentials@v0 63 | with: 64 | cluster_name: ${{ env.GKE_CLUSTER }} 65 | location: ${{ env.GKE_ZONE }} 66 | 67 | # Build the Docker image 68 | - name: Build 69 | run: |- 70 | docker build \ 71 | --tag "$GAR_LOCATION-docker.pkg.dev/$PROJECT_ID/$REPOSITORY/$IMAGE:$GITHUB_SHA" \ 72 | --build-arg GITHUB_SHA="$GITHUB_SHA" \ 73 | --build-arg GITHUB_REF="$GITHUB_REF" \ 74 | . 75 | # Push the Docker image to Google Artifact Registry 76 | - name: Publish 77 | run: |- 78 | docker push "$GAR_LOCATION-docker.pkg.dev/$PROJECT_ID/$REPOSITORY/$IMAGE:$GITHUB_SHA" 79 | # Set up kustomize 80 | - name: Set up Kustomize 81 | run: |- 82 | curl -sfLo kustomize https://github.com/kubernetes-sigs/kustomize/releases/download/v3.1.0/kustomize_3.1.0_linux_amd64 83 | chmod u+x ./kustomize 84 | # Deploy the Docker image to the GKE cluster 85 | - name: Deploy 86 | run: |- 87 | # replacing the image name in the k8s template 88 | ./kustomize edit set image LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY/IMAGE:TAG=$GAR_LOCATION-docker.pkg.dev/$PROJECT_ID/$REPOSITORY/$IMAGE:$GITHUB_SHA 89 | ./kustomize build . | kubectl apply -f - 90 | kubectl rollout status deployment/$DEPLOYMENT_NAME 91 | kubectl get services -o wide 92 | -------------------------------------------------------------------------------- /.github/workflows/aws.yml: -------------------------------------------------------------------------------- 1 | # This workflow will build and push a new container image to Amazon ECR, 2 | # and then will deploy a new task definition to Amazon ECS, when there is a push to the "main" branch. 3 | # 4 | # To use this workflow, you will need to complete the following set-up steps: 5 | # 6 | # 1. Create an ECR repository to store your images. 7 | # For example: `aws ecr create-repository --repository-name my-ecr-repo --region us-east-2`. 8 | # Replace the value of the `ECR_REPOSITORY` environment variable in the workflow below with your repository's name. 9 | # Replace the value of the `AWS_REGION` environment variable in the workflow below with your repository's region. 10 | # 11 | # 2. Create an ECS task definition, an ECS cluster, and an ECS service. 12 | # For example, follow the Getting Started guide on the ECS console: 13 | # https://us-east-2.console.aws.amazon.com/ecs/home?region=us-east-2#/firstRun 14 | # Replace the value of the `ECS_SERVICE` environment variable in the workflow below with the name you set for the Amazon ECS service. 15 | # Replace the value of the `ECS_CLUSTER` environment variable in the workflow below with the name you set for the cluster. 16 | # 17 | # 3. Store your ECS task definition as a JSON file in your repository. 18 | # The format should follow the output of `aws ecs register-task-definition --generate-cli-skeleton`. 19 | # Replace the value of the `ECS_TASK_DEFINITION` environment variable in the workflow below with the path to the JSON file. 20 | # Replace the value of the `CONTAINER_NAME` environment variable in the workflow below with the name of the container 21 | # in the `containerDefinitions` section of the task definition. 22 | # 23 | # 4. Store an IAM user access key in GitHub Actions secrets named `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`. 24 | # See the documentation for each action used below for the recommended IAM policies for this IAM user, 25 | # and best practices on handling the access key credentials. 26 | 27 | name: Deploy to Amazon ECS 28 | 29 | on: 30 | push: 31 | branches: [ "main" ] 32 | 33 | env: 34 | AWS_REGION: MY_AWS_REGION # set this to your preferred AWS region, e.g. us-west-1 35 | ECR_REPOSITORY: MY_ECR_REPOSITORY # set this to your Amazon ECR repository name 36 | ECS_SERVICE: MY_ECS_SERVICE # set this to your Amazon ECS service name 37 | ECS_CLUSTER: MY_ECS_CLUSTER # set this to your Amazon ECS cluster name 38 | ECS_TASK_DEFINITION: MY_ECS_TASK_DEFINITION # set this to the path to your Amazon ECS task definition 39 | # file, e.g. .aws/task-definition.json 40 | CONTAINER_NAME: MY_CONTAINER_NAME # set this to the name of the container in the 41 | # containerDefinitions section of your task definition 42 | 43 | permissions: 44 | contents: read 45 | 46 | jobs: 47 | deploy: 48 | name: Deploy 49 | runs-on: ubuntu-latest 50 | environment: production 51 | 52 | steps: 53 | - name: Checkout 54 | uses: actions/checkout@v3 55 | 56 | - name: Configure AWS credentials 57 | uses: aws-actions/configure-aws-credentials@v1 58 | with: 59 | aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} 60 | aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} 61 | aws-region: ${{ env.AWS_REGION }} 62 | 63 | - name: Login to Amazon ECR 64 | id: login-ecr 65 | uses: aws-actions/amazon-ecr-login@v1 66 | 67 | - name: Build, tag, and push image to Amazon ECR 68 | id: build-image 69 | env: 70 | ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} 71 | IMAGE_TAG: ${{ github.sha }} 72 | run: | 73 | # Build a docker container and 74 | # push it to ECR so that it can 75 | # be deployed to ECS. 76 | docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . 77 | docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG 78 | echo "image=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" >> $GITHUB_OUTPUT 79 | 80 | - name: Fill in the new image ID in the Amazon ECS task definition 81 | id: task-def 82 | uses: aws-actions/amazon-ecs-render-task-definition@v1 83 | with: 84 | task-definition: ${{ env.ECS_TASK_DEFINITION }} 85 | container-name: ${{ env.CONTAINER_NAME }} 86 | image: ${{ steps.build-image.outputs.image }} 87 | 88 | - name: Deploy Amazon ECS task definition 89 | uses: aws-actions/amazon-ecs-deploy-task-definition@v1 90 | with: 91 | task-definition: ${{ steps.task-def.outputs.task-definition }} 92 | service: ${{ env.ECS_SERVICE }} 93 | cluster: ${{ env.ECS_CLUSTER }} 94 | wait-for-service-stability: true 95 | -------------------------------------------------------------------------------- /.github/workflows/alibabacloud.yml: -------------------------------------------------------------------------------- 1 | # This workflow will build and push a new container image to Alibaba Cloud Container Registry (ACR), 2 | # and then will deploy it to Alibaba Cloud Container Service for Kubernetes (ACK), when there is a push to the "main" branch. 3 | # 4 | # To use this workflow, you will need to complete the following set-up steps: 5 | # 6 | # 1. Create an ACR repository to store your container images. 7 | # You can use ACR EE instance for more security and better performance. 8 | # For instructions see https://www.alibabacloud.com/help/doc-detail/142168.htm 9 | # 10 | # 2. Create an ACK cluster to run your containerized application. 11 | # You can use ACK Pro cluster for more security and better performance. 12 | # For instructions see https://www.alibabacloud.com/help/doc-detail/95108.htm 13 | # 14 | # 3. Store your AccessKey pair in GitHub Actions secrets named `ACCESS_KEY_ID` and `ACCESS_KEY_SECRET`. 15 | # For instructions on setting up secrets see: https://developer.github.com/actions/managing-workflows/storing-secrets/ 16 | # 17 | # 4. Change the values for the REGION_ID, REGISTRY, NAMESPACE, IMAGE, ACK_CLUSTER_ID, and ACK_DEPLOYMENT_NAME. 18 | # 19 | 20 | name: Build and Deploy to ACK 21 | 22 | on: 23 | push: 24 | branches: [ "main" ] 25 | 26 | # Environment variables available to all jobs and steps in this workflow. 27 | env: 28 | REGION_ID: cn-hangzhou 29 | REGISTRY: registry.cn-hangzhou.aliyuncs.com 30 | NAMESPACE: namespace 31 | IMAGE: repo 32 | TAG: ${{ github.sha }} 33 | ACK_CLUSTER_ID: clusterID 34 | ACK_DEPLOYMENT_NAME: nginx-deployment 35 | 36 | ACR_EE_REGISTRY: myregistry.cn-hangzhou.cr.aliyuncs.com 37 | ACR_EE_INSTANCE_ID: instanceID 38 | ACR_EE_NAMESPACE: namespace 39 | ACR_EE_IMAGE: repo 40 | ACR_EE_TAG: ${{ github.sha }} 41 | 42 | permissions: 43 | contents: read 44 | 45 | jobs: 46 | build: 47 | runs-on: ubuntu-latest 48 | environment: production 49 | 50 | steps: 51 | - name: Checkout 52 | uses: actions/checkout@v3 53 | 54 | # 1.1 Login to ACR 55 | - name: Login to ACR with the AccessKey pair 56 | uses: aliyun/acr-login@v1 57 | with: 58 | region-id: "${{ env.REGION_ID }}" 59 | access-key-id: "${{ secrets.ACCESS_KEY_ID }}" 60 | access-key-secret: "${{ secrets.ACCESS_KEY_SECRET }}" 61 | 62 | # 1.2 Buid and push image to ACR 63 | - name: Build and push image to ACR 64 | run: | 65 | docker build --tag "$REGISTRY/$NAMESPACE/$IMAGE:$TAG" . 66 | docker push "$REGISTRY/$NAMESPACE/$IMAGE:$TAG" 67 | 68 | # 1.3 Scan image in ACR 69 | - name: Scan image in ACR 70 | uses: aliyun/acr-scan@v1 71 | with: 72 | region-id: "${{ env.REGION_ID }}" 73 | access-key-id: "${{ secrets.ACCESS_KEY_ID }}" 74 | access-key-secret: "${{ secrets.ACCESS_KEY_SECRET }}" 75 | repository: "${{ env.NAMESPACE }}/${{ env.IMAGE }}" 76 | tag: "${{ env.TAG }}" 77 | 78 | # 2.1 (Optional) Login to ACR EE 79 | - uses: actions/checkout@v3 80 | - name: Login to ACR EE with the AccessKey pair 81 | uses: aliyun/acr-login@v1 82 | with: 83 | login-server: "https://${{ env.ACR_EE_REGISTRY }}" 84 | region-id: "${{ env.REGION_ID }}" 85 | access-key-id: "${{ secrets.ACCESS_KEY_ID }}" 86 | access-key-secret: "${{ secrets.ACCESS_KEY_SECRET }}" 87 | instance-id: "${{ env.ACR_EE_INSTANCE_ID }}" 88 | 89 | # 2.2 (Optional) Build and push image ACR EE 90 | - name: Build and push image to ACR EE 91 | run: | 92 | docker build -t "$ACR_EE_REGISTRY/$ACR_EE_NAMESPACE/$ACR_EE_IMAGE:$TAG" . 93 | docker push "$ACR_EE_REGISTRY/$ACR_EE_NAMESPACE/$ACR_EE_IMAGE:$TAG" 94 | # 2.3 (Optional) Scan image in ACR EE 95 | - name: Scan image in ACR EE 96 | uses: aliyun/acr-scan@v1 97 | with: 98 | region-id: "${{ env.REGION_ID }}" 99 | access-key-id: "${{ secrets.ACCESS_KEY_ID }}" 100 | access-key-secret: "${{ secrets.ACCESS_KEY_SECRET }}" 101 | instance-id: "${{ env.ACR_EE_INSTANCE_ID }}" 102 | repository: "${{ env.ACR_EE_NAMESPACE}}/${{ env.ACR_EE_IMAGE }}" 103 | tag: "${{ env.ACR_EE_TAG }}" 104 | 105 | # 3.1 Set ACK context 106 | - name: Set K8s context 107 | uses: aliyun/ack-set-context@v1 108 | with: 109 | access-key-id: "${{ secrets.ACCESS_KEY_ID }}" 110 | access-key-secret: "${{ secrets.ACCESS_KEY_SECRET }}" 111 | cluster-id: "${{ env.ACK_CLUSTER_ID }}" 112 | 113 | # 3.2 Deploy the image to the ACK cluster 114 | - name: Set up Kustomize 115 | run: |- 116 | curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash /dev/stdin 3.8.6 117 | - name: Deploy 118 | run: |- 119 | ./kustomize edit set image REGISTRY/NAMESPACE/IMAGE:TAG=$REGISTRY/$NAMESPACE/$IMAGE:$TAG 120 | ./kustomize build . | kubectl apply -f - 121 | kubectl rollout status deployment/$ACK_DEPLOYMENT_NAME 122 | kubectl get services -o wide 123 | -------------------------------------------------------------------------------- /src/app/[lang]/map/layout.js: -------------------------------------------------------------------------------- 1 | import Link from 'next/link' 2 | export default function UserLayout({ children,params }) { 3 | return ( 4 |
5 |
{children}
6 |
7 | 8 |
9 | 16 | 17 | 22 | 23 | {" "} 24 | {" "} 29 | {" "} 34 | {" "} 41 | {" "} 47 | 48 | 49 |
50 | 51 |
52 | 59 | 60 | 65 | 66 | {" "} 67 | {" "} 74 | 75 | 76 |
77 | 78 |
79 | 86 | 87 | 92 | 93 | {" "} 94 | {" "} 101 | {" "} 107 | {" "} 113 | 114 | 115 |
116 | 117 |
118 |
119 | ); 120 | } 121 | -------------------------------------------------------------------------------- /src/app/[lang]/menu/layout.js: -------------------------------------------------------------------------------- 1 | import Link from 'next/link' 2 | export default function UserLayout({ children,params }) { 3 | return ( 4 |
5 |
{children}
6 |
7 | 8 |
9 | 16 | 17 | 22 | 23 | {" "} 24 | {" "} 29 | {" "} 34 | {" "} 41 | {" "} 47 | 48 | 49 |
50 | 51 | 52 |
53 | 60 | 61 | 66 | 67 | {" "} 68 | {" "} 75 | 76 | 77 |
78 | 79 |
80 | 87 | 88 | 93 | 94 | {" "} 95 | {" "} 102 | {" "} 108 | {" "} 114 | 115 | 116 |
117 |
118 |
119 | ); 120 | } 121 | -------------------------------------------------------------------------------- /src/app/[lang]/order/layout.js: -------------------------------------------------------------------------------- 1 | import Link from 'next/link' 2 | export default function UserLayout({ children,params }) { 3 | return ( 4 |
5 |
{children}
6 |
7 | 8 |
9 | 16 | 17 | 22 | 23 | {" "} 24 | {" "} 29 | {" "} 34 | {" "} 41 | {" "} 47 | 48 | 49 |
50 | 51 |
52 | 59 | 60 | 65 | 66 | {" "} 67 | {" "} 74 | 75 | 76 |
77 | 78 | 79 |
80 | 87 | 88 | 93 | 94 | {" "} 95 | {" "} 102 | {" "} 108 | {" "} 114 | 115 | 116 |
117 | 118 |
119 |
120 | ); 121 | } 122 | -------------------------------------------------------------------------------- /src/res/country.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "flags": { 4 | "png": "https://flagcdn.com/w320/ad.png", 5 | "svg": "https://flagcdn.com/ad.svg", 6 | "alt": "The flag of Andorra features three equal vertical bands of blue, yellow and red, with the coat of arms of Andorra centered in the yellow band." 7 | }, 8 | "cca2": "AD", 9 | "latlng": [ 10 | 42.5, 11 | 1.5 12 | ] 13 | }, 14 | { 15 | "flags": { 16 | "png": "https://flagcdn.com/w320/tf.png", 17 | "svg": "https://flagcdn.com/tf.svg", 18 | "alt": "" 19 | }, 20 | "cca2": "TF", 21 | "latlng": [ 22 | -49.25, 23 | 69.167 24 | ] 25 | }, 26 | { 27 | "flags": { 28 | "png": "https://flagcdn.com/w320/la.png", 29 | "svg": "https://flagcdn.com/la.svg", 30 | "alt": "The flag of Laos is composed of three horizontal bands of red, blue and red. The blue band is twice the height of the red bands and bears a white circle at its center." 31 | }, 32 | "cca2": "LA", 33 | "latlng": [ 34 | 18.0, 35 | 105.0 36 | ] 37 | }, 38 | { 39 | "flags": { 40 | "png": "https://flagcdn.com/w320/ca.png", 41 | "svg": "https://flagcdn.com/ca.svg", 42 | "alt": "The flag of Canada is composed of a red vertical band on the hoist and fly sides and a central white square that is twice the width of the vertical bands. A large eleven-pointed red maple leaf is centered in the white square." 43 | }, 44 | "cca2": "CA", 45 | "latlng": [ 46 | 60.0, 47 | -95.0 48 | ] 49 | }, 50 | { 51 | "flags": { 52 | "png": "https://flagcdn.com/w320/ng.png", 53 | "svg": "https://flagcdn.com/ng.svg", 54 | "alt": "The flag of Nigeria is composed of three equal vertical bands of green, white and green." 55 | }, 56 | "cca2": "NG", 57 | "latlng": [ 58 | 10.0, 59 | 8.0 60 | ] 61 | }, 62 | { 63 | "flags": { 64 | "png": "https://flagcdn.com/w320/vu.png", 65 | "svg": "https://flagcdn.com/vu.svg", 66 | "alt": "The flag of Vanuatu is composed of two equal horizontal bands of red and green, with a black isosceles triangle superimposed on the hoist side of the field. This triangle has its base on the hoist end, spans about two-fifth the width of the field and is enclosed on its sides by the arms of a thin black-edged yellow horizontally oriented Y-shaped band which extends along the boundary of the red and green bands to the fly end of the field. A yellow boar's tusk encircling two yellow crossed namele leaves is centered in the triangle." 67 | }, 68 | "cca2": "VU", 69 | "latlng": [ 70 | -16.0, 71 | 167.0 72 | ] 73 | }, 74 | { 75 | "flags": { 76 | "png": "https://flagcdn.com/w320/cz.png", 77 | "svg": "https://flagcdn.com/cz.svg", 78 | "alt": "The flag of Czechia is composed of two equal horizontal bands of white and red, with a blue isosceles triangle superimposed on the hoist side of the field. The triangle has its base on the hoist end and spans about two-fifth the width of the field." 79 | }, 80 | "cca2": "CZ", 81 | "latlng": [ 82 | 49.75, 83 | 15.5 84 | ] 85 | }, 86 | { 87 | "flags": { 88 | "png": "https://flagcdn.com/w320/mw.png", 89 | "svg": "https://flagcdn.com/mw.svg", 90 | "alt": "The flag of Malawi is composed of three equal horizontal bands of black, red and green. The top half of a red sun with thirty-one visible rays is centered in the black band." 91 | }, 92 | "cca2": "MW", 93 | "latlng": [ 94 | -13.5, 95 | 34.0 96 | ] 97 | }, 98 | { 99 | "flags": { 100 | "png": "https://flagcdn.com/w320/ml.png", 101 | "svg": "https://flagcdn.com/ml.svg", 102 | "alt": "The flag of Mali is composed of three equal vertical bands of green, yellow and red." 103 | }, 104 | "cca2": "ML", 105 | "latlng": [ 106 | 17.0, 107 | -4.0 108 | ] 109 | }, 110 | { 111 | "flags": { 112 | "png": "https://flagcdn.com/w320/is.png", 113 | "svg": "https://flagcdn.com/is.svg", 114 | "alt": "The flag of Iceland has a blue field with a large white-edged red cross that extends to the edges of the field. The vertical part of this cross is offset towards the hoist side." 115 | }, 116 | "cca2": "IS", 117 | "latlng": [ 118 | 65.0, 119 | -18.0 120 | ] 121 | }, 122 | { 123 | "flags": { 124 | "png": "https://flagcdn.com/w320/no.png", 125 | "svg": "https://flagcdn.com/no.svg", 126 | "alt": "The flag of Norway has a red field with a large white-edged navy blue cross that extends to the edges of the field. The vertical part of this cross is offset towards the hoist side." 127 | }, 128 | "cca2": "NO", 129 | "latlng": [ 130 | 62.0, 131 | 10.0 132 | ] 133 | }, 134 | { 135 | "flags": { 136 | "png": "https://flagcdn.com/w320/vc.png", 137 | "svg": "https://flagcdn.com/vc.svg", 138 | "alt": "The flag of Saint Vincent and the Grenadines is composed of three vertical bands of blue, gold and green. The gold band is twice as wide as the other two bands and bears three green diamonds arranged to form the letter V at its center." 139 | }, 140 | "cca2": "VC", 141 | "latlng": [ 142 | 13.25, 143 | -61.2 144 | ] 145 | }, 146 | { 147 | "flags": { 148 | "png": "https://flagcdn.com/w320/gp.png", 149 | "svg": "https://flagcdn.com/gp.svg", 150 | "alt": "" 151 | }, 152 | "cca2": "GP", 153 | "latlng": [ 154 | 16.25, 155 | -61.583333 156 | ] 157 | }, 158 | { 159 | "flags": { 160 | "png": "https://flagcdn.com/w320/cl.png", 161 | "svg": "https://flagcdn.com/cl.svg", 162 | "alt": "The flag of Chile is composed of two equal horizontal bands of white and red, with a blue square of the same height as the white band superimposed in the canton. A white five-pointed star is centered in the blue square." 163 | }, 164 | "cca2": "CL", 165 | "latlng": [ 166 | -30.0, 167 | -71.0 168 | ] 169 | }, 170 | { 171 | "flags": { 172 | "png": "https://flagcdn.com/w320/bm.png", 173 | "svg": "https://flagcdn.com/bm.svg", 174 | "alt": "" 175 | }, 176 | "cca2": "BM", 177 | "latlng": [ 178 | 32.33333333, 179 | -64.75 180 | ] 181 | }, 182 | { 183 | "flags": { 184 | "png": "https://flagcdn.com/w320/kw.png", 185 | "svg": "https://flagcdn.com/kw.svg", 186 | "alt": "The flag of Kuwait is composed of three equal horizontal bands of green, white and red, with a black trapezium superimposed on the hoist side of the field. This trapezium has its base on the hoist end and spans about one-fourth the width of the field." 187 | }, 188 | "cca2": "KW", 189 | "latlng": [ 190 | 29.5, 191 | 45.75 192 | ] 193 | }, 194 | { 195 | "flags": { 196 | "png": "https://flagcdn.com/w320/dm.png", 197 | "svg": "https://flagcdn.com/dm.svg", 198 | "alt": "The flag of Dominica has a green field with a large centered tricolor cross. The vertical and horizontal parts of the cross each comprise three bands of yellow, black and white. A red circle, bearing a hoist-side facing purple Sisserou parrot standing on a twig and encircled by ten five-pointed yellow-edged green stars, is superimposed at the center of the cross." 199 | }, 200 | "cca2": "DM", 201 | "latlng": [ 202 | 15.41666666, 203 | -61.33333333 204 | ] 205 | }, 206 | { 207 | "flags": { 208 | "png": "https://flagcdn.com/w320/me.png", 209 | "svg": "https://flagcdn.com/me.svg", 210 | "alt": "The flag of Montenegro features a large red central rectangular area surrounded by a golden-yellow border. The coat of arms of Montenegro is centered in the red rectangle." 211 | }, 212 | "cca2": "ME", 213 | "latlng": [ 214 | 42.5, 215 | 19.3 216 | ] 217 | }, 218 | { 219 | "flags": { 220 | "png": "https://flagcdn.com/w320/vi.png", 221 | "svg": "https://flagcdn.com/vi.svg", 222 | "alt": "" 223 | }, 224 | "cca2": "VI", 225 | "latlng": [ 226 | 18.35, 227 | -64.933333 228 | ] 229 | }, 230 | { 231 | "flags": { 232 | "png": "https://flagcdn.com/w320/cm.png", 233 | "svg": "https://flagcdn.com/cm.svg", 234 | "alt": "The flag of Cameroon is composed of three equal vertical bands of green, red and yellow, with a yellow five-pointed star in the center." 235 | }, 236 | "cca2": "CM", 237 | "latlng": [ 238 | 6.0, 239 | 12.0 240 | ] 241 | }, 242 | { 243 | "flags": { 244 | "png": "https://flagcdn.com/w320/lk.png", 245 | "svg": "https://flagcdn.com/lk.svg", 246 | "alt": "The flag of Sri Lanka features two large adjacent but separate rectangular areas, centered on a golden-yellow field. The smaller hoist-side rectangle is divided into two equal vertical bands of teal and orange, and the larger fly-side rectangle is maroon with a centered golden-yellow lion holding a Kastane sword in its right fore-paw and four golden-yellow Bo leaves, one in each corner." 247 | }, 248 | "cca2": "LK", 249 | "latlng": [ 250 | 7.0, 251 | 81.0 252 | ] 253 | }, 254 | { 255 | "flags": { 256 | "png": "https://flagcdn.com/w320/cn.png", 257 | "svg": "https://flagcdn.com/cn.svg", 258 | "alt": "The flag of China has a red field. In the canton are five yellow five-pointed stars — a large star and four smaller stars arranged in a vertical arc on the fly side of the large star." 259 | }, 260 | "cca2": "CN", 261 | "latlng": [ 262 | 35.0, 263 | 105.0 264 | ] 265 | }, 266 | { 267 | "flags": { 268 | "png": "https://flagcdn.com/w320/bd.png", 269 | "svg": "https://flagcdn.com/bd.svg", 270 | "alt": "The flag of Bangladesh has a dark green field bearing a large red circle that is offset slightly towards the hoist side of center." 271 | }, 272 | "cca2": "BD", 273 | "latlng": [ 274 | 24.0, 275 | 90.0 276 | ] 277 | }, 278 | { 279 | "flags": { 280 | "png": "https://flagcdn.com/w320/se.png", 281 | "svg": "https://flagcdn.com/se.svg", 282 | "alt": "The flag of Sweden has a blue field with a large golden-yellow cross that extend to the edges of the field. The vertical part of this cross is offset towards the hoist side." 283 | }, 284 | "cca2": "SE", 285 | "latlng": [ 286 | 62.0, 287 | 15.0 288 | ] 289 | }, 290 | { 291 | "flags": { 292 | "png": "https://flagcdn.com/w320/gd.png", 293 | "svg": "https://flagcdn.com/gd.svg", 294 | "alt": "The flag of Grenada features a large central rectangular area surrounded by a red border, with three five-pointed yellow stars centered on the top and bottom borders. The central rectangle is divided diagonally into four alternating triangular areas of yellow at the top and bottom and green on the hoist and fly sides, and a five-pointed yellow star on a red circle is superimposed at its center. A symbolic nutmeg pod is situated on the green hoist-side triangle." 295 | }, 296 | "cca2": "GD", 297 | "latlng": [ 298 | 12.11666666, 299 | -61.66666666 300 | ] 301 | }, 302 | { 303 | "flags": { 304 | "png": "https://flagcdn.com/w320/tr.png", 305 | "svg": "https://flagcdn.com/tr.svg", 306 | "alt": "The flag of Turkey has a red field bearing a large fly-side facing white crescent and a smaller five-pointed white star placed just outside the crescent opening. The white crescent and star are offset slightly towards the hoist side of center." 307 | }, 308 | "cca2": "TR", 309 | "latlng": [ 310 | 39.0, 311 | 35.0 312 | ] 313 | }, 314 | { 315 | "flags": { 316 | "png": "https://flagcdn.com/w320/gn.png", 317 | "svg": "https://flagcdn.com/gn.svg", 318 | "alt": "The flag of Guinea is composed of three equal vertical bands of red, yellow and green." 319 | }, 320 | "cca2": "GN", 321 | "latlng": [ 322 | 11.0, 323 | -10.0 324 | ] 325 | }, 326 | { 327 | "flags": { 328 | "png": "https://flagcdn.com/w320/tz.png", 329 | "svg": "https://flagcdn.com/tz.svg", 330 | "alt": "The flag of Tanzania features a yellow-edged black diagonal band that extends from the lower hoist-side corner to the upper fly-side corner of the field. Above and beneath this band are a green and light blue triangle respectively." 331 | }, 332 | "cca2": "TZ", 333 | "latlng": [ 334 | -6.0, 335 | 35.0 336 | ] 337 | }, 338 | { 339 | "flags": { 340 | "png": "https://flagcdn.com/w320/rw.png", 341 | "svg": "https://flagcdn.com/rw.svg", 342 | "alt": "The flag of Rwanda is composed of three horizontal bands of light blue, yellow and green. The light blue band is twice the height of the other two bands and bears a yellow sun with twenty-four rays on its fly side." 343 | }, 344 | "cca2": "RW", 345 | "latlng": [ 346 | -2.0, 347 | 30.0 348 | ] 349 | }, 350 | { 351 | "flags": { 352 | "png": "https://flagcdn.com/w320/sg.png", 353 | "svg": "https://flagcdn.com/sg.svg", 354 | "alt": "The flag of Singapore is composed of two equal horizontal bands of red and white. On the hoist side of the red band is a fly-side facing white crescent which partially encloses five small five-pointed white stars arranged in the shape of a pentagon." 355 | }, 356 | "cca2": "SG", 357 | "latlng": [ 358 | 1.36666666, 359 | 103.8 360 | ] 361 | }, 362 | { 363 | "flags": { 364 | "png": "https://flagcdn.com/w320/ma.png", 365 | "svg": "https://flagcdn.com/ma.svg", 366 | "alt": "The flag of Morocco features a green pentagram — a five-pointed linear star — centered on a red field." 367 | }, 368 | "cca2": "MA", 369 | "latlng": [ 370 | 32.0, 371 | -5.0 372 | ] 373 | }, 374 | { 375 | "flags": { 376 | "png": "https://flagcdn.com/w320/bl.png", 377 | "svg": "https://flagcdn.com/bl.svg", 378 | "alt": "" 379 | }, 380 | "cca2": "BL", 381 | "latlng": [ 382 | 18.5, 383 | -63.41666666 384 | ] 385 | }, 386 | { 387 | "flags": { 388 | "png": "https://flagcdn.com/w320/iq.png", 389 | "svg": "https://flagcdn.com/iq.svg", 390 | "alt": "The flag of Iraq is composed of three equal horizontal bands of red, white and black. In the central white band are Arabic inscriptions in green." 391 | }, 392 | "cca2": "IQ", 393 | "latlng": [ 394 | 33.0, 395 | 44.0 396 | ] 397 | }, 398 | { 399 | "flags": { 400 | "png": "https://flagcdn.com/w320/bn.png", 401 | "svg": "https://flagcdn.com/bn.svg", 402 | "alt": "The flag of Brunei has a yellow field with two adjoining diagonal bands of white and black that extend from the upper hoist side of the field to the lower fly side. The red emblem of Brunei is centered on the field." 403 | }, 404 | "cca2": "BN", 405 | "latlng": [ 406 | 4.5, 407 | 114.66666666 408 | ] 409 | }, 410 | { 411 | "flags": { 412 | "png": "https://flagcdn.com/w320/im.png", 413 | "svg": "https://flagcdn.com/im.svg", 414 | "alt": "" 415 | }, 416 | "cca2": "IM", 417 | "latlng": [ 418 | 54.25, 419 | -4.5 420 | ] 421 | }, 422 | { 423 | "flags": { 424 | "png": "https://flagcdn.com/w320/kp.png", 425 | "svg": "https://flagcdn.com/kp.svg", 426 | "alt": "The flag of North Korea is composed of three horizontal bands — a large central white-edged red band, and a blue band above and beneath the red band. On the hoist side of the red band is a red five-pointed star within a white circle." 427 | }, 428 | "cca2": "KP", 429 | "latlng": [ 430 | 40.0, 431 | 127.0 432 | ] 433 | }, 434 | { 435 | "flags": { 436 | "png": "https://flagcdn.com/w320/ir.png", 437 | "svg": "https://flagcdn.com/ir.svg", 438 | "alt": "The flag of Iran is composed of three equal horizontal bands of green, white and red. A red emblem of Iran is centered in the white band and Arabic inscriptions in white span the bottom edge of the green band and the top edge of the red band." 439 | }, 440 | "cca2": "IR", 441 | "latlng": [ 442 | 32.0, 443 | 53.0 444 | ] 445 | }, 446 | { 447 | "flags": { 448 | "png": "https://flagcdn.com/w320/cw.png", 449 | "svg": "https://flagcdn.com/cw.svg", 450 | "alt": "" 451 | }, 452 | "cca2": "CW", 453 | "latlng": [ 454 | 12.116667, 455 | -68.933333 456 | ] 457 | }, 458 | { 459 | "flags": { 460 | "png": "https://flagcdn.com/w320/py.png", 461 | "svg": "https://flagcdn.com/py.svg", 462 | "alt": "The flag of Paraguay features three equal horizontal bands of red, white and blue, with an emblem centered in the white band. On the obverse side of the flag depicted, this emblem is the national coat of arms." 463 | }, 464 | "cca2": "PY", 465 | "latlng": [ 466 | -23.0, 467 | -58.0 468 | ] 469 | }, 470 | { 471 | "flags": { 472 | "png": "https://flagcdn.com/w320/al.png", 473 | "svg": "https://flagcdn.com/al.svg", 474 | "alt": "The flag of Albania features a silhouetted double-headed black eagle at the center of a red field." 475 | }, 476 | "cca2": "AL", 477 | "latlng": [ 478 | 41.0, 479 | 20.0 480 | ] 481 | }, 482 | { 483 | "flags": { 484 | "png": "https://flagcdn.com/w320/tj.png", 485 | "svg": "https://flagcdn.com/tj.svg", 486 | "alt": "The flag of Tajikistan is composed of three horizontal bands of red, white and green in the ratio of 2:3:2. A golden-yellow crown surmounted by an arc of seven five-pointed golden-yellow stars is centered in the white band." 487 | }, 488 | "cca2": "TJ", 489 | "latlng": [ 490 | 39.0, 491 | 71.0 492 | ] 493 | }, 494 | { 495 | "flags": { 496 | "png": "https://flagcdn.com/w320/bo.png", 497 | "svg": "https://flagcdn.com/bo.svg", 498 | "alt": "The flag of Bolivia is composed of three equal horizontal bands of red, yellow and green, with the national coat of arms centered in the yellow band." 499 | }, 500 | "cca2": "BO", 501 | "latlng": [ 502 | -17.0, 503 | -65.0 504 | ] 505 | }, 506 | { 507 | "flags": { 508 | "png": "https://flagcdn.com/w320/at.png", 509 | "svg": "https://flagcdn.com/at.svg", 510 | "alt": "The flag of Austria is composed of three equal horizontal bands of red, white and red." 511 | }, 512 | "cca2": "AT", 513 | "latlng": [ 514 | 47.33333333, 515 | 13.33333333 516 | ] 517 | }, 518 | { 519 | "flags": { 520 | "png": "https://flagcdn.com/w320/kn.png", 521 | "svg": "https://flagcdn.com/kn.svg", 522 | "alt": "The flag of Saint Kitts and Nevis features two large five-pointed white stars within a yellow-edged black diagonal band that extends from the lower hoist-side corner to the upper fly-side corner of the field. Above and beneath this band are a green and red triangle respectively." 523 | }, 524 | "cca2": "KN", 525 | "latlng": [ 526 | 17.33333333, 527 | -62.75 528 | ] 529 | }, 530 | { 531 | "flags": { 532 | "png": "https://flagcdn.com/w320/um.png", 533 | "svg": "https://flagcdn.com/um.svg", 534 | "alt": "" 535 | }, 536 | "cca2": "UM", 537 | "latlng": [ 538 | 19.3, 539 | 166.633333 540 | ] 541 | }, 542 | { 543 | "flags": { 544 | "png": "https://flagcdn.com/w320/co.png", 545 | "svg": "https://flagcdn.com/co.svg", 546 | "alt": "The flag of Colombia is composed of three horizontal bands of yellow, blue and red, with the yellow band twice the height of the other two bands." 547 | }, 548 | "cca2": "CO", 549 | "latlng": [ 550 | 4.0, 551 | -72.0 552 | ] 553 | }, 554 | { 555 | "flags": { 556 | "png": "https://flagcdn.com/w320/xk.png", 557 | "svg": "https://flagcdn.com/xk.svg", 558 | "alt": "" 559 | }, 560 | "cca2": "XK", 561 | "latlng": [ 562 | 42.666667, 563 | 21.166667 564 | ] 565 | }, 566 | { 567 | "flags": { 568 | "png": "https://flagcdn.com/w320/bz.png", 569 | "svg": "https://flagcdn.com/bz.svg", 570 | "alt": "The flag of Belize has a royal blue field with a thin red horizontal band at the top and bottom of the field and the national coat of arms in the center." 571 | }, 572 | "cca2": "BZ", 573 | "latlng": [ 574 | 17.25, 575 | -88.75 576 | ] 577 | }, 578 | { 579 | "flags": { 580 | "png": "https://flagcdn.com/w320/gw.png", 581 | "svg": "https://flagcdn.com/gw.svg", 582 | "alt": "The flag of Guinea-Bissau features a red vertical band on its hoist side that takes up about two-fifth the width of the field, and two equal horizontal bands of yellow and green adjoining the vertical band. A five-pointed black star is centered in the vertical band." 583 | }, 584 | "cca2": "GW", 585 | "latlng": [ 586 | 12.0, 587 | -15.0 588 | ] 589 | }, 590 | { 591 | "flags": { 592 | "png": "https://flagcdn.com/w320/mh.png", 593 | "svg": "https://flagcdn.com/mh.svg", 594 | "alt": "The flag of Marshall Islands has a blue field with two broadening adjacent diagonal bands of orange and white that extend from the lower hoist-side corner to the upper fly-side corner of the field. A large white star with twenty-four rays — four large rays at the cardinal points and twenty smaller rays — is situated in the upper hoist-side corner above the diagonal bands." 595 | }, 596 | "cca2": "MH", 597 | "latlng": [ 598 | 9.0, 599 | 168.0 600 | ] 601 | }, 602 | { 603 | "flags": { 604 | "png": "https://flagcdn.com/w320/mm.png", 605 | "svg": "https://flagcdn.com/mm.svg", 606 | "alt": "The flag of Myanmar is composed of three equal horizontal bands of yellow, green and red, with a large five-pointed white star superimposed at the center of the field." 607 | }, 608 | "cca2": "MM", 609 | "latlng": [ 610 | 22.0, 611 | 98.0 612 | ] 613 | }, 614 | { 615 | "flags": { 616 | "png": "https://flagcdn.com/w320/pf.png", 617 | "svg": "https://flagcdn.com/pf.svg", 618 | "alt": "" 619 | }, 620 | "cca2": "PF", 621 | "latlng": [ 622 | 17.6797, 623 | 149.4068 624 | ] 625 | }, 626 | { 627 | "flags": { 628 | "png": "https://flagcdn.com/w320/br.png", 629 | "svg": "https://flagcdn.com/br.svg", 630 | "alt": "The flag of Brazil has a green field with a large yellow rhombus in the center. Within the rhombus is a dark blue globe with twenty-seven small five-pointed white stars depicting a starry sky and a thin white convex horizontal band inscribed with the national motto 'Ordem e Progresso' across its center." 631 | }, 632 | "cca2": "BR", 633 | "latlng": [ 634 | -10.0, 635 | -55.0 636 | ] 637 | }, 638 | { 639 | "flags": { 640 | "png": "https://flagcdn.com/w320/hr.png", 641 | "svg": "https://flagcdn.com/hr.svg", 642 | "alt": "The flag of Croatia is composed of three equal horizontal bands of red, white and blue, with coat of arms of Croatia superimposed in the center." 643 | }, 644 | "cca2": "HR", 645 | "latlng": [ 646 | 45.16666666, 647 | 15.5 648 | ] 649 | }, 650 | { 651 | "flags": { 652 | "png": "https://flagcdn.com/w320/so.png", 653 | "svg": "https://flagcdn.com/so.svg", 654 | "alt": "The flag of Somalia features a large five-pointed white star centered on a light blue field." 655 | }, 656 | "cca2": "SO", 657 | "latlng": [ 658 | 10.0, 659 | 49.0 660 | ] 661 | }, 662 | { 663 | "flags": { 664 | "png": "https://upload.wikimedia.org/wikipedia/commons/thumb/5/5c/Flag_of_the_Taliban.svg/320px-Flag_of_the_Taliban.svg.png", 665 | "svg": "https://upload.wikimedia.org/wikipedia/commons/5/5c/Flag_of_the_Taliban.svg", 666 | "alt": "The flag of the Islamic Emirate of Afghanistan has a white field with Arabic inscriptions — the Shahada — in black across its center." 667 | }, 668 | "cca2": "AF", 669 | "latlng": [ 670 | 33.0, 671 | 65.0 672 | ] 673 | }, 674 | { 675 | "flags": { 676 | "png": "https://flagcdn.com/w320/ai.png", 677 | "svg": "https://flagcdn.com/ai.svg", 678 | "alt": "" 679 | }, 680 | "cca2": "AI", 681 | "latlng": [ 682 | 18.25, 683 | -63.16666666 684 | ] 685 | }, 686 | { 687 | "flags": { 688 | "png": "https://flagcdn.com/w320/ck.png", 689 | "svg": "https://flagcdn.com/ck.svg", 690 | "alt": "" 691 | }, 692 | "cca2": "CK", 693 | "latlng": [ 694 | -21.23333333, 695 | -159.76666666 696 | ] 697 | }, 698 | { 699 | "flags": { 700 | "png": "https://flagcdn.com/w320/eh.png", 701 | "svg": "https://flagcdn.com/eh.svg", 702 | "alt": "" 703 | }, 704 | "cca2": "EH", 705 | "latlng": [ 706 | 24.5, 707 | -13.0 708 | ] 709 | }, 710 | { 711 | "flags": { 712 | "png": "https://flagcdn.com/w320/nz.png", 713 | "svg": "https://flagcdn.com/nz.svg", 714 | "alt": "The flag of New Zealand has a dark blue field with the flag of the United Kingdom — the Union Jack — in the canton and a representation of the Southern Cross constellation, made up of four five-pointed white-edged red stars, on the fly side of the field." 715 | }, 716 | "cca2": "NZ", 717 | "latlng": [ 718 | -41.0, 719 | 174.0 720 | ] 721 | }, 722 | { 723 | "flags": { 724 | "png": "https://flagcdn.com/w320/er.png", 725 | "svg": "https://flagcdn.com/er.svg", 726 | "alt": "The flag of Eritrea comprises three triangles — a large red isosceles triangle with its base spanning the hoist end and its apex at the midpoint on the fly end, and a green and blue right-angled triangle above and beneath the red triangle. On the hoist side of the red triangle is a golden vertical olive branch encircled by a golden olive wreath." 727 | }, 728 | "cca2": "ER", 729 | "latlng": [ 730 | 15.0, 731 | 39.0 732 | ] 733 | }, 734 | { 735 | "flags": { 736 | "png": "https://flagcdn.com/w320/kh.png", 737 | "svg": "https://flagcdn.com/kh.svg", 738 | "alt": "The flag of Cambodia features three horizontal bands of blue, red and blue, with a white depiction of the temple complex, Angkor Wat centered in the red band." 739 | }, 740 | "cca2": "KH", 741 | "latlng": [ 742 | 13.0, 743 | 105.0 744 | ] 745 | }, 746 | { 747 | "flags": { 748 | "png": "https://flagcdn.com/w320/bs.png", 749 | "svg": "https://flagcdn.com/bs.svg", 750 | "alt": "The flag of the Bahamas is composed of three equal horizontal bands of aquamarine, yellow and aquamarine, with a black equilateral triangle superimposed on the hoist side of the field. This triangle has its base on the hoist end and spans about one-third the width of the field." 751 | }, 752 | "cca2": "BS", 753 | "latlng": [ 754 | 25.0343, 755 | -77.3963 756 | ] 757 | }, 758 | { 759 | "flags": { 760 | "png": "https://flagcdn.com/w320/by.png", 761 | "svg": "https://flagcdn.com/by.svg", 762 | "alt": "The flag of Belarus features a vertical band, with a white and red ornamental pattern, spanning about one-fifth the width of the field on the hoist side. Adjoining the vertical band are two horizontal bands of red and green, with the red band twice the height of the green band." 763 | }, 764 | "cca2": "BY", 765 | "latlng": [ 766 | 53.0, 767 | 28.0 768 | ] 769 | }, 770 | { 771 | "flags": { 772 | "png": "https://flagcdn.com/w320/nf.png", 773 | "svg": "https://flagcdn.com/nf.svg", 774 | "alt": "" 775 | }, 776 | "cca2": "NF", 777 | "latlng": [ 778 | -29.03333333, 779 | 167.95 780 | ] 781 | }, 782 | { 783 | "flags": { 784 | "png": "https://flagcdn.com/w320/tv.png", 785 | "svg": "https://flagcdn.com/tv.svg", 786 | "alt": "The flag of Tuvalu has a light blue field with the flag of the United Kingdom — the Union Jack — in the canton. A representation of the country's nine Islands using nine five-pointed yellow stars is situated in the fly half of the field." 787 | }, 788 | "cca2": "TV", 789 | "latlng": [ 790 | -8.0, 791 | 178.0 792 | ] 793 | }, 794 | { 795 | "flags": { 796 | "png": "https://flagcdn.com/w320/gs.png", 797 | "svg": "https://flagcdn.com/gs.svg", 798 | "alt": "" 799 | }, 800 | "cca2": "GS", 801 | "latlng": [ 802 | -54.5, 803 | -37.0 804 | ] 805 | }, 806 | { 807 | "flags": { 808 | "png": "https://flagcdn.com/w320/mr.png", 809 | "svg": "https://flagcdn.com/mr.svg", 810 | "alt": "The flag of Mauritania has a green field with a thin red horizontal band at the top and bottom of the field. At the center of the field is a five-pointed yellow star above an upward facing yellow crescent." 811 | }, 812 | "cca2": "MR", 813 | "latlng": [ 814 | 20.0, 815 | -12.0 816 | ] 817 | }, 818 | { 819 | "flags": { 820 | "png": "https://flagcdn.com/w320/nc.png", 821 | "svg": "https://flagcdn.com/nc.svg", 822 | "alt": "" 823 | }, 824 | "cca2": "NC", 825 | "latlng": [ 826 | -21.5, 827 | 165.5 828 | ] 829 | }, 830 | { 831 | "flags": { 832 | "png": "https://flagcdn.com/w320/bg.png", 833 | "svg": "https://flagcdn.com/bg.svg", 834 | "alt": "The flag of Bulgaria is composed of three equal horizontal bands of white, green and red." 835 | }, 836 | "cca2": "BG", 837 | "latlng": [ 838 | 43.0, 839 | 25.0 840 | ] 841 | }, 842 | { 843 | "flags": { 844 | "png": "https://flagcdn.com/w320/mz.png", 845 | "svg": "https://flagcdn.com/mz.svg", 846 | "alt": "The flag of Mozambique is composed of three equal horizontal bands of teal, black with white top and bottom edges, and yellow. A red isosceles triangle spanning about two-fifth the width of the field is superimposed on the hoist side with its base on the hoist end. This triangle bears a crossed rifle and hoe in black superimposed on an open white book which is superimposed on a five-pointed yellow star." 847 | }, 848 | "cca2": "MZ", 849 | "latlng": [ 850 | -18.25, 851 | 35.0 852 | ] 853 | }, 854 | { 855 | "flags": { 856 | "png": "https://flagcdn.com/w320/nu.png", 857 | "svg": "https://flagcdn.com/nu.svg", 858 | "alt": "" 859 | }, 860 | "cca2": "NU", 861 | "latlng": [ 862 | -19.03333333, 863 | -169.86666666 864 | ] 865 | }, 866 | { 867 | "flags": { 868 | "png": "https://flagcdn.com/w320/ee.png", 869 | "svg": "https://flagcdn.com/ee.svg", 870 | "alt": "The flag of Estonia is composed of three equal horizontal bands of blue, black and white." 871 | }, 872 | "cca2": "EE", 873 | "latlng": [ 874 | 59.0, 875 | 26.0 876 | ] 877 | }, 878 | { 879 | "flags": { 880 | "png": "https://flagcdn.com/w320/it.png", 881 | "svg": "https://flagcdn.com/it.svg", 882 | "alt": "The flag of Italy is composed of three equal vertical bands of green, white and red." 883 | }, 884 | "cca2": "IT", 885 | "latlng": [ 886 | 42.83333333, 887 | 12.83333333 888 | ] 889 | }, 890 | { 891 | "flags": { 892 | "png": "https://flagcdn.com/w320/mt.png", 893 | "svg": "https://flagcdn.com/mt.svg", 894 | "alt": "The flag of Malta is composed of two equal vertical bands of white and red. A representation of the George cross edged in red is situated on the upper hoist-side corner of the white band." 895 | }, 896 | "cca2": "MT", 897 | "latlng": [ 898 | 35.9375, 899 | 14.3754 900 | ] 901 | }, 902 | { 903 | "flags": { 904 | "png": "https://flagcdn.com/w320/si.png", 905 | "svg": "https://flagcdn.com/si.svg", 906 | "alt": "The flag of Slovenia is composed of three equal horizontal bands of white, blue and red. The national coat of arms is situated in the upper hoist side of the field centered on the boundary between the white and blue bands." 907 | }, 908 | "cca2": "SI", 909 | "latlng": [ 910 | 46.11666666, 911 | 14.81666666 912 | ] 913 | }, 914 | { 915 | "flags": { 916 | "png": "https://flagcdn.com/w320/in.png", 917 | "svg": "https://flagcdn.com/in.svg", 918 | "alt": "The flag of India is composed of three equal horizontal bands of saffron, white and green. A navy blue wheel with twenty-four spokes — the Ashoka Chakra — is centered in the white band." 919 | }, 920 | "cca2": "IN", 921 | "latlng": [ 922 | 20.0, 923 | 77.0 924 | ] 925 | }, 926 | { 927 | "flags": { 928 | "png": "https://flagcdn.com/w320/pe.png", 929 | "svg": "https://flagcdn.com/pe.svg", 930 | "alt": "The flag of Peru is composed of three equal vertical bands of red, white and red, with the national emblem centered in the white band." 931 | }, 932 | "cca2": "PE", 933 | "latlng": [ 934 | -10.0, 935 | -76.0 936 | ] 937 | }, 938 | { 939 | "flags": { 940 | "png": "https://flagcdn.com/w320/bi.png", 941 | "svg": "https://flagcdn.com/bi.svg", 942 | "alt": "The flag of Burundi is divided by a white diagonal cross into four alternating triangular areas of red at the top and bottom, and green on the hoist and fly sides. A white circle, with three green-edged red six-pointed stars arranged to form a triangle, is superimposed at the center of the cross." 943 | }, 944 | "cca2": "BI", 945 | "latlng": [ 946 | -3.5, 947 | 30.0 948 | ] 949 | }, 950 | { 951 | "flags": { 952 | "png": "https://flagcdn.com/w320/lt.png", 953 | "svg": "https://flagcdn.com/lt.svg", 954 | "alt": "The flag of Lithuania is composed of three equal horizontal bands of yellow, green and red." 955 | }, 956 | "cca2": "LT", 957 | "latlng": [ 958 | 56.0, 959 | 24.0 960 | ] 961 | }, 962 | { 963 | "flags": { 964 | "png": "https://flagcdn.com/w320/us.png", 965 | "svg": "https://flagcdn.com/us.svg", 966 | "alt": "The flag of the United States of America is composed of thirteen equal horizontal bands of red alternating with white. A blue rectangle, bearing fifty small five-pointed white stars arranged in nine rows where rows of six stars alternate with rows of five stars, is superimposed in the canton." 967 | }, 968 | "cca2": "US", 969 | "latlng": [ 970 | 38.0, 971 | -97.0 972 | ] 973 | }, 974 | { 975 | "flags": { 976 | "png": "https://flagcdn.com/w320/hn.png", 977 | "svg": "https://flagcdn.com/hn.svg", 978 | "alt": "The flag of Honduras is composed of three equal horizontal bands of turquoise, white and turquoise, with five small five-pointed turquoise stars arranged in a quincuncial pattern at the center of the white band." 979 | }, 980 | "cca2": "HN", 981 | "latlng": [ 982 | 15.0, 983 | -86.5 984 | ] 985 | }, 986 | { 987 | "flags": { 988 | "png": "https://flagcdn.com/w320/to.png", 989 | "svg": "https://flagcdn.com/to.svg", 990 | "alt": "The flag of Tonga has a red field. A white rectangle bearing a red Greek cross is superimposed in the canton." 991 | }, 992 | "cca2": "TO", 993 | "latlng": [ 994 | -20.0, 995 | -175.0 996 | ] 997 | }, 998 | { 999 | "flags": { 1000 | "png": "https://flagcdn.com/w320/sa.png", 1001 | "svg": "https://flagcdn.com/sa.svg", 1002 | "alt": "The flag of Saudi Arabia has a green field, at the center of which is an Arabic inscription — the Shahada — in white above a white horizontal sabre with its tip pointed to the hoist side of the field." 1003 | }, 1004 | "cca2": "SA", 1005 | "latlng": [ 1006 | 25.0, 1007 | 45.0 1008 | ] 1009 | }, 1010 | { 1011 | "flags": { 1012 | "png": "https://flagcdn.com/w320/sr.png", 1013 | "svg": "https://flagcdn.com/sr.svg", 1014 | "alt": "The flag of Suriname is composed of five horizontal bands of green, white, red, white and green in the ratio of 2:1:4:1:2. A large five-pointed yellow star is centered in the red band." 1015 | }, 1016 | "cca2": "SR", 1017 | "latlng": [ 1018 | 4.0, 1019 | -56.0 1020 | ] 1021 | }, 1022 | { 1023 | "flags": { 1024 | "png": "https://flagcdn.com/w320/qa.png", 1025 | "svg": "https://flagcdn.com/qa.svg", 1026 | "alt": "The flag of Qatar has a maroon field, on the hoist side of which is a white vertical band that spans about one-third the width of the field and is separated from the rest of the field by nine adjoining fly-side pointing white isosceles triangles that serve as a serrated line." 1027 | }, 1028 | "cca2": "QA", 1029 | "latlng": [ 1030 | 25.5, 1031 | 51.25 1032 | ] 1033 | }, 1034 | { 1035 | "flags": { 1036 | "png": "https://flagcdn.com/w320/sh.png", 1037 | "svg": "https://flagcdn.com/sh.svg", 1038 | "alt": "" 1039 | }, 1040 | "cca2": "SH", 1041 | "latlng": [ 1042 | -15.95, 1043 | -5.72 1044 | ] 1045 | }, 1046 | { 1047 | "flags": { 1048 | "png": "https://flagcdn.com/w320/gi.png", 1049 | "svg": "https://flagcdn.com/gi.svg", 1050 | "alt": "" 1051 | }, 1052 | "cca2": "GI", 1053 | "latlng": [ 1054 | 36.13333333, 1055 | -5.35 1056 | ] 1057 | }, 1058 | { 1059 | "flags": { 1060 | "png": "https://flagcdn.com/w320/mp.png", 1061 | "svg": "https://flagcdn.com/mp.svg", 1062 | "alt": "" 1063 | }, 1064 | "cca2": "MP", 1065 | "latlng": [ 1066 | 15.2, 1067 | 145.75 1068 | ] 1069 | }, 1070 | { 1071 | "flags": { 1072 | "png": "https://flagcdn.com/w320/mu.png", 1073 | "svg": "https://flagcdn.com/mu.svg", 1074 | "alt": "The flag of Mauritius is composed of four equal horizontal bands of red, blue, yellow and green." 1075 | }, 1076 | "cca2": "MU", 1077 | "latlng": [ 1078 | -20.28333333, 1079 | 57.55 1080 | ] 1081 | }, 1082 | { 1083 | "flags": { 1084 | "png": "https://flagcdn.com/w320/bb.png", 1085 | "svg": "https://flagcdn.com/bb.svg", 1086 | "alt": "The flag of Barbados is composed of three equal vertical bands of ultramarine, gold and ultramarine. The head of a black trident is centered in the gold band." 1087 | }, 1088 | "cca2": "BB", 1089 | "latlng": [ 1090 | 13.16666666, 1091 | -59.53333333 1092 | ] 1093 | }, 1094 | { 1095 | "flags": { 1096 | "png": "https://flagcdn.com/w320/re.png", 1097 | "svg": "https://flagcdn.com/re.svg", 1098 | "alt": "" 1099 | }, 1100 | "cca2": "RE", 1101 | "latlng": [ 1102 | -21.15, 1103 | 55.5 1104 | ] 1105 | }, 1106 | { 1107 | "flags": { 1108 | "png": "https://flagcdn.com/w320/io.png", 1109 | "svg": "https://flagcdn.com/io.svg", 1110 | "alt": "" 1111 | }, 1112 | "cca2": "IO", 1113 | "latlng": [ 1114 | -6.0, 1115 | 71.5 1116 | ] 1117 | }, 1118 | { 1119 | "flags": { 1120 | "png": "https://flagcdn.com/w320/sy.png", 1121 | "svg": "https://flagcdn.com/sy.svg", 1122 | "alt": "The flag of Syria is composed of three equal horizontal bands of red, white and black. At the center of the white band are two small five-pointed green stars arranged in a horizontal line." 1123 | }, 1124 | "cca2": "SY", 1125 | "latlng": [ 1126 | 35.0, 1127 | 38.0 1128 | ] 1129 | }, 1130 | { 1131 | "flags": { 1132 | "png": "https://flagcdn.com/w320/eg.png", 1133 | "svg": "https://flagcdn.com/eg.svg", 1134 | "alt": "The flag of Egypt is composed of three equal horizontal bands of red, white and black, with Egypt's national emblem — a hoist-side facing gold eagle of Saladin — centered in the white band." 1135 | }, 1136 | "cca2": "EG", 1137 | "latlng": [ 1138 | 27.0, 1139 | 30.0 1140 | ] 1141 | }, 1142 | { 1143 | "flags": { 1144 | "png": "https://flagcdn.com/w320/st.png", 1145 | "svg": "https://flagcdn.com/st.svg", 1146 | "alt": "The flag of South Sudan is composed of three equal horizontal bands of black, red with white top and bottom edges, and green. A blue equilateral triangle which spans about two-fifth the width of the field is superimposed on the hoist side with its base on the hoist end of the field. At the center of this triangle is a five-pointed yellow star." 1147 | }, 1148 | "cca2": "ST", 1149 | "latlng": [ 1150 | 1.0, 1151 | 7.0 1152 | ] 1153 | }, 1154 | { 1155 | "flags": { 1156 | "png": "https://flagcdn.com/w320/ki.png", 1157 | "svg": "https://flagcdn.com/ki.svg", 1158 | "alt": "The flag of Kiribati is divided into two halves. While the upper half has a red field, at the center of which is a yellow frigate bird flying over the top half of a rising yellow sun with seventeen visible rays, the lower half is composed of six horizontal wavy bands of white alternating with blue to depict the ocean." 1159 | }, 1160 | "cca2": "KI", 1161 | "latlng": [ 1162 | 1.41666666, 1163 | 173.0 1164 | ] 1165 | }, 1166 | { 1167 | "flags": { 1168 | "png": "https://flagcdn.com/w320/tl.png", 1169 | "svg": "https://flagcdn.com/tl.svg", 1170 | "alt": "The flag of Timor-Leste has a red field with two isosceles triangles which share a common base on the hoist end. The smaller black triangle, which bears a five-pointed white star at its center and spans one-third the width of the field, is superimposed on the larger yellow triangle that extends to the center of the field." 1171 | }, 1172 | "cca2": "TL", 1173 | "latlng": [ 1174 | -8.83333333, 1175 | 125.91666666 1176 | ] 1177 | }, 1178 | { 1179 | "flags": { 1180 | "png": "https://flagcdn.com/w320/ls.png", 1181 | "svg": "https://flagcdn.com/ls.svg", 1182 | "alt": "The flag of Lesotho is composed of three horizontal bands of blue, white and green in the ratio of 3:4:3. A black mokorotlo — a Basotho hat — is centered in the white band." 1183 | }, 1184 | "cca2": "LS", 1185 | "latlng": [ 1186 | -29.5, 1187 | 28.5 1188 | ] 1189 | }, 1190 | { 1191 | "flags": { 1192 | "png": "https://flagcdn.com/w320/sb.png", 1193 | "svg": "https://flagcdn.com/sb.svg", 1194 | "alt": "The flag of Solomon Islands features a thin yellow diagonal band that extends from the lower hoist-side corner to the upper fly-side corner of the field. Above and beneath this band are a blue and green triangle respectively. Five white five-pointed stars arranged in an X shape are situated on the hoist side of the upper blue triangle." 1195 | }, 1196 | "cca2": "SB", 1197 | "latlng": [ 1198 | -8.0, 1199 | 159.0 1200 | ] 1201 | }, 1202 | { 1203 | "flags": { 1204 | "png": "https://flagcdn.com/w320/ly.png", 1205 | "svg": "https://flagcdn.com/ly.svg", 1206 | "alt": "The flag of Libya is composed of three horizontal bands of red, black and green, with the black band twice the height of the other two bands. At the center of the black band is a fly-side facing white crescent and a five-pointed white star placed just outside the crescent opening." 1207 | }, 1208 | "cca2": "LY", 1209 | "latlng": [ 1210 | 25.0, 1211 | 17.0 1212 | ] 1213 | }, 1214 | { 1215 | "flags": { 1216 | "png": "https://flagcdn.com/w320/kr.png", 1217 | "svg": "https://flagcdn.com/kr.svg", 1218 | "alt": "The flag of South Korea has a white field, at the center of which is a red and blue Taegeuk circle surrounded by four black trigrams, one in each corner." 1219 | }, 1220 | "cca2": "KR", 1221 | "latlng": [ 1222 | 37.0, 1223 | 127.5 1224 | ] 1225 | }, 1226 | { 1227 | "flags": { 1228 | "png": "https://flagcdn.com/w320/li.png", 1229 | "svg": "https://flagcdn.com/li.svg", 1230 | "alt": "The flag of Liechtenstein is composed of two equal horizontal bands of blue and red, with a golden-yellow crown on the hoist side of the blue band." 1231 | }, 1232 | "cca2": "LI", 1233 | "latlng": [ 1234 | 47.26666666, 1235 | 9.53333333 1236 | ] 1237 | }, 1238 | { 1239 | "flags": { 1240 | "png": "https://flagcdn.com/w320/ni.png", 1241 | "svg": "https://flagcdn.com/ni.svg", 1242 | "alt": "The flag of Nicaragua is composed of three equal horizontal bands of blue, white and blue, with the national coat of arms centered in the white band." 1243 | }, 1244 | "cca2": "NI", 1245 | "latlng": [ 1246 | 13.0, 1247 | -85.0 1248 | ] 1249 | }, 1250 | { 1251 | "flags": { 1252 | "png": "https://flagcdn.com/w320/ec.png", 1253 | "svg": "https://flagcdn.com/ec.svg", 1254 | "alt": "The flag of Ecuador is composed of the horizontal bands of yellow, blue and red, with the yellow band twice the height of the other two bands. The Ecuadorian coat of arms is superimposed in the center of the field." 1255 | }, 1256 | "cca2": "EC", 1257 | "latlng": [ 1258 | -2.0, 1259 | -77.5 1260 | ] 1261 | }, 1262 | { 1263 | "flags": { 1264 | "png": "https://flagcdn.com/w320/mv.png", 1265 | "svg": "https://flagcdn.com/mv.svg", 1266 | "alt": "The flag of Maldives has a red field, at the center of which is a large green rectangle bearing a fly-side facing white crescent." 1267 | }, 1268 | "cca2": "MV", 1269 | "latlng": [ 1270 | 3.25, 1271 | 73.0 1272 | ] 1273 | }, 1274 | { 1275 | "flags": { 1276 | "png": "https://flagcdn.com/w320/dz.png", 1277 | "svg": "https://flagcdn.com/dz.svg", 1278 | "alt": "The flag of Algeria features two equal vertical bands of green and white. A five-pointed red star within a fly-side facing red crescent is centered over the two-color boundary." 1279 | }, 1280 | "cca2": "DZ", 1281 | "latlng": [ 1282 | 28.0, 1283 | 3.0 1284 | ] 1285 | }, 1286 | { 1287 | "flags": { 1288 | "png": "https://flagcdn.com/w320/kg.png", 1289 | "svg": "https://flagcdn.com/kg.svg", 1290 | "alt": "The flag of Kyrgyzstan features a yellow sun with forty rays at the center of a red field. At the center of the sun is a stylized depiction of a tunduk." 1291 | }, 1292 | "cca2": "KG", 1293 | "latlng": [ 1294 | 41.0, 1295 | 75.0 1296 | ] 1297 | }, 1298 | { 1299 | "flags": { 1300 | "png": "https://flagcdn.com/w320/fi.png", 1301 | "svg": "https://flagcdn.com/fi.svg", 1302 | "alt": "The flag of Finland has a white field with a large blue cross that extend to the edges of the field. The vertical part of this cross is offset towards the hoist side." 1303 | }, 1304 | "cca2": "FI", 1305 | "latlng": [ 1306 | 64.0, 1307 | 26.0 1308 | ] 1309 | }, 1310 | { 1311 | "flags": { 1312 | "png": "https://flagcdn.com/w320/aq.png", 1313 | "svg": "https://flagcdn.com/aq.svg", 1314 | "alt": "" 1315 | }, 1316 | "cca2": "AQ", 1317 | "latlng": [ 1318 | -90.0, 1319 | 0.0 1320 | ] 1321 | }, 1322 | { 1323 | "flags": { 1324 | "png": "https://flagcdn.com/w320/ke.png", 1325 | "svg": "https://flagcdn.com/ke.svg", 1326 | "alt": "The flag of Kenya is composed of three equal horizontal bands of black, red with white top and bottom edges, and green. An emblem comprising a red, black and white Maasai shield covering two crossed white spears is superimposed at the center of the field." 1327 | }, 1328 | "cca2": "KE", 1329 | "latlng": [ 1330 | 1.0, 1331 | 38.0 1332 | ] 1333 | }, 1334 | { 1335 | "flags": { 1336 | "png": "https://flagcdn.com/w320/cu.png", 1337 | "svg": "https://flagcdn.com/cu.svg", 1338 | "alt": "The flag of Cuba is composed of five equal horizontal bands of blue alternating with white and a red equilateral triangle superimposed on the hoist side of the field. The triangle has its base on the hoist end, spans about two-fifth the width of the field and bears a white five-pointed star at its center." 1339 | }, 1340 | "cca2": "CU", 1341 | "latlng": [ 1342 | 21.5, 1343 | -80.0 1344 | ] 1345 | }, 1346 | { 1347 | "flags": { 1348 | "png": "https://flagcdn.com/w320/ms.png", 1349 | "svg": "https://flagcdn.com/ms.svg", 1350 | "alt": "" 1351 | }, 1352 | "cca2": "MS", 1353 | "latlng": [ 1354 | 16.75, 1355 | -62.2 1356 | ] 1357 | }, 1358 | { 1359 | "flags": { 1360 | "png": "https://flagcdn.com/w320/pl.png", 1361 | "svg": "https://flagcdn.com/pl.svg", 1362 | "alt": "The flag of Poland is composed of two equal horizontal bands of white and red." 1363 | }, 1364 | "cca2": "PL", 1365 | "latlng": [ 1366 | 52.0, 1367 | 20.0 1368 | ] 1369 | }, 1370 | { 1371 | "flags": { 1372 | "png": "https://flagcdn.com/w320/ax.png", 1373 | "svg": "https://flagcdn.com/ax.svg", 1374 | "alt": "" 1375 | }, 1376 | "cca2": "AX", 1377 | "latlng": [ 1378 | 60.116667, 1379 | 19.9 1380 | ] 1381 | }, 1382 | { 1383 | "flags": { 1384 | "png": "https://flagcdn.com/w320/et.png", 1385 | "svg": "https://flagcdn.com/et.svg", 1386 | "alt": "The flag of Ethiopia is composed of three equal horizontal bands of green, yellow and red, with the national emblem superimposed at the center of the field. The national emblem comprises a light blue circle bearing a golden-yellow pentagram with single yellow rays emanating from the angles between the points of the pentagram." 1387 | }, 1388 | "cca2": "ET", 1389 | "latlng": [ 1390 | 8.0, 1391 | 38.0 1392 | ] 1393 | }, 1394 | { 1395 | "flags": { 1396 | "png": "https://flagcdn.com/w320/tg.png", 1397 | "svg": "https://flagcdn.com/tg.svg", 1398 | "alt": "The flag of Togo is composed of five equal horizontal bands of green alternating with yellow. A red square bearing a five-pointed white star is superimposed in the canton." 1399 | }, 1400 | "cca2": "TG", 1401 | "latlng": [ 1402 | 8.0, 1403 | 1.16666666 1404 | ] 1405 | }, 1406 | { 1407 | "flags": { 1408 | "png": "https://flagcdn.com/w320/ba.png", 1409 | "svg": "https://flagcdn.com/ba.svg", 1410 | "alt": "The flag of Bosnia and Herzegovina has a blue field, at the center of which is a large yellow hoist-side facing right-angled triangle that is based on the top edge and spans the height of the field. Adjacent to the hypotenuse of this triangle are nine adjoining five-pointed white stars with the top and bottom stars cut in half by the edges of the field." 1411 | }, 1412 | "cca2": "BA", 1413 | "latlng": [ 1414 | 44.0, 1415 | 18.0 1416 | ] 1417 | }, 1418 | { 1419 | "flags": { 1420 | "png": "https://flagcdn.com/w320/uy.png", 1421 | "svg": "https://flagcdn.com/uy.svg", 1422 | "alt": "The flag of Uruguay is composed of nine equal horizontal bands of white alternating with blue, with a white square superimposed in the canton. In the white square is a yellow sun bearing a human face — the Sun of May — from which sixteen rays extend. The sun's rays alternate between triangular and wavy." 1423 | }, 1424 | "cca2": "UY", 1425 | "latlng": [ 1426 | -33.0, 1427 | -56.0 1428 | ] 1429 | }, 1430 | { 1431 | "flags": { 1432 | "png": "https://flagcdn.com/w320/gu.png", 1433 | "svg": "https://flagcdn.com/gu.svg", 1434 | "alt": "" 1435 | }, 1436 | "cca2": "GU", 1437 | "latlng": [ 1438 | 13.46666666, 1439 | 144.78333333 1440 | ] 1441 | }, 1442 | { 1443 | "flags": { 1444 | "png": "https://flagcdn.com/w320/cv.png", 1445 | "svg": "https://flagcdn.com/cv.svg", 1446 | "alt": "The flag of Cape Verde is composed of five horizontal bands of blue, white, red, white and blue in the ratio of 6:1:1:1:3. A ring of ten five-pointed yellow stars is centered at three-eighth of the height from the bottom edge and three-eighth of the width from the hoist end of the field." 1447 | }, 1448 | "cca2": "CV", 1449 | "latlng": [ 1450 | 16.5388, 1451 | 23.0418 1452 | ] 1453 | }, 1454 | { 1455 | "flags": { 1456 | "png": "https://flagcdn.com/w320/td.png", 1457 | "svg": "https://flagcdn.com/td.svg", 1458 | "alt": "The flag of Chad is composed of three equal vertical bands of blue, gold and red." 1459 | }, 1460 | "cca2": "TD", 1461 | "latlng": [ 1462 | 15.0, 1463 | 19.0 1464 | ] 1465 | }, 1466 | { 1467 | "flags": { 1468 | "png": "https://flagcdn.com/w320/va.png", 1469 | "svg": "https://flagcdn.com/va.svg", 1470 | "alt": "The flag of Vatican City is square shaped. It is composed of two equal vertical bands of yellow and white, with national coat of arms centered in the white band. The national coat of arms comprises the Papal Tiara superimposed on two crossed keys." 1471 | }, 1472 | "cca2": "VA", 1473 | "latlng": [ 1474 | 41.9, 1475 | 12.45 1476 | ] 1477 | }, 1478 | { 1479 | "flags": { 1480 | "png": "https://flagcdn.com/w320/pw.png", 1481 | "svg": "https://flagcdn.com/pw.svg", 1482 | "alt": "The flag of Palau has a light blue field with a large golden-yellow circle that is offset slightly towards the hoist side of center." 1483 | }, 1484 | "cca2": "PW", 1485 | "latlng": [ 1486 | 7.5, 1487 | 134.5 1488 | ] 1489 | }, 1490 | { 1491 | "flags": { 1492 | "png": "https://flagcdn.com/w320/ht.png", 1493 | "svg": "https://flagcdn.com/ht.svg", 1494 | "alt": "The flag of Haiti is composed of two equal horizontal bands of blue and red. A white square bearing the national coat of arms is superimposed at the center of the field." 1495 | }, 1496 | "cca2": "HT", 1497 | "latlng": [ 1498 | 19.0, 1499 | -72.41666666 1500 | ] 1501 | }, 1502 | { 1503 | "flags": { 1504 | "png": "https://flagcdn.com/w320/ye.png", 1505 | "svg": "https://flagcdn.com/ye.svg", 1506 | "alt": "The flag of Yemen is composed of three equal horizontal bands of red, white and black." 1507 | }, 1508 | "cca2": "YE", 1509 | "latlng": [ 1510 | 15.0, 1511 | 48.0 1512 | ] 1513 | }, 1514 | { 1515 | "flags": { 1516 | "png": "https://flagcdn.com/w320/sz.png", 1517 | "svg": "https://flagcdn.com/sz.svg", 1518 | "alt": "The flag of Eswatini is composed of three horizontal bands — a large central yellow-edged red band, and a light blue band above and beneath the red band. The red band is three times the height of the blue bands and bears a centered emblem made up of a large black and white Nguni shield covering two spears and a staff decorated with feather tassels, all placed horizontally." 1519 | }, 1520 | "cca2": "SZ", 1521 | "latlng": [ 1522 | -26.5, 1523 | 31.5 1524 | ] 1525 | }, 1526 | { 1527 | "flags": { 1528 | "png": "https://flagcdn.com/w320/zw.png", 1529 | "svg": "https://flagcdn.com/zw.svg", 1530 | "alt": "The flag of Zimbabwe is composed of seven equal horizontal bands of green, yellow, red, black, red, yellow and green, with a white isosceles triangle superimposed on the hoist side of the field. This triangle is edged in black, spans about one-fourth the width of the field and has its base on the hoist end. A yellow Zimbabwe bird superimposed on a five-pointed red star is centered in the triangle." 1531 | }, 1532 | "cca2": "ZW", 1533 | "latlng": [ 1534 | -20.0, 1535 | 30.0 1536 | ] 1537 | }, 1538 | { 1539 | "flags": { 1540 | "png": "https://flagcdn.com/w320/gr.png", 1541 | "svg": "https://flagcdn.com/gr.svg", 1542 | "alt": "The flag of Greece is composed of nine equal horizontal bands of blue alternating with white. A blue square bearing a white cross is superimposed in the canton." 1543 | }, 1544 | "cca2": "GR", 1545 | "latlng": [ 1546 | 39.0, 1547 | 22.0 1548 | ] 1549 | }, 1550 | { 1551 | "flags": { 1552 | "png": "https://flagcdn.com/w320/il.png", 1553 | "svg": "https://flagcdn.com/il.svg", 1554 | "alt": "The flag of Israel has a white field with a blue hexagram — the Magen David — centered between two equal horizontal blue bands situated near the top and bottom edges of the field." 1555 | }, 1556 | "cca2": "IL", 1557 | "latlng": [ 1558 | 31.47, 1559 | 35.13 1560 | ] 1561 | }, 1562 | { 1563 | "flags": { 1564 | "png": "https://flagcdn.com/w320/mf.png", 1565 | "svg": "https://flagcdn.com/mf.svg", 1566 | "alt": "" 1567 | }, 1568 | "cca2": "MF", 1569 | "latlng": [ 1570 | 18.0708, 1571 | 63.0501 1572 | ] 1573 | }, 1574 | { 1575 | "flags": { 1576 | "png": "https://flagcdn.com/w320/ag.png", 1577 | "svg": "https://flagcdn.com/ag.svg", 1578 | "alt": "The flag of Antigua and Barbuda has a red field with an inverted isosceles triangle based on the top edge and spanning the height of the field. This triangle has three horizontal bands of black, light blue and white, with the light blue band half the height of the two other bands. The top half of a golden-yellow sun is situated in the lower two-third of the black band to depict a rising sun." 1579 | }, 1580 | "cca2": "AG", 1581 | "latlng": [ 1582 | 17.05, 1583 | -61.8 1584 | ] 1585 | }, 1586 | { 1587 | "flags": { 1588 | "png": "https://flagcdn.com/w320/cy.png", 1589 | "svg": "https://flagcdn.com/cy.svg", 1590 | "alt": "The flag of Cyprus has a white field, at the center of which is a copper-colored silhouette of the Island of Cyprus above two green olive branches crossed at the stem." 1591 | }, 1592 | "cca2": "CY", 1593 | "latlng": [ 1594 | 35.0, 1595 | 33.0 1596 | ] 1597 | }, 1598 | { 1599 | "flags": { 1600 | "png": "https://flagcdn.com/w320/sx.png", 1601 | "svg": "https://flagcdn.com/sx.svg", 1602 | "alt": "" 1603 | }, 1604 | "cca2": "SX", 1605 | "latlng": [ 1606 | 18.033333, 1607 | -63.05 1608 | ] 1609 | }, 1610 | { 1611 | "flags": { 1612 | "png": "https://flagcdn.com/w320/mc.png", 1613 | "svg": "https://flagcdn.com/mc.svg", 1614 | "alt": "The flag of Monaco is composed of two equal horizontal bands of red and white." 1615 | }, 1616 | "cca2": "MC", 1617 | "latlng": [ 1618 | 43.73333333, 1619 | 7.4 1620 | ] 1621 | }, 1622 | { 1623 | "flags": { 1624 | "png": "https://flagcdn.com/w320/fj.png", 1625 | "svg": "https://flagcdn.com/fj.svg", 1626 | "alt": "The flag of Fiji has a light blue field. It features the flag of the United Kingdom — the Union Jack — in the canton and the shield of the national coat of arms centered in the fly half." 1627 | }, 1628 | "cca2": "FJ", 1629 | "latlng": [ 1630 | 17.7134, 1631 | 178.065 1632 | ] 1633 | }, 1634 | { 1635 | "flags": { 1636 | "png": "https://flagcdn.com/w320/ua.png", 1637 | "svg": "https://flagcdn.com/ua.svg", 1638 | "alt": "The flag of Ukraine is composed of two equal horizontal bands of blue and yellow." 1639 | }, 1640 | "cca2": "UA", 1641 | "latlng": [ 1642 | 49.0, 1643 | 32.0 1644 | ] 1645 | }, 1646 | { 1647 | "flags": { 1648 | "png": "https://flagcdn.com/w320/mq.png", 1649 | "svg": "https://flagcdn.com/mq.svg", 1650 | "alt": "" 1651 | }, 1652 | "cca2": "MQ", 1653 | "latlng": [ 1654 | 14.666667, 1655 | -61.0 1656 | ] 1657 | }, 1658 | { 1659 | "flags": { 1660 | "png": "https://flagcdn.com/w320/hk.png", 1661 | "svg": "https://flagcdn.com/hk.svg", 1662 | "alt": "" 1663 | }, 1664 | "cca2": "HK", 1665 | "latlng": [ 1666 | 22.267, 1667 | 114.188 1668 | ] 1669 | }, 1670 | { 1671 | "flags": { 1672 | "png": "https://flagcdn.com/w320/pt.png", 1673 | "svg": "https://flagcdn.com/pt.svg", 1674 | "alt": "The flag of Portugal is composed of two vertical bands of green and red in the ratio of 2:3, with the coat of arms of Portugal centered over the two-color boundary." 1675 | }, 1676 | "cca2": "PT", 1677 | "latlng": [ 1678 | 39.5, 1679 | -8.0 1680 | ] 1681 | }, 1682 | { 1683 | "flags": { 1684 | "png": "https://flagcdn.com/w320/bt.png", 1685 | "svg": "https://flagcdn.com/bt.svg", 1686 | "alt": "The flag of Bhutan is divided diagonally, from the lower hoist-side corner to the upper fly-side corner, into an upper yellow and a lower orange triangle. A fly-side facing white dragon holding four jewels in its claws is situated along the boundary of the two triangles." 1687 | }, 1688 | "cca2": "BT", 1689 | "latlng": [ 1690 | 27.5, 1691 | 90.5 1692 | ] 1693 | }, 1694 | { 1695 | "flags": { 1696 | "png": "https://flagcdn.com/w320/np.png", 1697 | "svg": "https://flagcdn.com/np.svg", 1698 | "alt": "The flag of Nepal is the world's only non-quadrilateral flag of a sovereign country. It takes the shape of two adjoining right-angled triangles and has a crimson red field with deep blue edges. Within the smaller upper triangle is an emblem of the upper half of a white sun resting on an upward facing white crescent. The lower triangle bears a white sun with twelve rays." 1699 | }, 1700 | "cca2": "NP", 1701 | "latlng": [ 1702 | 28.0, 1703 | 84.0 1704 | ] 1705 | }, 1706 | { 1707 | "flags": { 1708 | "png": "https://flagcdn.com/w320/fr.png", 1709 | "svg": "https://flagcdn.com/fr.svg", 1710 | "alt": "The flag of France is composed of three equal vertical bands of blue, white and red." 1711 | }, 1712 | "cca2": "FR", 1713 | "latlng": [ 1714 | 46.0, 1715 | 2.0 1716 | ] 1717 | }, 1718 | { 1719 | "flags": { 1720 | "png": "https://flagcdn.com/w320/ie.png", 1721 | "svg": "https://flagcdn.com/ie.svg", 1722 | "alt": "The flag of Ireland is composed of three equal vertical bands of green, white and orange." 1723 | }, 1724 | "cca2": "IE", 1725 | "latlng": [ 1726 | 53.0, 1727 | -8.0 1728 | ] 1729 | }, 1730 | { 1731 | "flags": { 1732 | "png": "https://flagcdn.com/w320/ae.png", 1733 | "svg": "https://flagcdn.com/ae.svg", 1734 | "alt": "The flag of United Arab Emirates features a red vertical band on its hoist side that takes up about one-fourth the width of the field and three equal horizontal bands of green, white and black adjoining the vertical band." 1735 | }, 1736 | "cca2": "AE", 1737 | "latlng": [ 1738 | 24.0, 1739 | 54.0 1740 | ] 1741 | }, 1742 | { 1743 | "flags": { 1744 | "png": "https://flagcdn.com/w320/gg.png", 1745 | "svg": "https://flagcdn.com/gg.svg", 1746 | "alt": "" 1747 | }, 1748 | "cca2": "GG", 1749 | "latlng": [ 1750 | 49.46666666, 1751 | -2.58333333 1752 | ] 1753 | }, 1754 | { 1755 | "flags": { 1756 | "png": "https://flagcdn.com/w320/lc.png", 1757 | "svg": "https://flagcdn.com/lc.svg", 1758 | "alt": "The flag of Saint Lucia has a light blue field, at the center of which are two triangles which share a common base — a small golden-yellow isosceles triangle superimposed on a large white-edged black isosceles triangle." 1759 | }, 1760 | "cca2": "LC", 1761 | "latlng": [ 1762 | 13.88333333, 1763 | -60.96666666 1764 | ] 1765 | }, 1766 | { 1767 | "flags": { 1768 | "png": "https://flagcdn.com/w320/do.png", 1769 | "svg": "https://flagcdn.com/do.svg", 1770 | "alt": "The flag of the Dominican Republic is divided into four rectangles by a centered white cross that extends to the edges of the field and bears the national coat of arms in its center. The upper hoist-side and lower fly-side rectangles are blue and the lower hoist-side and upper fly-side rectangles are red." 1771 | }, 1772 | "cca2": "DO", 1773 | "latlng": [ 1774 | 19.0, 1775 | -70.66666666 1776 | ] 1777 | }, 1778 | { 1779 | "flags": { 1780 | "png": "https://flagcdn.com/w320/rs.png", 1781 | "svg": "https://flagcdn.com/rs.svg", 1782 | "alt": "The flag of Serbia is composed of three equal horizontal bands of red, blue and white. The coat of arms of Serbia is superimposed at the center of the field slightly towards the hoist side." 1783 | }, 1784 | "cca2": "RS", 1785 | "latlng": [ 1786 | 44.0, 1787 | 21.0 1788 | ] 1789 | }, 1790 | { 1791 | "flags": { 1792 | "png": "https://flagcdn.com/w320/bw.png", 1793 | "svg": "https://flagcdn.com/bw.svg", 1794 | "alt": "The flag of Botswana has a light blue field with a white-edged black horizontal band across its center." 1795 | }, 1796 | "cca2": "BW", 1797 | "latlng": [ 1798 | -22.0, 1799 | 24.0 1800 | ] 1801 | }, 1802 | { 1803 | "flags": { 1804 | "png": "https://flagcdn.com/w320/ci.png", 1805 | "svg": "https://flagcdn.com/ci.svg", 1806 | "alt": "The flag of Ivory Coast is composed of three equal vertical bands of orange, white and green." 1807 | }, 1808 | "cca2": "CI", 1809 | "latlng": [ 1810 | 8.0, 1811 | -5.0 1812 | ] 1813 | }, 1814 | { 1815 | "flags": { 1816 | "png": "https://flagcdn.com/w320/gh.png", 1817 | "svg": "https://flagcdn.com/gh.svg", 1818 | "alt": "The flag of Ghana is composed of three equal horizontal bands of red, gold and green, with a five-pointed black star centered in the gold band." 1819 | }, 1820 | "cca2": "GH", 1821 | "latlng": [ 1822 | 8.0, 1823 | -2.0 1824 | ] 1825 | }, 1826 | { 1827 | "flags": { 1828 | "png": "https://flagcdn.com/w320/km.png", 1829 | "svg": "https://flagcdn.com/km.svg", 1830 | "alt": "The flag of Comoros is composed of four equal horizontal bands of yellow, white, red and blue, with a green isosceles triangle superimposed on the hoist side of the field. This triangle has its base on the hoist end, spans about two-fifth the width of the field and bears a fly-side facing white crescent and four five-pointed white stars arranged in a vertical line along the opening of the crescent." 1831 | }, 1832 | "cca2": "KM", 1833 | "latlng": [ 1834 | -12.16666666, 1835 | 44.25 1836 | ] 1837 | }, 1838 | { 1839 | "flags": { 1840 | "png": "https://flagcdn.com/w320/az.png", 1841 | "svg": "https://flagcdn.com/az.svg", 1842 | "alt": "The flag of Azerbaijan features three equal horizontal bands of blue, red and green, with a white fly-side facing crescent and eight-pointed star centered in the red band." 1843 | }, 1844 | "cca2": "AZ", 1845 | "latlng": [ 1846 | 40.5, 1847 | 47.5 1848 | ] 1849 | }, 1850 | { 1851 | "flags": { 1852 | "png": "https://flagcdn.com/w320/gb.png", 1853 | "svg": "https://flagcdn.com/gb.svg", 1854 | "alt": "The flag of the United Kingdom — the Union Jack — has a blue field. It features the white-edged red cross of Saint George superimposed on the diagonal red cross of Saint Patrick which is superimposed on the diagonal white cross of Saint Andrew." 1855 | }, 1856 | "cca2": "GB", 1857 | "latlng": [ 1858 | 54.0, 1859 | -2.0 1860 | ] 1861 | }, 1862 | { 1863 | "flags": { 1864 | "png": "https://flagcdn.com/w320/cf.png", 1865 | "svg": "https://flagcdn.com/cf.svg", 1866 | "alt": "The flag of Central African Republic is composed of four equal horizontal bands of blue, white, green and yellow intersected at the center by a vertical red band of equal size as the horizontal bands. A yellow five-pointed star is situated on the hoist side of the blue band." 1867 | }, 1868 | "cca2": "CF", 1869 | "latlng": [ 1870 | 7.0, 1871 | 21.0 1872 | ] 1873 | }, 1874 | { 1875 | "flags": { 1876 | "png": "https://flagcdn.com/w320/ps.png", 1877 | "svg": "https://flagcdn.com/ps.svg", 1878 | "alt": "" 1879 | }, 1880 | "cca2": "PS", 1881 | "latlng": [ 1882 | 31.9, 1883 | 35.2 1884 | ] 1885 | }, 1886 | { 1887 | "flags": { 1888 | "png": "https://flagcdn.com/w320/bq.png", 1889 | "svg": "https://flagcdn.com/bq.svg", 1890 | "alt": "" 1891 | }, 1892 | "cca2": "BQ", 1893 | "latlng": [ 1894 | 12.18, 1895 | -68.25 1896 | ] 1897 | }, 1898 | { 1899 | "flags": { 1900 | "png": "https://flagcdn.com/w320/tw.png", 1901 | "svg": "https://flagcdn.com/tw.svg", 1902 | "alt": "" 1903 | }, 1904 | "cca2": "TW", 1905 | "latlng": [ 1906 | 23.5, 1907 | 121.0 1908 | ] 1909 | }, 1910 | { 1911 | "flags": { 1912 | "png": "https://flagcdn.com/w320/pn.png", 1913 | "svg": "https://flagcdn.com/pn.svg", 1914 | "alt": "" 1915 | }, 1916 | "cca2": "PN", 1917 | "latlng": [ 1918 | -25.06666666, 1919 | -130.1 1920 | ] 1921 | }, 1922 | { 1923 | "flags": { 1924 | "png": "https://flagcdn.com/w320/sm.png", 1925 | "svg": "https://flagcdn.com/sm.svg", 1926 | "alt": "The flag of San Marino is composed of two equal horizontal bands of white and light blue, with the national coat of arms superimposed in the center." 1927 | }, 1928 | "cca2": "SM", 1929 | "latlng": [ 1930 | 43.76666666, 1931 | 12.41666666 1932 | ] 1933 | }, 1934 | { 1935 | "flags": { 1936 | "png": "https://flagcdn.com/w320/sj.png", 1937 | "svg": "https://flagcdn.com/sj.svg", 1938 | "alt": "" 1939 | }, 1940 | "cca2": "SJ", 1941 | "latlng": [ 1942 | 78.0, 1943 | 20.0 1944 | ] 1945 | }, 1946 | { 1947 | "flags": { 1948 | "png": "https://flagcdn.com/w320/dj.png", 1949 | "svg": "https://flagcdn.com/dj.svg", 1950 | "alt": "The flag of Djibouti is composed of two equal horizontal bands of light blue and light green, with a white isosceles triangle superimposed on the hoist side of the field. The triangle has its base on the hoist end, spans about two-fifth the width of the field and bears a red five-pointed star at its center." 1951 | }, 1952 | "cca2": "DJ", 1953 | "latlng": [ 1954 | 11.5, 1955 | 43.0 1956 | ] 1957 | }, 1958 | { 1959 | "flags": { 1960 | "png": "https://flagcdn.com/w320/wf.png", 1961 | "svg": "https://flagcdn.com/wf.svg", 1962 | "alt": "" 1963 | }, 1964 | "cca2": "WF", 1965 | "latlng": [ 1966 | -13.3, 1967 | -176.2 1968 | ] 1969 | }, 1970 | { 1971 | "flags": { 1972 | "png": "https://flagcdn.com/w320/dk.png", 1973 | "svg": "https://flagcdn.com/dk.svg", 1974 | "alt": "The flag of Denmark has a red field with a large white cross that extend to the edges of the field. The vertical part of this cross is offset towards the hoist side." 1975 | }, 1976 | "cca2": "DK", 1977 | "latlng": [ 1978 | 56.0, 1979 | 10.0 1980 | ] 1981 | }, 1982 | { 1983 | "flags": { 1984 | "png": "https://flagcdn.com/w320/pg.png", 1985 | "svg": "https://flagcdn.com/pg.svg", 1986 | "alt": "The flag of Papua New Guinea is divided diagonally, from the upper hoist-side corner to the lower fly-side corner, into a lower black and an upper red triangle. On the hoist side of the lower black triangle is a representation of the Southern Cross constellation made up of one small and four larger five-pointed white stars. A golden Raggiana bird-of-paradise is situated on the fly side of the upper red triangle." 1987 | }, 1988 | "cca2": "PG", 1989 | "latlng": [ 1990 | -6.0, 1991 | 147.0 1992 | ] 1993 | }, 1994 | { 1995 | "flags": { 1996 | "png": "https://flagcdn.com/w320/mg.png", 1997 | "svg": "https://flagcdn.com/mg.svg", 1998 | "alt": "The flag of Madagascar features a white vertical band on the hoist side that takes up about one-third the width of the field, and two equal horizontal bands of red and green adjoining the vertical band." 1999 | }, 2000 | "cca2": "MG", 2001 | "latlng": [ 2002 | -20.0, 2003 | 47.0 2004 | ] 2005 | }, 2006 | { 2007 | "flags": { 2008 | "png": "https://flagcdn.com/w320/bv.png", 2009 | "svg": "https://flagcdn.com/bv.svg", 2010 | "alt": "" 2011 | }, 2012 | "cca2": "BV", 2013 | "latlng": [ 2014 | 54.4208, 2015 | 3.3464 2016 | ] 2017 | }, 2018 | { 2019 | "flags": { 2020 | "png": "https://flagcdn.com/w320/hu.png", 2021 | "svg": "https://flagcdn.com/hu.svg", 2022 | "alt": "The flag of Hungary is composed of three equal horizontal bands of red, white and green." 2023 | }, 2024 | "cca2": "HU", 2025 | "latlng": [ 2026 | 47.0, 2027 | 20.0 2028 | ] 2029 | }, 2030 | { 2031 | "flags": { 2032 | "png": "https://flagcdn.com/w320/tk.png", 2033 | "svg": "https://flagcdn.com/tk.svg", 2034 | "alt": "" 2035 | }, 2036 | "cca2": "TK", 2037 | "latlng": [ 2038 | -9.0, 2039 | -172.0 2040 | ] 2041 | }, 2042 | { 2043 | "flags": { 2044 | "png": "https://flagcdn.com/w320/tt.png", 2045 | "svg": "https://flagcdn.com/tt.svg", 2046 | "alt": "The flag of Trinidad and Tobago has a red field with a white-edged black diagonal band that extends from the upper hoist-side corner to the lower fly-side corner of the field." 2047 | }, 2048 | "cca2": "TT", 2049 | "latlng": [ 2050 | 10.6918, 2051 | -61.2225 2052 | ] 2053 | }, 2054 | { 2055 | "flags": { 2056 | "png": "https://flagcdn.com/w320/gm.png", 2057 | "svg": "https://flagcdn.com/gm.svg", 2058 | "alt": "The flag of Gambia is composed of three equal horizontal bands of red, blue with white top and bottom edges, and green." 2059 | }, 2060 | "cca2": "GM", 2061 | "latlng": [ 2062 | 13.46666666, 2063 | -16.56666666 2064 | ] 2065 | }, 2066 | { 2067 | "flags": { 2068 | "png": "https://flagcdn.com/w320/lu.png", 2069 | "svg": "https://flagcdn.com/lu.svg", 2070 | "alt": "The flag of Luxembourg is composed of three equal horizontal bands of red, white and light blue." 2071 | }, 2072 | "cca2": "LU", 2073 | "latlng": [ 2074 | 49.75, 2075 | 6.16666666 2076 | ] 2077 | }, 2078 | { 2079 | "flags": { 2080 | "png": "https://flagcdn.com/w320/cc.png", 2081 | "svg": "https://flagcdn.com/cc.svg", 2082 | "alt": "" 2083 | }, 2084 | "cca2": "CC", 2085 | "latlng": [ 2086 | 12.1642, 2087 | 96.871 2088 | ] 2089 | }, 2090 | { 2091 | "flags": { 2092 | "png": "https://flagcdn.com/w320/cg.png", 2093 | "svg": "https://flagcdn.com/cg.svg", 2094 | "alt": "The flag of the Republic of the Congo features a yellow diagonal band that extends from the lower hoist-side corner to the upper fly-side corner of the field. Above and beneath this band are a green and red triangle respectively." 2095 | }, 2096 | "cca2": "CG", 2097 | "latlng": [ 2098 | -1.0, 2099 | 15.0 2100 | ] 2101 | }, 2102 | { 2103 | "flags": { 2104 | "png": "https://flagcdn.com/w320/ar.png", 2105 | "svg": "https://flagcdn.com/ar.svg", 2106 | "alt": "The flag of Argentina features three equal horizontal bands of light blue, white and light blue. A brown-edged golden sun is centered in the white band." 2107 | }, 2108 | "cca2": "AR", 2109 | "latlng": [ 2110 | -34.0, 2111 | -64.0 2112 | ] 2113 | }, 2114 | { 2115 | "flags": { 2116 | "png": "https://flagcdn.com/w320/cd.png", 2117 | "svg": "https://flagcdn.com/cd.svg", 2118 | "alt": "The flag of the Democratic Republic of the Congo has a sky-blue field with a yellow-edged red diagonal band that extends from the lower hoist-side corner to the upper fly-side corner of the field. A large five-pointed yellow star is situated above the diagonal band on the upper hoist side of the field." 2119 | }, 2120 | "cca2": "CD", 2121 | "latlng": [ 2122 | 0.0, 2123 | 25.0 2124 | ] 2125 | }, 2126 | { 2127 | "flags": { 2128 | "png": "https://flagcdn.com/w320/gl.png", 2129 | "svg": "https://flagcdn.com/gl.svg", 2130 | "alt": "" 2131 | }, 2132 | "cca2": "GL", 2133 | "latlng": [ 2134 | 72.0, 2135 | -40.0 2136 | ] 2137 | }, 2138 | { 2139 | "flags": { 2140 | "png": "https://flagcdn.com/w320/jo.png", 2141 | "svg": "https://flagcdn.com/jo.svg", 2142 | "alt": "The flag of Jordan is composed of three equal horizontal bands of black, white and green, with a red isosceles triangle superimposed on the hoist side of the field. This triangle has its base on the hoist end, spans about half the width of the field and bears a small seven-pointed white star at its center." 2143 | }, 2144 | "cca2": "JO", 2145 | "latlng": [ 2146 | 31.0, 2147 | 36.0 2148 | ] 2149 | }, 2150 | { 2151 | "flags": { 2152 | "png": "https://flagcdn.com/w320/be.png", 2153 | "svg": "https://flagcdn.com/be.svg", 2154 | "alt": "The flag of Belgium is composed of three equal vertical bands of black, yellow and red." 2155 | }, 2156 | "cca2": "BE", 2157 | "latlng": [ 2158 | 50.83333333, 2159 | 4.0 2160 | ] 2161 | }, 2162 | { 2163 | "flags": { 2164 | "png": "https://flagcdn.com/w320/ch.png", 2165 | "svg": "https://flagcdn.com/ch.svg", 2166 | "alt": "The flag of Switzerland is square shaped. It features a white Swiss cross centered on a red field." 2167 | }, 2168 | "cca2": "CH", 2169 | "latlng": [ 2170 | 47.0, 2171 | 8.0 2172 | ] 2173 | }, 2174 | { 2175 | "flags": { 2176 | "png": "https://flagcdn.com/w320/id.png", 2177 | "svg": "https://flagcdn.com/id.svg", 2178 | "alt": "The flag of Indonesia is composed of two equal horizontal bands of red and white." 2179 | }, 2180 | "cca2": "ID", 2181 | "latlng": [ 2182 | -5.0, 2183 | 120.0 2184 | ] 2185 | }, 2186 | { 2187 | "flags": { 2188 | "png": "https://flagcdn.com/w320/lb.png", 2189 | "svg": "https://flagcdn.com/lb.svg", 2190 | "alt": "The flag of Lebanon is composed of three horizontal bands of red, white and red. The white band is twice the height of the red bands and bears a green Lebanese Cedar tree at its center." 2191 | }, 2192 | "cca2": "LB", 2193 | "latlng": [ 2194 | 33.83333333, 2195 | 35.83333333 2196 | ] 2197 | }, 2198 | { 2199 | "flags": { 2200 | "png": "https://flagcdn.com/w320/my.png", 2201 | "svg": "https://flagcdn.com/my.svg", 2202 | "alt": "The flag of Malaysia is composed of fourteen equal horizontal bands of red alternating with white. A blue rectangle, bearing a fly-side facing yellow crescent and a fourteen-pointed yellow star placed just outside the crescent opening, is superimposed in the canton." 2203 | }, 2204 | "cca2": "MY", 2205 | "latlng": [ 2206 | 2.5, 2207 | 112.5 2208 | ] 2209 | }, 2210 | { 2211 | "flags": { 2212 | "png": "https://flagcdn.com/w320/ky.png", 2213 | "svg": "https://flagcdn.com/ky.svg", 2214 | "alt": "" 2215 | }, 2216 | "cca2": "KY", 2217 | "latlng": [ 2218 | 19.3133, 2219 | -81.2546 2220 | ] 2221 | }, 2222 | { 2223 | "flags": { 2224 | "png": "https://flagcdn.com/w320/sk.png", 2225 | "svg": "https://flagcdn.com/sk.svg", 2226 | "alt": "The flag of Slovakia is composed of three equal horizontal bands of white, blue and red. The coat of arms of Slovakia is superimposed at the center of the field slightly towards the hoist side." 2227 | }, 2228 | "cca2": "SK", 2229 | "latlng": [ 2230 | 48.66666666, 2231 | 19.5 2232 | ] 2233 | }, 2234 | { 2235 | "flags": { 2236 | "png": "https://flagcdn.com/w320/am.png", 2237 | "svg": "https://flagcdn.com/am.svg", 2238 | "alt": "The flag of Armenia is composed of three equal horizontal bands of red, blue and orange." 2239 | }, 2240 | "cca2": "AM", 2241 | "latlng": [ 2242 | 40.0, 2243 | 45.0 2244 | ] 2245 | }, 2246 | { 2247 | "flags": { 2248 | "png": "https://flagcdn.com/w320/cx.png", 2249 | "svg": "https://flagcdn.com/cx.svg", 2250 | "alt": "" 2251 | }, 2252 | "cca2": "CX", 2253 | "latlng": [ 2254 | -10.5, 2255 | 105.66666666 2256 | ] 2257 | }, 2258 | { 2259 | "flags": { 2260 | "png": "https://flagcdn.com/w320/mn.png", 2261 | "svg": "https://flagcdn.com/mn.svg", 2262 | "alt": "The flag of Mongolia is composed of three equal vertical bands of red, blue and red, with the national emblem — the Soyombo — in gold centered in the hoist-side red band." 2263 | }, 2264 | "cca2": "MN", 2265 | "latlng": [ 2266 | 46.0, 2267 | 105.0 2268 | ] 2269 | }, 2270 | { 2271 | "flags": { 2272 | "png": "https://flagcdn.com/w320/pm.png", 2273 | "svg": "https://flagcdn.com/pm.svg", 2274 | "alt": "" 2275 | }, 2276 | "cca2": "PM", 2277 | "latlng": [ 2278 | 46.83333333, 2279 | -56.33333333 2280 | ] 2281 | }, 2282 | { 2283 | "flags": { 2284 | "png": "https://flagcdn.com/w320/jp.png", 2285 | "svg": "https://flagcdn.com/jp.svg", 2286 | "alt": "The flag of Japan features a crimson-red circle at the center of a white field." 2287 | }, 2288 | "cca2": "JP", 2289 | "latlng": [ 2290 | 36.0, 2291 | 138.0 2292 | ] 2293 | }, 2294 | { 2295 | "flags": { 2296 | "png": "https://flagcdn.com/w320/za.png", 2297 | "svg": "https://flagcdn.com/za.svg", 2298 | "alt": "The flag of South Africa is composed of two equal horizontal bands of red and blue, with a yellow-edged black isosceles triangle superimposed on the hoist side of the field. This triangle has its base centered on the hoist end, spans about two-fifth the width and two-third the height of the field, and is enclosed on its sides by the arms of a white-edged green horizontally oriented Y-shaped band which extends along the boundary of the red and blue bands to the fly end of the field." 2299 | }, 2300 | "cca2": "ZA", 2301 | "latlng": [ 2302 | -29.0, 2303 | 24.0 2304 | ] 2305 | }, 2306 | { 2307 | "flags": { 2308 | "png": "https://flagcdn.com/w320/ph.png", 2309 | "svg": "https://flagcdn.com/ph.svg", 2310 | "alt": "The flag of Philippines is composed of two equal horizontal bands of blue and red, with a white equilateral triangle superimposed on the hoist side of the field. This triangle has its base on the hoist end, spans about two-fifth the width of the field and bears a central golden-yellow sun with eight rays and a five-pointed golden-yellow star at each vertex." 2311 | }, 2312 | "cca2": "PH", 2313 | "latlng": [ 2314 | 13.0, 2315 | 122.0 2316 | ] 2317 | }, 2318 | { 2319 | "flags": { 2320 | "png": "https://flagcdn.com/w320/fm.png", 2321 | "svg": "https://flagcdn.com/fm.svg", 2322 | "alt": "The flag of Micronesia has a light blue field, at the center of which are four five-pointed white stars arranged in the shape of a diamond." 2323 | }, 2324 | "cca2": "FM", 2325 | "latlng": [ 2326 | 6.91666666, 2327 | 158.25 2328 | ] 2329 | }, 2330 | { 2331 | "flags": { 2332 | "png": "https://flagcdn.com/w320/de.png", 2333 | "svg": "https://flagcdn.com/de.svg", 2334 | "alt": "The flag of Germany is composed of three equal horizontal bands of black, red and gold." 2335 | }, 2336 | "cca2": "DE", 2337 | "latlng": [ 2338 | 51.0, 2339 | 9.0 2340 | ] 2341 | }, 2342 | { 2343 | "flags": { 2344 | "png": "https://flagcdn.com/w320/lv.png", 2345 | "svg": "https://flagcdn.com/lv.svg", 2346 | "alt": "The flag of Latvia has a carmine-red field with a thin white horizontal band across the middle of the field." 2347 | }, 2348 | "cca2": "LV", 2349 | "latlng": [ 2350 | 57.0, 2351 | 25.0 2352 | ] 2353 | }, 2354 | { 2355 | "flags": { 2356 | "png": "https://flagcdn.com/w320/jm.png", 2357 | "svg": "https://flagcdn.com/jm.svg", 2358 | "alt": "The flag of Jamaica is divided by a gold diagonal cross into four alternating triangular areas of green at the top and bottom, and black on the hoist and fly sides" 2359 | }, 2360 | "cca2": "JM", 2361 | "latlng": [ 2362 | 18.25, 2363 | -77.5 2364 | ] 2365 | }, 2366 | { 2367 | "flags": { 2368 | "png": "https://flagcdn.com/w320/mo.png", 2369 | "svg": "https://flagcdn.com/mo.svg", 2370 | "alt": "" 2371 | }, 2372 | "cca2": "MO", 2373 | "latlng": [ 2374 | 22.16666666, 2375 | 113.55 2376 | ] 2377 | }, 2378 | { 2379 | "flags": { 2380 | "png": "https://flagcdn.com/w320/nr.png", 2381 | "svg": "https://flagcdn.com/nr.svg", 2382 | "alt": "The flag of Nauru has a dark blue field with a thin yellow horizontal band across the center and a large white twelve-pointed star beneath the horizontal band on the hoist side of the field." 2383 | }, 2384 | "cca2": "NR", 2385 | "latlng": [ 2386 | -0.53333333, 2387 | 166.91666666 2388 | ] 2389 | }, 2390 | { 2391 | "flags": { 2392 | "png": "https://flagcdn.com/w320/fo.png", 2393 | "svg": "https://flagcdn.com/fo.svg", 2394 | "alt": "" 2395 | }, 2396 | "cca2": "FO", 2397 | "latlng": [ 2398 | 62.0, 2399 | -7.0 2400 | ] 2401 | }, 2402 | { 2403 | "flags": { 2404 | "png": "https://flagcdn.com/w320/gy.png", 2405 | "svg": "https://flagcdn.com/gy.svg", 2406 | "alt": "The flag of Guyana has a green field with two isosceles triangles which share a common base on the hoist end. The smaller black-edged red triangle spanning half the width of the field is superimposed on the larger white-edged yellow triangle which spans the full width of the field." 2407 | }, 2408 | "cca2": "GY", 2409 | "latlng": [ 2410 | 5.0, 2411 | -59.0 2412 | ] 2413 | }, 2414 | { 2415 | "flags": { 2416 | "png": "https://flagcdn.com/w320/bf.png", 2417 | "svg": "https://flagcdn.com/bf.svg", 2418 | "alt": "The flag of Burkina Faso features two equal horizontal bands of red and green, with a yellow five-pointed star in the center." 2419 | }, 2420 | "cca2": "BF", 2421 | "latlng": [ 2422 | 13.0, 2423 | -2.0 2424 | ] 2425 | }, 2426 | { 2427 | "flags": { 2428 | "png": "https://flagcdn.com/w320/sd.png", 2429 | "svg": "https://flagcdn.com/sd.svg", 2430 | "alt": "The flag of Sudan is composed of three equal horizontal bands of red, white and black, with a green isosceles triangle superimposed on the hoist side. The green triangle spans about two-fifth the width of the field with its base on the hoist end." 2431 | }, 2432 | "cca2": "SD", 2433 | "latlng": [ 2434 | 15.0, 2435 | 30.0 2436 | ] 2437 | }, 2438 | { 2439 | "flags": { 2440 | "png": "https://flagcdn.com/w320/ru.png", 2441 | "svg": "https://flagcdn.com/ru.svg", 2442 | "alt": "The flag of Russia is composed of three equal horizontal bands of white, blue and red." 2443 | }, 2444 | "cca2": "RU", 2445 | "latlng": [ 2446 | 60.0, 2447 | 100.0 2448 | ] 2449 | }, 2450 | { 2451 | "flags": { 2452 | "png": "https://flagcdn.com/w320/yt.png", 2453 | "svg": "https://flagcdn.com/yt.svg", 2454 | "alt": "" 2455 | }, 2456 | "cca2": "YT", 2457 | "latlng": [ 2458 | -12.83333333, 2459 | 45.16666666 2460 | ] 2461 | }, 2462 | { 2463 | "flags": { 2464 | "png": "https://flagcdn.com/w320/au.png", 2465 | "svg": "https://flagcdn.com/au.svg", 2466 | "alt": "The flag of Australia has a dark blue field. It features the flag of the United Kingdom — the Union Jack — in the canton, beneath which is a large white seven-pointed star. A representation of the Southern Cross constellation, made up of one small five-pointed and four larger seven-pointed white stars, is situated on the fly side of the field." 2467 | }, 2468 | "cca2": "AU", 2469 | "latlng": [ 2470 | -27.0, 2471 | 133.0 2472 | ] 2473 | }, 2474 | { 2475 | "flags": { 2476 | "png": "https://flagcdn.com/w320/lr.png", 2477 | "svg": "https://flagcdn.com/lr.svg", 2478 | "alt": "The flag of Liberia is composed of eleven equal horizontal bands of red alternating with white. A blue square bearing a five-pointed white star is superimposed in the canton." 2479 | }, 2480 | "cca2": "LR", 2481 | "latlng": [ 2482 | 6.5, 2483 | -9.5 2484 | ] 2485 | }, 2486 | { 2487 | "flags": { 2488 | "png": "https://flagcdn.com/w320/mx.png", 2489 | "svg": "https://flagcdn.com/mx.svg", 2490 | "alt": "The flag of Mexico is composed of three equal vertical bands of green, white and red, with the national coat of arms centered in the white band." 2491 | }, 2492 | "cca2": "MX", 2493 | "latlng": [ 2494 | 23.0, 2495 | -102.0 2496 | ] 2497 | }, 2498 | { 2499 | "flags": { 2500 | "png": "https://flagcdn.com/w320/tn.png", 2501 | "svg": "https://flagcdn.com/tn.svg", 2502 | "alt": "The flag of Tunisia has a red field. A white circle bearing a five-pointed red star within a fly-side facing red crescent is situated at the center of the field." 2503 | }, 2504 | "cca2": "TN", 2505 | "latlng": [ 2506 | 34.0, 2507 | 9.0 2508 | ] 2509 | }, 2510 | { 2511 | "flags": { 2512 | "png": "https://flagcdn.com/w320/aw.png", 2513 | "svg": "https://flagcdn.com/aw.svg", 2514 | "alt": "" 2515 | }, 2516 | "cca2": "AW", 2517 | "latlng": [ 2518 | 12.5, 2519 | -69.96666666 2520 | ] 2521 | }, 2522 | { 2523 | "flags": { 2524 | "png": "https://flagcdn.com/w320/kz.png", 2525 | "svg": "https://flagcdn.com/kz.svg", 2526 | "alt": "The flag of Kazakhstan has a turquoise field, at the center of which is a gold sun with thirty-two rays above a soaring golden steppe eagle. A thin vertical band displays a national ornamental pattern — koshkar-muiz — in gold near the hoist end." 2527 | }, 2528 | "cca2": "KZ", 2529 | "latlng": [ 2530 | 48.0196, 2531 | 66.9237 2532 | ] 2533 | }, 2534 | { 2535 | "flags": { 2536 | "png": "https://flagcdn.com/w320/om.png", 2537 | "svg": "https://flagcdn.com/om.svg", 2538 | "alt": "The flag of Oman features a red vertical band on the hoist side that takes up about one-fourth the width of the field, and three equal horizontal bands of white, red and green adjoining the vertical band. At the top of the vertical band is the white emblem of Oman." 2539 | }, 2540 | "cca2": "OM", 2541 | "latlng": [ 2542 | 21.0, 2543 | 57.0 2544 | ] 2545 | }, 2546 | { 2547 | "flags": { 2548 | "png": "https://flagcdn.com/w320/gf.png", 2549 | "svg": "https://flagcdn.com/gf.svg", 2550 | "alt": "" 2551 | }, 2552 | "cca2": "GF", 2553 | "latlng": [ 2554 | 4.0, 2555 | -53.0 2556 | ] 2557 | }, 2558 | { 2559 | "flags": { 2560 | "png": "https://flagcdn.com/w320/ne.png", 2561 | "svg": "https://flagcdn.com/ne.svg", 2562 | "alt": "The flag of Niger features three equal horizontal bands of orange, white and green, with an orange circle centered in the white band." 2563 | }, 2564 | "cca2": "NE", 2565 | "latlng": [ 2566 | 16.0, 2567 | 8.0 2568 | ] 2569 | }, 2570 | { 2571 | "flags": { 2572 | "png": "https://flagcdn.com/w320/tm.png", 2573 | "svg": "https://flagcdn.com/tm.svg", 2574 | "alt": "The flag of Turkmenistan has a green field. It features a red vertical band, bearing five carpet guls stacked above two crossed olive branches, near the hoist end of the field. Just to the fly side of the vertical band near the top edge of the field is a hoist-side facing white crescent and five small five-pointed white stars placed just outside the crescent opening." 2575 | }, 2576 | "cca2": "TM", 2577 | "latlng": [ 2578 | 40.0, 2579 | 60.0 2580 | ] 2581 | }, 2582 | { 2583 | "flags": { 2584 | "png": "https://flagcdn.com/w320/sl.png", 2585 | "svg": "https://flagcdn.com/sl.svg", 2586 | "alt": "The flag of Sierra Leone is composed of three equal horizontal bands of green, white and blue." 2587 | }, 2588 | "cca2": "SL", 2589 | "latlng": [ 2590 | 8.5, 2591 | -11.5 2592 | ] 2593 | }, 2594 | { 2595 | "flags": { 2596 | "png": "https://flagcdn.com/w320/ws.png", 2597 | "svg": "https://flagcdn.com/ws.svg", 2598 | "alt": "The flag of Samoa has a red field. A blue rectangle, bearing a representation of the Southern Cross made up of five large and one smaller five-pointed white stars, is superimposed in the canton." 2599 | }, 2600 | "cca2": "WS", 2601 | "latlng": [ 2602 | -13.58333333, 2603 | -172.33333333 2604 | ] 2605 | }, 2606 | { 2607 | "flags": { 2608 | "png": "https://flagcdn.com/w320/sn.png", 2609 | "svg": "https://flagcdn.com/sn.svg", 2610 | "alt": "The flag of Senegal is composed of three equal vertical bands of green, golden-yellow and red, with a five-pointed green star centered in the golden-yellow band." 2611 | }, 2612 | "cca2": "SN", 2613 | "latlng": [ 2614 | 14.0, 2615 | -14.0 2616 | ] 2617 | }, 2618 | { 2619 | "flags": { 2620 | "png": "https://flagcdn.com/w320/ge.png", 2621 | "svg": "https://flagcdn.com/ge.svg", 2622 | "alt": "The flag of Georgia has a white field with a large centered red cross that extends to the edges and divides the field into four quarters. A small red Bolnur-Katskhuri cross is centered in each quarter." 2623 | }, 2624 | "cca2": "GE", 2625 | "latlng": [ 2626 | 42.0, 2627 | 43.5 2628 | ] 2629 | }, 2630 | { 2631 | "flags": { 2632 | "png": "https://flagcdn.com/w320/na.png", 2633 | "svg": "https://flagcdn.com/na.svg", 2634 | "alt": "The flag of Namibia features a white-edged red diagonal band that extends from the lower hoist-side corner to the upper fly-side corner of the field. Above and beneath this band are a blue and green triangle respectively. A gold sun with twelve triangular rays is situated on the hoist side of the upper triangle." 2635 | }, 2636 | "cca2": "NA", 2637 | "latlng": [ 2638 | -22.0, 2639 | 17.0 2640 | ] 2641 | }, 2642 | { 2643 | "flags": { 2644 | "png": "https://flagcdn.com/w320/ss.png", 2645 | "svg": "https://flagcdn.com/ss.svg", 2646 | "alt": "The flag of South Sudan is composed of three equal horizontal bands of black, red with white top and bottom edges, and green. A blue equilateral triangle which spans about two-fifth the width of the field is superimposed on the hoist side with its base on the hoist end of the field. At the center of this triangle is a five-pointed yellow star." 2647 | }, 2648 | "cca2": "SS", 2649 | "latlng": [ 2650 | 7.0, 2651 | 30.0 2652 | ] 2653 | }, 2654 | { 2655 | "flags": { 2656 | "png": "https://flagcdn.com/w320/th.png", 2657 | "svg": "https://flagcdn.com/th.svg", 2658 | "alt": "The flag of Thailand is composed of five horizontal bands of red, white, blue, white and red, with the central blue band twice the height of the other four bands." 2659 | }, 2660 | "cca2": "TH", 2661 | "latlng": [ 2662 | 15.0, 2663 | 100.0 2664 | ] 2665 | }, 2666 | { 2667 | "flags": { 2668 | "png": "https://flagcdn.com/w320/bh.png", 2669 | "svg": "https://flagcdn.com/bh.svg", 2670 | "alt": "The flag of Bahrain has a red field. On the hoist side, it features a white vertical band that spans about one-third the width of the field and is separated from the rest of the field by five adjoining fly-side pointing white isosceles triangles that serve as a serrated line." 2671 | }, 2672 | "cca2": "BH", 2673 | "latlng": [ 2674 | 26.0, 2675 | 50.55 2676 | ] 2677 | }, 2678 | { 2679 | "flags": { 2680 | "png": "https://flagcdn.com/w320/hm.png", 2681 | "svg": "https://flagcdn.com/hm.svg", 2682 | "alt": "" 2683 | }, 2684 | "cca2": "HM", 2685 | "latlng": [ 2686 | 53.0818, 2687 | 73.5042 2688 | ] 2689 | }, 2690 | { 2691 | "flags": { 2692 | "png": "https://flagcdn.com/w320/fk.png", 2693 | "svg": "https://flagcdn.com/fk.svg", 2694 | "alt": "" 2695 | }, 2696 | "cca2": "FK", 2697 | "latlng": [ 2698 | -51.75, 2699 | -59.0 2700 | ] 2701 | }, 2702 | { 2703 | "flags": { 2704 | "png": "https://flagcdn.com/w320/je.png", 2705 | "svg": "https://flagcdn.com/je.svg", 2706 | "alt": "" 2707 | }, 2708 | "cca2": "JE", 2709 | "latlng": [ 2710 | 49.25, 2711 | -2.16666666 2712 | ] 2713 | }, 2714 | { 2715 | "flags": { 2716 | "png": "https://flagcdn.com/w320/vn.png", 2717 | "svg": "https://flagcdn.com/vn.svg", 2718 | "alt": "The flag of Vietnam features a large five-pointed yellow star on a red field." 2719 | }, 2720 | "cca2": "VN", 2721 | "latlng": [ 2722 | 16.16666666, 2723 | 107.83333333 2724 | ] 2725 | }, 2726 | { 2727 | "flags": { 2728 | "png": "https://flagcdn.com/w320/gt.png", 2729 | "svg": "https://flagcdn.com/gt.svg", 2730 | "alt": "The flag of Guatemala is composed of three equal vertical bands of light blue, white and light blue, with the national coat of arms centered in the white band." 2731 | }, 2732 | "cca2": "GT", 2733 | "latlng": [ 2734 | 15.5, 2735 | -90.25 2736 | ] 2737 | }, 2738 | { 2739 | "flags": { 2740 | "png": "https://flagcdn.com/w320/md.png", 2741 | "svg": "https://flagcdn.com/md.svg", 2742 | "alt": "The flag of Moldova is composed of three equal vertical bands of blue, yellow and red, with the national coat of arms centered in the yellow band." 2743 | }, 2744 | "cca2": "MD", 2745 | "latlng": [ 2746 | 47.0, 2747 | 29.0 2748 | ] 2749 | }, 2750 | { 2751 | "flags": { 2752 | "png": "https://flagcdn.com/w320/mk.png", 2753 | "svg": "https://flagcdn.com/mk.svg", 2754 | "alt": "The flag of North Macedonia has a red field, at the center of which is a golden-yellow sun with eight broadening rays that extend to the edges of the field." 2755 | }, 2756 | "cca2": "MK", 2757 | "latlng": [ 2758 | 41.83333333, 2759 | 22.0 2760 | ] 2761 | }, 2762 | { 2763 | "flags": { 2764 | "png": "https://flagcdn.com/w320/uz.png", 2765 | "svg": "https://flagcdn.com/uz.svg", 2766 | "alt": "The flag of Uzbekistan is composed of three equal horizontal bands of turquoise, white with red top and bottom edges, and green. On the hoist side of the turquoise band is a fly-side facing white crescent and twelve five-pointed white stars arranged just outside the crescent opening in three rows comprising three, four and five stars." 2767 | }, 2768 | "cca2": "UZ", 2769 | "latlng": [ 2770 | 41.0, 2771 | 64.0 2772 | ] 2773 | }, 2774 | { 2775 | "flags": { 2776 | "png": "https://flagcdn.com/w320/ro.png", 2777 | "svg": "https://flagcdn.com/ro.svg", 2778 | "alt": "The flag of Romania is composed of three equal vertical bands of navy blue, yellow and red." 2779 | }, 2780 | "cca2": "RO", 2781 | "latlng": [ 2782 | 46.0, 2783 | 25.0 2784 | ] 2785 | }, 2786 | { 2787 | "flags": { 2788 | "png": "https://flagcdn.com/w320/ug.png", 2789 | "svg": "https://flagcdn.com/ug.svg", 2790 | "alt": "The flag of Uganda is composed of six equal horizontal bands of black, yellow, red, black, yellow and red. A white circle bearing a hoist-side facing grey red-crested crane is superimposed in the center of the field." 2791 | }, 2792 | "cca2": "UG", 2793 | "latlng": [ 2794 | 1.0, 2795 | 32.0 2796 | ] 2797 | }, 2798 | { 2799 | "flags": { 2800 | "png": "https://flagcdn.com/w320/sv.png", 2801 | "svg": "https://flagcdn.com/sv.svg", 2802 | "alt": "The flag of El Salvador is composed of three equal horizontal bands of cobalt blue, white and cobalt blue, with the national coat of arms centered in the white band." 2803 | }, 2804 | "cca2": "SV", 2805 | "latlng": [ 2806 | 13.83333333, 2807 | -88.91666666 2808 | ] 2809 | }, 2810 | { 2811 | "flags": { 2812 | "png": "https://flagcdn.com/w320/zm.png", 2813 | "svg": "https://flagcdn.com/zm.svg", 2814 | "alt": "The flag of Zambia has a green field, on the fly side of which is a soaring orange African fish eagle above a rectangular area divided into three equal vertical bands of red, black and orange." 2815 | }, 2816 | "cca2": "ZM", 2817 | "latlng": [ 2818 | -15.0, 2819 | 30.0 2820 | ] 2821 | }, 2822 | { 2823 | "flags": { 2824 | "png": "https://flagcdn.com/w320/ga.png", 2825 | "svg": "https://flagcdn.com/ga.svg", 2826 | "alt": "The flag of Gabon is composed of three equal horizontal bands of green, yellow and blue." 2827 | }, 2828 | "cca2": "GA", 2829 | "latlng": [ 2830 | -1.0, 2831 | 11.75 2832 | ] 2833 | }, 2834 | { 2835 | "flags": { 2836 | "png": "https://flagcdn.com/w320/gq.png", 2837 | "svg": "https://flagcdn.com/gq.svg", 2838 | "alt": "The flag of Equatorial Guinea is composed of three equal horizontal bands of green, white and red with the national coat of arms centered in the white band and an isosceles triangle superimposed on the hoist side of the field. The triangle is light blue, has its base on the hoist end and spans about one-fifth the width of the field." 2839 | }, 2840 | "cca2": "GQ", 2841 | "latlng": [ 2842 | 2.0, 2843 | 10.0 2844 | ] 2845 | }, 2846 | { 2847 | "flags": { 2848 | "png": "https://flagcdn.com/w320/es.png", 2849 | "svg": "https://flagcdn.com/es.svg", 2850 | "alt": "The flag of Spain is composed of three horizontal bands of red, yellow and red, with the yellow band twice the height of the red bands. In the yellow band is the national coat of arms offset slightly towards the hoist side of center." 2851 | }, 2852 | "cca2": "ES", 2853 | "latlng": [ 2854 | 40.0, 2855 | -4.0 2856 | ] 2857 | }, 2858 | { 2859 | "flags": { 2860 | "png": "https://flagcdn.com/w320/nl.png", 2861 | "svg": "https://flagcdn.com/nl.svg", 2862 | "alt": "The flag of the Netherlands is composed of three equal horizontal bands of red, white and blue." 2863 | }, 2864 | "cca2": "NL", 2865 | "latlng": [ 2866 | 52.5, 2867 | 5.75 2868 | ] 2869 | }, 2870 | { 2871 | "flags": { 2872 | "png": "https://flagcdn.com/w320/vg.png", 2873 | "svg": "https://flagcdn.com/vg.svg", 2874 | "alt": "" 2875 | }, 2876 | "cca2": "VG", 2877 | "latlng": [ 2878 | 18.431383, 2879 | -64.62305 2880 | ] 2881 | }, 2882 | { 2883 | "flags": { 2884 | "png": "https://flagcdn.com/w320/bj.png", 2885 | "svg": "https://flagcdn.com/bj.svg", 2886 | "alt": "The flag of Benin features a green vertical band on its hoist side that takes up about two-fifth the width of the field and two equal horizontal bands of yellow and red adjoining the vertical band." 2887 | }, 2888 | "cca2": "BJ", 2889 | "latlng": [ 2890 | 9.5, 2891 | 2.25 2892 | ] 2893 | }, 2894 | { 2895 | "flags": { 2896 | "png": "https://flagcdn.com/w320/pk.png", 2897 | "svg": "https://flagcdn.com/pk.svg", 2898 | "alt": "The flag of Pakistan is composed of a white vertical band on its hoist side that takes up about one-fourth the width of the field and a dark green rectangular area that spans the rest of the field. A white fly-side facing crescent and five-pointed star are centered in the dark green area." 2899 | }, 2900 | "cca2": "PK", 2901 | "latlng": [ 2902 | 30.0, 2903 | 70.0 2904 | ] 2905 | }, 2906 | { 2907 | "flags": { 2908 | "png": "https://flagcdn.com/w320/pa.png", 2909 | "svg": "https://flagcdn.com/pa.svg", 2910 | "alt": "The flag of Panama is composed of four equal rectangular areas — a white rectangular area with a blue five-pointed star at its center, a red rectangular area, a white rectangular area with a red five-pointed star at its center, and a blue rectangular area — in the upper hoist side, upper fly side, lower fly side and lower hoist side respectively." 2911 | }, 2912 | "cca2": "PA", 2913 | "latlng": [ 2914 | 9.0, 2915 | -80.0 2916 | ] 2917 | }, 2918 | { 2919 | "flags": { 2920 | "png": "https://flagcdn.com/w320/tc.png", 2921 | "svg": "https://flagcdn.com/tc.svg", 2922 | "alt": "" 2923 | }, 2924 | "cca2": "TC", 2925 | "latlng": [ 2926 | 21.75, 2927 | -71.58333333 2928 | ] 2929 | }, 2930 | { 2931 | "flags": { 2932 | "png": "https://flagcdn.com/w320/ao.png", 2933 | "svg": "https://flagcdn.com/ao.svg", 2934 | "alt": "The flag of Angola features two equal horizontal bands of red and black, with a yellow emblem at its centre. This emblem consists of a five-pointed star within the hoist-side facing half of a cogwheel that is crossed on its lower end by a machete." 2935 | }, 2936 | "cca2": "AO", 2937 | "latlng": [ 2938 | -12.5, 2939 | 18.5 2940 | ] 2941 | }, 2942 | { 2943 | "flags": { 2944 | "png": "https://flagcdn.com/w320/as.png", 2945 | "svg": "https://flagcdn.com/as.svg", 2946 | "alt": "" 2947 | }, 2948 | "cca2": "AS", 2949 | "latlng": [ 2950 | -14.33333333, 2951 | -170.0 2952 | ] 2953 | }, 2954 | { 2955 | "flags": { 2956 | "png": "https://flagcdn.com/w320/ve.png", 2957 | "svg": "https://flagcdn.com/ve.svg", 2958 | "alt": "The flag of Venezuela is composed of three equal horizontal bands of yellow, blue and red. At the center of the blue band are eight five-pointed white stars arranged in a horizontal arc." 2959 | }, 2960 | "cca2": "VE", 2961 | "latlng": [ 2962 | 8.0, 2963 | -66.0 2964 | ] 2965 | }, 2966 | { 2967 | "flags": { 2968 | "png": "https://flagcdn.com/w320/cr.png", 2969 | "svg": "https://flagcdn.com/cr.svg", 2970 | "alt": "The flag of Costa Rica is composed of five horizontal bands of blue, white, red, white and blue. The central red band is twice the height of the other four bands." 2971 | }, 2972 | "cca2": "CR", 2973 | "latlng": [ 2974 | 10.0, 2975 | -84.0 2976 | ] 2977 | }, 2978 | { 2979 | "flags": { 2980 | "png": "https://flagcdn.com/w320/pr.png", 2981 | "svg": "https://flagcdn.com/pr.svg", 2982 | "alt": "" 2983 | }, 2984 | "cca2": "PR", 2985 | "latlng": [ 2986 | 18.25, 2987 | -66.5 2988 | ] 2989 | }, 2990 | { 2991 | "flags": { 2992 | "png": "https://flagcdn.com/w320/sc.png", 2993 | "svg": "https://flagcdn.com/sc.svg", 2994 | "alt": "The flag of Seychelles is composed of five broadening oblique bands of blue, yellow, red, white and green, which extend from the hoist side of the bottom edge to the top and fly edges of the field." 2995 | }, 2996 | "cca2": "SC", 2997 | "latlng": [ 2998 | -4.58333333, 2999 | 55.66666666 3000 | ] 3001 | } 3002 | ] --------------------------------------------------------------------------------