本文へ移動

Chizu地図

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

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

目次

リファレンス · アルバの輪郭

default定数

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

Aruba, 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/aw";

定義

const map: ChizuMap = { "id": "country-aw", "kind": "country", "name": "Aruba", "nameJa": "アルバ", "regionName": "Country", "regionNamePlural": "Countries", "viewBox": "0 0 845 1000", "width": 845, "height": 1000, "wraps": false, "projection": { "kind": "azimuthal-equal-area", "centre": [-69.974184, 12.516931], "scale": 267144.84, "translate": [401.526, 537.252] }, "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": "AW", "name": "Aruba", "nameJa": "アルバ", "reading": "アルバ", "group": "North America", "groupJa": "北アメリカ大陸", "iso3": "ABW", "path": "M297.98,254.46L573.54,468.27L626.89,526.5L667.47,630.08L829.43,832.65L844.86,954.64L793.54,1000L699.24,999.46L600.29,961.34L533.77,894.19L626.96,894.18L626.95,862.31L472.63,787.77L158.13,509.24L65.17,470.89L19.61,442.8L0,397.83L9.27,350.59L51.52,270.92L62.27,225.77L44.52,149.88L12.7,83.46L6.05,31.48L62.34,0L251.51,217.46Z", "neighbors": [], "bbox": [0, 0, 844.85, 1000], "centroid": [401.53, 537.25] }] }

メンバー

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

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

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

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