本文へ移動

Chizu地図

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

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

目次

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

default定数

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

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

定義

const layer: ChizuFeatureLayer = { "map": "country-qa", "source": "Natural Earth 5.1.2 physical vectors, 1:10m, on the canvas of country-qa; names from Natural Earth and Wikidata", "features": [{ "code": "Q34675", "kind": "gulf", "group": "marine", "name": "Persian Gulf", "nameJa": "ペルシア湾", "reading": "ぺるしあわん", "rank": 1, "path": "M374.9,1001L373.6,993.1L332.1,997.1L292.1,970.4L365.1,946.8L382.8,932.2L442.6,792.9L472.7,746.5L484.9,691.6L480.8,632L457.8,546.8L434,481L428.5,442L414.4,396.8L437.4,298.5L462.9,236.6L446.3,160.9L359.6,93L288.2,4.4L201.8,49.7L142.9,111.5L86.7,272.4L66.6,341.8L29.4,414.2L6.9,446.8L2,474.9L14.4,613.9L53.2,794.5L47.1,818.3L29,856.3L-1,822.6L-1,-1L490,-1L490,1001Z", "bbox": [-1, -1, 490, 1001], "centroid": [75.7, 75.7], "neighbors": [] }, { "code": "Q31945", "kind": "peninsula", "group": "landforms", "name": "Arabian Peninsula", "nameJa": "アラビア半島", "reading": "あらびあはんとう", "rank": 1, "path": "M-1,822.5L29,856.4L47,818.2L53.2,794.4L45.8,759.9L72.7,697.4L76.6,572.6L70.7,440.6L78.8,331.6L102.9,241L141.2,130.2L167.8,85.4L201.8,49.7L286.5,5.2L290.8,7.3L359.6,93L446.3,160.8L462.9,236.6L437.6,298.5L414.4,396.9L428.5,442.1L433.8,481.2L457.7,546.9L480.8,632.2L485,691.6L472.7,746.6L442.5,792.9L382.9,932.2L365.1,946.7L292.1,970.4L332.2,997.2L373.5,993.1L374.8,1001L-1,1001Z", "bbox": [-1, 5.2, 485, 1001], "centroid": [278.1, 667.8], "neighbors": [] }, { "code": "capital-QA", "kind": "capital", "group": "capitals", "name": "Doha", "nameJa": "ドーハ", "reading": "ドーハ", "rank": 0, "path": "", "bbox": [439.9, 543.5, 439.9, 543.5], "centroid": [439.9, 543.5], "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-qa";
console.log(layer.map, layer.features.length);
// country-qa 3
country-qa 3

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

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

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