本文へ移動

Chizu地図

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

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

目次

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

default定数

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

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

定義

const layer: ChizuFeatureLayer = { "map": "country-xk", "source": "Natural Earth 5.1.2 physical vectors, 1:10m, on the canvas of country-xk; names from Natural Earth and Wikidata", "features": [{ "code": "Q189915", "kind": "range", "group": "landforms", "name": "Dinaric Alps", "nameJa": "ディナル・アルプス山脈", "reading": "でぃなるあるぷすさんみゃく", "rank": 4, "path": "M825.7,-1L828.1,10.8L835.9,121.8L819.9,217.2L790.8,269.6L749.1,321.4L620.8,455.5L595.1,473.7L571.4,478.2L529.2,453.9L448.5,372.7L401.2,348.6L326.7,349.3L266.6,378.9L-1,639.6L-1,-1Z", "bbox": [-1, -1, 835.9, 639.6], "centroid": [572, 206.7], "neighbors": [] }, { "code": "Q179251", "kind": "river", "group": "rivers", "name": "Morava", "nameJa": "モラヴァ川", "reading": "もらゔぁがわ", "rank": 7, "path": "M685.9,719.1L687.3,701.5L692.1,681.1L696.4,638.5L691.8,627.2L695.9,620.4L732.4,606.9L740.4,601.1L748,592.5L762.4,579.4L816.9,560.7L808.3,541.9L816.6,526.3L833.9,518.2L852.1,521.8L861.1,532.6L862.9,533.3L864.2,534.4L869.7,547.7L870.4,550.5L878,554.2L887.6,555.1L897.5,553.5L906.3,550.2L907,550.3", "bbox": [685.9, 518.2, 907, 719.1], "centroid": [774.5, 575.3], "angle": -27, "neighbors": [] }, { "code": "Q341983", "kind": "peak", "group": "peaks", "name": "Đeravica", "nameJa": "ジェラヴィツァ", "reading": "ジェラヴィツァ", "rank": 9, "elevation": 2656, "path": "", "bbox": [58.5, 515, 58.5, 515], "centroid": [58.5, 515], "neighbors": [] }, { "code": "capital-XK", "kind": "capital", "group": "capitals", "name": "Pristina", "nameJa": "プリシュティナ", "reading": "プリシュティナ", "rank": 0, "path": "", "bbox": [593.1, 417.7, 593.1, 417.7], "centroid": [593.1, 417.7], "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-xk";
console.log(layer.map, layer.features.length);
// country-xk 4
country-xk 4

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

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

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