本文へ移動

Chizu地図

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

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

目次

リファレンス · グアムの輪郭

default定数

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

Guam, 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/gu";

定義

const map: ChizuMap = { "id": "country-gu", "kind": "country", "name": "Guam", "nameJa": "グアム", "regionName": "Country", "regionNamePlural": "Countries", "viewBox": "0 0 772 1000", "width": 772, "height": 1000, "wraps": false, "projection": { "kind": "azimuthal-equal-area", "centre": [144.771881, 13.443761], "scale": 138697.69, "translate": [347.725, 509.279] }, "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": "GU", "name": "Guam", "nameJa": "グアム", "reading": "グアム", "group": "Oceania", "groupJa": "オセアニア", "iso3": "GUM", "path": "M617.14,33.68L641.29,87.45L682.85,117.86L730.15,131.33L771.32,134.35L771.92,162.72L737.88,226.47L665.74,332.7L583.02,408.98L433.42,504.37L374.99,565.64L341.83,665.72L319.98,892.07L262.25,980.32L220.83,998.04L172.5,1000L132.81,986.1L108.67,942.35L76.48,900.68L69,888.66L54.67,796.94L47.2,780.69L35.9,766.5L22.11,755.26L4.86,747.37L29.03,723.06L44.37,698.14L52.44,667.22L54.76,624.28L50.17,604.28L38.3,579.35L24.9,558.17L0,539.53L10.55,521.22L28.95,510.79L38.71,523.6L71.29,520.37L213.48,437.38L246.24,408.03L374.97,332.79L400.06,307.57L421.51,278.41L440.28,243.34L489.65,81.01L504.76,51.75L532.52,25.15L570.79,2.67L603.53,0Z", "neighbors": [], "bbox": [0, 0, 771.92, 1000], "centroid": [347.73, 509.28] }] }

メンバー

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

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

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

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