Skip to the content

Chizu地図

Draw SVG maps, frame regions, place numbered callouts and build geography quizzes with English and Japanese names.

Chizu is the Japanese word 地図 for map. About the name

Contents

Reference · Framing, geometry and quiz tools

ChizuCountrytype

One country in the table of every country: its names, and which of the maps has it.

Import it

import type { ChizuCountry } from "@johnmorrisdotca/chizu";

Definition

interface ChizuCountry {
    code: string;
    iso3: string;
    name: string;
    nameJa: string;
    nameShortJa?: string;
    reading?: string;
    group: string;
    onWorld: boolean;
    hasDivisions: boolean;
}

Members

NameTypeDescription
codestring

ISO 3166-1 alpha-2, or Natural Earth's own three letters where a territory has none. Lower case in a file's name.

iso3string
namestring
nameJastring
nameShortJa (optional)string | undefined
reading (optional)string | undefined
groupstring

The continent.

onWorldboolean

Whether the coarse world map draws it (the smallest places are only in the country's own file).

hasDivisionsboolean

Whether it has a map of its own regions: its provinces, states or departments.

Examples

import { CHIZU_COUNTRIES } from "@johnmorrisdotca/chizu/names";
import type { ChizuCountry } from "@johnmorrisdotca/chizu";

const withRegions: ChizuCountry[] = CHIZU_COUNTRIES.filter((country) => country.hasDivisions);
console.log(withRegions.length, withRegions.map((country) => country.code).slice(0, 5).join(" "));
// 32 AR AT AU BE BR
32 AR AT AU BE BR

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/chizu 1.5.0.