Skip to the content

Chizu地図

Draw SVG maps of the world, its 253 countries and the regions of 33 of them, frame them, place numbered callouts and build geography quizzes, with names in English and Japanese today (Spanish, German and Chinese are planned).

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

Contents

Reference · /world-geo-detail

ChizuGeoPropertiestype

The properties of one feature of a map in longitude and latitude: a region's code (the same as in the flat map of the same country) and its ISO 3166-2 code, iso, where it has one, its names in English and Japanese; a country of the world also has iso3 and its larger part of the world, group and groupJa.

Import it

import type { ChizuGeoProperties } from "@johnmorrisdotca/chizu/world-geo-detail";

Also exported from: @johnmorrisdotca/chizu/divisions-geo

Definition

interface ChizuGeoProperties {
    code: string;
    iso?: string;
    name: string;
    nameJa?: string;
    iso3?: string;
    group?: string;
    groupJa?: string;
}

Members

NameTypeDescription
codestring
iso (optional)string | undefined
namestring
nameJa (optional)string | undefined
iso3 (optional)string | undefined
group (optional)string | undefined
groupJa (optional)string | undefined

Examples

import type { ChizuGeoProperties } from "@johnmorrisdotca/chizu/divisions-geo";

const label = (p: ChizuGeoProperties): string => `${p.nameJa ?? p.name} (${p.code})`;
console.log(label({ code: "13", iso: "JP-13", name: "Tokyo", nameJa: "東京都" }));
// 東京都 (13)
東京都 (13)

What it prints (run when this page was built)

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