本文へ移動

Chizu地図

SVGの地図を描き、地域を表示範囲に収め、番号付きの注記や地理クイズを英語と日本語の名前で作れます。

「地図」は、土地や場所を図で表したものです。 名前について(英語)

目次

リファレンス

国名とグループ

import { … } from "@johnmorrisdotca/chizu/names";

最小化と gzip 圧縮をしたサイズは 9.8 kB(読み込むものをすべて含み、esbuild で計測)

リファレンスの説明と例は英語です。見出しと目次は日本語です。

The name of every country, in English and Japanese, without any outlines: its own entry (@johnmorrisdotca/chizu/names), 52 kB (10 kB gzipped), for a page that lists countries, looks one up by code or by what somebody typed, or only needs to know which have a map of their own regions; and the seven continents and the UN M49 subregions, each with its countries.

エクスポート

名前種類概要
CHIZU_CONTINENTS定数The seven continents, as kuni has them (UN M49 by way of CLDR): the Americas are two, and Central America and the Caribbean are in North America.
CHIZU_COUNTRIES定数Every country, with its names in English and Japanese, its reading, its continent and which maps have it.
CHIZU_SOURCE定数Where the data came from: Natural Earth's release and files, and the version of kuni the names were read from.
CHIZU_SUBREGIONS定数The twenty-two subregions of UN M49, as kuni has them, each with the countries of this table in it.
countriesFromText関数The countries a pasted list names, by English name, Japanese name, short Japanese name, reading or code, in the order written (placesFromText): countriesFromText("Japan, フランス\nBrazil").
countryByCode関数The country with this code (upper or lower case), or undefined.

ソースを見るGitHub で編集@johnmorrisdotca/chizu 1.5.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。