本文へ移動

Chizu地図

SVGの地図を描き、地域を表示範囲に収め、番号付きの注記や地理クイズを英語と日本語の名前で作れます。

「地図」は、土地や場所を図で表したものです。 名前について(英語)

目次

リファレンス · セントルシアの輪郭

default定数

リファレンスの説明と例は英語です。見出しと目次は日本語です。

St. Lucia, 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/lc";

定義

const map: ChizuMap = { "id": "country-lc", "kind": "country", "name": "St. Lucia", "nameJa": "セントルシア", "regionName": "Country", "regionNamePlural": "Countries", "viewBox": "0 0 478 1000", "width": 478, "height": 1000, "wraps": false, "projection": { "kind": "azimuthal-equal-area", "centre": [-60.970328, 13.90264], "scale": 144242.26, "translate": [264.423, 526.779] }, "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": "LC", "name": "St. Lucia", "nameJa": "セントルシア", "reading": "セントルシア", "group": "North America", "groupJa": "北アメリカ大陸", "iso3": "LCA", "path": "M468.47,256.27L477.85,330.43L477.67,396.4L448.31,590.43L455.4,701.57L425.1,824.81L418.54,842.23L411.18,845.3L380.53,853.91L370.09,860.88L358.75,885.06L336.68,981.25L321.45,995.9L313.89,1000L301.75,1000L256.96,938.74L74.1,867.42L33.12,818.03L25.37,804.81L10.45,788.31L0.91,769.25L17.94,729.82L20.63,704.32L17.97,654.73L14.1,638.55L7.14,625.84L0.98,609.86L0,584.25L6.38,557.62L28.47,510.71L33.25,489.82L46.59,454.79L105.07,369.99L126.96,313.45L186.41,223.42L199.13,213.28L222.99,199.76L235.11,187.67L240.88,172.1L250.42,127.64L260.15,110.23L319.87,24.18L354.44,0L401.63,15.56L390.71,59L407.01,81.53L433.64,96.89L453.32,118.81L460.09,150.15Z", "neighbors": [], "bbox": [0, 0, 477.84, 1000], "centroid": [264.42, 526.78] }] }

メンバー

名前型説明
idstring

world, country-fr (France alone, from Natural Earth's countries) or divisions-fr (its départements).

kind"world" | "country" | "divisions" | "local"

What its regions are: the whole world, a single country, the divisions of one, or the shapes of a local map of a city or a venue.

namestring

The map's name in English and Japanese.

nameJa (省略可)string | undefined
regionNamestring

What a region is called here, singular and plural, in English: Country, Province.

regionNamePluralstring
viewBoxstring

The canvas: 0 0 width height.

widthnumber
heightnumber
wrapsboolean

Whether its east edge is its west edge: a map of the earth is a cylinder cut open, and pans round without stopping.

projectionChizuProjection
insetsChizuInset[]

The regions drawn in boxes of their own.

sourcestring

Where the outlines come from, in a line.

regionsChizuRegion[]

例

import map from "@johnmorrisdotca/chizu/countries/lc";
console.log(map.id, map.kind, map.regions.length, map.viewBox);
// country-lc country 1 0 0 478 1000
country-lc country 1 0 0 478 1000

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/chizu 1.5.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。