本文へ移動

Chizu地図

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

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

目次

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

default定数

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

Named physical features and capital markers on the canvas of country-mk. 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-mk";

定義

const layer: ChizuFeatureLayer = { "map": "country-mk", "source": "Natural Earth 5.1.2 physical vectors, 1:10m, on the canvas of country-mk; names from Natural Earth and Wikidata", "features": [{ "code": "Q213975", "kind": "river", "group": "rivers", "name": "Drin", "nameJa": "ドリン川", "reading": "どりんがわ", "rank": 9, "path": "M90.5,619L90.2,609.9L86.1,596.7L85.2,588.3L83.5,582.7L68.1,563.5L66.8,560L68.5,556.2L72.8,549.5L74.6,545.5L64.7,522.5L60.7,518.6L55.4,511.8L45.3,482.3L35,473.9L30.4,464.1L27.8,460.3L25.9,456.5L22.7,454L19.5,452.6L12.5,451.7L9.3,449.9L7.9,447.6L6.1,441.8L4.1,439.1L4.1,435.2L8.8,429.2L6.5,420.6L1.8,410.9L-0.7,401.5L0,393.1L-1,391.6", "bbox": [-1, 391.6, 90.5, 619], "centroid": [51.5, 500.3], "angle": 61, "neighbors": [] }, { "code": "capital-MK", "kind": "capital", "group": "capitals", "name": "Skopje", "nameJa": "スコピエ", "reading": "スコピエ", "rank": 0, "path": "", "bbox": [385.5, 193.8, 385.5, 193.8], "centroid": [385.5, 193.8], "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-mk";
console.log(layer.map, layer.features.length);
// country-mk 2
country-mk 2

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

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

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