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

featureKindOffunction

What a feature is called as a kind, on the map it is drawn on: featureKindName, except that a kind may have a word of its own in one country, written kind.<kind>.<COUNTRY> in CHIZU_STRINGS and read from the country in a seat's code (seat-JP-47). A region's seat is a 行政の中心地 everywhere, and a 県庁所在地 on a map of Japan's prefectures.

Import it

import { featureKindOf } from "@johnmorrisdotca/chizu";

Definition

function featureKindOf(feature: Pick<ChizuFeature, "kind" | "code">, language: ChizuLanguage): string

Parameters

NameTypeDescription
featurePick<ChizuFeature, "code" | "kind">

The physical feature being classified or tested.

languageChizuLanguage

The English or Japanese display language.

Returns

string

What a feature is called as a kind, on the map it is drawn on: featureKindName, except that a kind may have a word of its own in one country, written kind.<kind>.<COUNTRY> in CHIZU_STRINGS and read from the country in a seat's code (seat-JP-47). A region's seat is a 行政の中心地 everywhere, and a 県庁所在地 on a map of Japan's prefectures.

Examples

import { featureKindOf } from "@johnmorrisdotca/chizu";

console.log(featureKindOf({ kind: "seat", code: "seat-JP-47" }, "ja"), featureKindOf({ kind: "seat", code: "seat-US-TX" }, "ja"));
// 県庁所在地 行政の中心地
県庁所在地 行政の中心地

What it prints (run when this page was built)

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