リファレンス · 印刷できるシート: 色をぬる地球と世界地図、わたしの国、昼と夜、季節
countryShape関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
One country by its ISO alpha-2 code, for a "my country" sheet: its main land and the islands near it (a far territory such as French Guiana is left out), the continent it is in and the countries it touches.
インポート
import { countryShape } from "@johnmorrisdotca/chikyu-earth/sheets";
定義
function countryShape(alpha2: string): CountryShape | undefined
引数
| 名前 | 型 | 説明 |
|---|---|---|
alpha2 | string | The two-letter code, such as |
戻り値
CountryShape | undefined
The shape, or undefined when the package has no outline for the code.
例
import { countryShape } from "@johnmorrisdotca/chikyu-earth/sheets";
const france = countryShape("FR");
console.log(france?.continent, france?.neighbours.length);europe 6出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。