本文へ移動

Chizu地図

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

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

目次

リファレンス · 地物:country-ax

default定数

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

Named physical features and capital markers on the canvas of country-ax. Pair this layer with the map whose id matches its map field; these coordinates are not another map's coordinates.

インポート

import value from "@johnmorrisdotca/chizu/features/country-ax";

定義

const layer: ChizuFeatureLayer = { "map": "country-ax", "source": "Natural Earth 5.1.2 physical vectors, 1:10m, on the canvas of country-ax; names from Natural Earth and Wikidata", "features": [{ "code": "Q122574", "kind": "gulf", "group": "marine", "name": "Gulf of Bothnia", "nameJa": "ボスニア湾", "reading": "ぼすにあわん", "rank": 3, "path": "M-1,-1L1001,-1L1001,739L-1,739ZM330.6,500L329.7,424.3L336,388.5L355.5,372.3L388.8,362.8L407.6,373.5L432.8,371.5L473.2,285.5L461.1,257.2L425.8,243.7L415.4,217.4L364.5,167.4L330.7,160L322,170.8L302.7,170.8L274.3,162.7L239,100.4L197.9,120.6L175.3,166.4L190.6,195.6L217.3,211.9L227.9,233.5L225.1,276.8L212.5,336.9L172.9,346.2L169.2,254.3L142.4,258.2L110.8,276.3L101.5,320.9L147.3,492.1L181.6,514.6Z", "bbox": [-1, -1, 1001, 739], "centroid": [714.4, 451.4], "neighbors": [] }, { "code": "capital-AX", "kind": "capital", "group": "capitals", "name": "Mariehamn", "nameJa": "マリエハムン", "reading": "マリエハムン", "rank": 0, "path": "", "bbox": [270.9, 491.3, 270.9, 491.3], "centroid": [270.9, 491.3], "neighbors": [] }] }

メンバー

名前型説明
mapstring

The id of the map whose canvas the features are drawn on.

sourcestring

Where the shapes and names come from, in a line.

featuresChizuFeature[]

例

import layer from "@johnmorrisdotca/chizu/features/country-ax";
console.log(layer.map, layer.features.length);
// country-ax 2
country-ax 2

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

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

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