WORLD_GEO定数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The world, every country a region, as longitude and latitude in degrees.
インポート
import { WORLD_GEO } from "@johnmorrisdotca/chizu/world-geo";
定義
const WORLD_GEO: WorldGeo
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
type | "FeatureCollection" | |
features | { type: "Feature"; properties: { code: string; name: string; nameJa: string; iso3: string; group: string; groupJa?: string; }; geometry: { type: string; coordinates: unknown; }; }[] | |
source | string |
例
import WORLD_GEO from "@johnmorrisdotca/chizu/world-geo";
const japan = WORLD_GEO.features.find((feature) => feature.properties.code === "JP")!;
console.log(WORLD_GEO.features.length, japan.properties.code, japan.properties.name, japan.properties.nameJa);
// 177 JP Japan 日本177 JP Japan 日本出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。