本文へ移動

Chizu地図

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

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

目次

リファレンス · サン・マルタンの輪郭

default定数

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

St. Martin, 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/mf";

定義

const map: ChizuMap = { "id": "country-mf", "kind": "country", "name": "St. Martin", "nameJa": "サン・マルタン", "regionName": "Country", "regionNamePlural": "Countries", "viewBox": "0 0 1000 686", "width": 1000, "height": 686, "wraps": false, "projection": { "kind": "azimuthal-equal-area", "centre": [-63.055071, 18.077622], "scale": 442774.37, "translate": [674.197, 344.044] }, "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": "MF", "name": "St. Martin", "nameJa": "サン・マルタン", "reading": "サンマルタン", "group": "North America", "groupJa": "北アメリカ大陸", "iso3": "MAF", "path": "M949.77,685.83L447.8,491.71L292.65,463.79L292.66,426.37L231.67,438.61L119.84,478.19L91.74,484.15L21.8,443.88L0,400.47L23.63,370.61L243.05,366.93L372.79,334.88L463.08,264.15L497.77,138.69L558.14,93.73L695.93,40.91L848.04,1.9L949.05,0L946.99,166.98L997.26,397.14L1000,628.26Z", "neighbors": ["SX"], "bbox": [0, 0, 1000, 685.83], "centroid": [674.2, 344.04] }] }

メンバー

名前型説明
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/mf";
console.log(map.id, map.kind, map.regions.length, map.viewBox);
// country-mf country 1 0 0 1000 686
country-mf country 1 0 0 1000 686

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

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

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