本文へ移動

Chizu地図

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

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

目次

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

default定数

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

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

定義

const layer: ChizuFeatureLayer = { "map": "country-lu", "source": "Natural Earth 5.1.2 physical vectors, 1:10m, on the canvas of country-lu; names from Natural Earth and Wikidata", "features": [{ "code": "ne-river-534", "kind": "river", "group": "rivers", "name": "Mosel", "rank": 7, "path": "M534.8,1001L538.7,989.2L547.3,985.1L556.4,984.9L555.8,980.5L555.8,970.5L552.9,929.2L560.2,872L560.1,828.9L565,813.8L578.3,792.8L601.2,764.3L610,745.8L616.7,735.9L619,729.7L618.1,720.7L612.7,715.5L607.1,711.6L605.5,707.1L619.1,687.8L683.7,645.4L693,635.9", "bbox": [534.8, 635.9, 693, 1001], "centroid": [575.5, 797.2], "angle": -61, "neighbors": [] }, { "code": "capital-LU", "kind": "capital", "group": "capitals", "name": "Luxembourg", "nameJa": "ルクセンブルク市", "reading": "るくせんぶるくし", "rank": 0, "path": "", "bbox": [364.9, 770.1, 364.9, 770.1], "centroid": [364.9, 770.1], "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-lu";
console.log(layer.map, layer.features.length);
// country-lu 2
country-lu 2

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

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

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