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

ChizuLanguagetype

THE WORDS chizu says itself, in English and Japanese: what a screen reader hears of a drawing, and the labels on a mounted map's buttons. Plain data, so a page can read them, replace a few or add a language of its own beside these two. {name} in a line is a value filled in.

Import it

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

Definition

type ChizuLanguage = "en" | "ja";

Examples

import { nameOf, type ChizuLanguage } from "@johnmorrisdotca/chizu";

const language: ChizuLanguage = "ja";
console.log(nameOf({ name: "Japan", nameJa: "日本" }, language));
// 日本
日本

What it prints (run when this page was built)

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