loadWorldDetail関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The world drawn finer: the same 173 countries on the same canvas, in the same projection, from Natural Earth's
1:50m outlines rather than its 1:110m ones, about 1.3 MB. For mountChizu's detail, which draws it from the
fourth zoom step in, where the coarse coasts would look angular; everything else (framing, quizzes, callouts) keeps
to the world itself, whose codes, names and neighbours it shares.
インポート
import { loadWorldDetail } from "@johnmorrisdotca/chizu/load";
定義
function loadWorldDetail(): Promise<ChizuMap>
戻り値
Promise<ChizuMap>
The finer world map with the same canvas and country codes as the coarse world map.
例
import { loadWorldDetail } from "@johnmorrisdotca/chizu/load";
import WORLD from "@johnmorrisdotca/chizu/world";
const detail = await loadWorldDetail();
const japan = (map: typeof WORLD) => map.regions.find((region) => region.code === "JP")!.path.length;
console.log(detail.id, japan(detail) > japan(WORLD) * 3);
// world-detail trueworld-detail true出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。