リファレンス
地図と地物を読み込む
import { … } from "@johnmorrisdotca/chizu/load";
最小化と gzip 圧縮をしたサイズは 6614.0 kB(読み込むものをすべて含み、esbuild で計測)
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Loading a map by name, one country at a time: loadCountry("fr") is France alone, loadDivisions("fr") its
départements. Each is a dynamic import of a file of its own, so a bundler makes a chunk for each and a page fetches
only the ones it draws.
エクスポート
| 名前 | 種類 | 概要 |
|---|---|---|
COUNTRY_CODES | 定数 | Every country that has a map of its own, by code, upper or lower case. |
DIVISIONS_CODES | 定数 | Every country that has a map of its own regions (provinces, states, départements), by code. |
FEATURE_MAPS | 定数 | The ids of every map that has named features of its own: the world, and each country alone or by its regions whose canvas holds a sea, a lake, a river, a landform or a peak big enough to see. |
loadCountry | 関数 | One country alone, drawn from Natural Earth's 1:50m countries (the small ones from 1:10m); null for a code with no map. |
loadDivisions | 関数 | The regions of one country, from Natural Earth's 1:10m states and provinces; null for a country that has none. |
loadFeatures | 関数 | The named features of a map (its seas, lakes, rivers, landforms and peaks), drawn on its own canvas, by the map or its id: a file of its own, fetched only when asked for. |
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. |
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。