本文へ移動

Chizu地図

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

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

目次

リファレンス · リヒテンシュタインの輪郭

default定数

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

Liechtenstein, 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/li";

定義

const map: ChizuMap = { "id": "country-li", "kind": "country", "name": "Liechtenstein", "nameJa": "リヒテンシュタイン", "regionName": "Country", "regionNamePlural": "Countries", "viewBox": "0 0 452 1000", "width": 452, "height": 1000, "wraps": false, "projection": { "kind": "azimuthal-equal-area", "centre": [9.540922, 47.138158], "scale": 272317.09, "translate": [210.519, 592.415] }, "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": "LI", "name": "Liechtenstein", "nameJa": "リヒテンシュタイン", "reading": "リヒテンシュタイン", "group": "Europe", "groupJa": "ヨーロッパ", "iso3": "LIE", "path": "M146.76,0L176.09,43.48L230.44,93.95L208.76,160.15L223.11,201.9L253.81,243.28L281.52,309.22L278.2,343.12L246.16,414.6L246.5,455.85L342.71,512.8L419.63,620.33L452.5,741.51L430.2,865.07L340.95,978.73L274.36,1000L76.58,966.94L3.64,945.28L0,900.94L37.84,850L87.37,798.94L118.16,735.59L116.52,634.16L89.49,558L54.45,489.46L29.79,410.85L37.58,250.84L93.38,90.61Z", "neighbors": ["AT", "CH"], "bbox": [0, 0, 452.5, 1000], "centroid": [210.52, 592.41] }] }

メンバー

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

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

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

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