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

featureKindNamefunction

What a kind of feature is called, in a language: Sea and 海, Mountain range and 山脈. From CHIZU_STRINGS (kind.sea), so a page can replace one.

Import it

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

Definition

function featureKindName(kind: ChizuFeatureKind, language: ChizuLanguage): string

Parameters

NameTypeDescription
kindChizuFeatureKind

The native physical-feature kind.

languageChizuLanguage

The English or Japanese display language.

Returns

string

What a kind of feature is called, in a language: Sea and 海, Mountain range and 山脈. From CHIZU_STRINGS (kind.sea), so a page can replace one.

Examples

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

console.log(featureKindName("strait", "en"), featureKindName("strait", "ja"), featureKindName("range", "ja"));
// Strait 海峡 山脈
Strait 海峡 山脈

What it prints (run when this page was built)

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