default定数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Singapore, alone: Natural Earth 5.1.2 admin-0 countries, 1:10m, Lambert azimuthal equal-area centred on the country, longer side 1000. The native map geometry, region identifiers, names, projection and insets; coordinates belong to this canvas.
インポート
import value from "@johnmorrisdotca/chizu/countries/sg";
定義
const map: ChizuMap = { "id": "country-sg", "kind": "country", "name": "Singapore", "nameJa": "シンガポール", "regionName": "Country", "regionNamePlural": "Countries", "viewBox": "0 0 1000 508", "width": 1000, "height": 508, "wraps": false, "projection": { "kind": "azimuthal-equal-area", "centre": [103.813468, 1.358922], "scale": 157866.95, "translate": [476.75, 247.187] }, "insets": [], "source": "Natural Earth 5.1.2 admin-0 countries, 1:10m, Lambert azimuthal equal-area centred on the country, longer side 1000", "regions": [{ "code": "SG", "name": "Singapore", "nameJa": "シンガポール", "reading": "シンガポール", "group": "Asia", "groupJa": "アジア", "iso3": "SGP", "path": "M882.53,158.52L951.13,174.1L989.24,188.22L1000,205.15L968.17,258.18L921.33,314.57L864.84,359.65L802.97,377.93L735.05,385.44L681.25,406.07L584.85,472.11L568.94,486.91L561.09,496.33L546.75,502.49L511.33,507.87L444.08,506.53L410.9,498.01L396.77,481.53L373.24,443.74L316.08,417.51L247.26,401.47L188.3,395.08L68.59,398.21L19.95,386.33L0,348.21L11.89,304.71L94.16,188.23L106.04,136.1L119.72,106.72L150.66,75.22L187.19,53.02L213.65,48.65L273.72,56.5L335.59,48.65L412.25,12L453.27,0L526.57,4.26L597.17,27.35L804.53,130.94Z", "neighbors": [], "bbox": [0, 0, 1000, 507.87], "centroid": [476.75, 247.19] }] }
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
id | string |
|
kind | "world" | "country" | "divisions" | "local" | What its regions are: the whole |
name | string | The map's name in English and Japanese. |
nameJa (省略可) | string | undefined | |
regionName | string | What a region is called here, singular and plural, in English: |
regionNamePlural | string | |
viewBox | string | The canvas: |
width | number | |
height | number | |
wraps | boolean | Whether its east edge is its west edge: a map of the earth is a cylinder cut open, and pans round without stopping. |
projection | ChizuProjection | |
insets | ChizuInset[] | The regions drawn in boxes of their own. |
source | string | Where the outlines come from, in a line. |
regions | ChizuRegion[] |
例
import map from "@johnmorrisdotca/chizu/countries/sg";
console.log(map.id, map.kind, map.regions.length, map.viewBox);
// country-sg country 1 0 0 1000 508country-sg country 1 0 0 1000 508出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。