本文へ移動

Chizu地図

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

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

目次

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

default定数

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

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

定義

const layer: ChizuFeatureLayer = { "map": "country-bn", "source": "Natural Earth 5.1.2 physical vectors, 1:10m, on the canvas of country-bn; names from Natural Earth and Wikidata", "features": [{ "code": "Q37660", "kind": "sea", "group": "marine", "name": "South China Sea", "nameJa": "南シナ海", "reading": "みなみしなかい", "rank": 1, "path": "M1001,92.6L837.6,116L754.5,116.1L769.6,69.7L770,30L731.5,25.7L617.8,81.8L544.8,129.8L475.3,191L400.7,245.1L312.5,292.2L220.8,331.6L131.5,343.2L40.2,341.9L9.9,354.8L-1,366.3L-1,-1L1001,-1Z", "bbox": [-1, -1, 1001, 366.3], "centroid": [168.3, 168.3], "neighbors": [] }, { "code": "capital-BN", "kind": "capital", "group": "capitals", "name": "Bandar Seri Begawan", "nameJa": "バンダルスリブガワン", "reading": "バンダルスリブガワン", "rank": 0, "path": "", "bbox": [676.2, 101.1, 676.2, 101.1], "centroid": [676.2, 101.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-bn";
console.log(layer.map, layer.features.length);
// country-bn 2
country-bn 2

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

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

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