本文へ移動

Chizu地図

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

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

目次

リファレンス · サンマリノの輪郭

default定数

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

San Marino, 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/sm";

定義

const map: ChizuMap = { "id": "country-sm", "kind": "country", "name": "San Marino", "nameJa": "サンマリノ", "regionName": "Country", "regionNamePlural": "Countries", "viewBox": "0 0 849 1000", "width": 849, "height": 1000, "wraps": false, "projection": { "kind": "azimuthal-equal-area", "centre": [12.442216, 43.936462], "scale": 632981.96, "translate": [450.27, 509.429] }, "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": "SM", "name": "San Marino", "nameJa": "サンマリノ", "reading": "サンマリノ", "group": "Europe", "groupJa": "ヨーロッパ", "iso3": "SMR", "path": "M348.63,1000L110.9,876.61L0,641.05L79.92,377.34L202.42,253.09L284.67,169.62L538.58,38.89L767.8,0L823.72,104.45L849.31,288.83L832.98,479.52L775.51,589.52L768.09,603.73L747.54,627.15L735.22,655.7L731,690.67L737.32,723.95L595.48,964.61Z", "neighbors": ["IT"], "bbox": [0, 0, 849.31, 1000], "centroid": [450.27, 509.43] }] }

メンバー

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

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

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

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