本文へ移動

Chizu地図

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

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

目次

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

default定数

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

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

定義

const layer: ChizuFeatureLayer = { "map": "country-sg", "source": "Natural Earth 5.1.2 physical vectors, 1:10m, on the canvas of country-sg; names from Natural Earth and Wikidata", "features": [{ "code": "Q205655", "kind": "strait", "group": "marine", "name": "Singapore Strait", "nameJa": "シンガポール海峡", "reading": "しんがぽーるかいきょう", "rank": 4, "path": "M739.6,89.7L488.9,3.6L178.5,69.2L26.9,339L494.7,505.1L907.3,322.9L980.1,229.6L882.5,155.2ZM-1,118.4L147.7,-1L736.8,-1L757.1,5.1L815.4,-1L1001,-1L1001,509L-1,509Z", "bbox": [-1, -1, 1001, 509], "centroid": [909.4, 419.4], "neighbors": [] }, { "code": "Q18758", "kind": "peninsula", "group": "landforms", "name": "Malay Peninsula", "nameJa": "マレー半島", "reading": "まれーはんとう", "rank": 2, "path": "M816.9,-1L756.8,5.4L735.8,-1ZM146.9,-1L-1,118.4L-1,-1ZM27,339.2L178.7,69.4L489.1,4.3L739.8,90L882.7,155.4L980.6,229.8L907.2,322.9L494.5,504.9Z", "bbox": [-1, -1, 980.6, 504.9], "centroid": [479.2, 250], "neighbors": [] }, { "code": "ne-1159105879", "kind": "peak", "group": "peaks", "name": "Bukit Timah", "nameJa": "ブキット・ティマ丘陵", "rank": 9, "elevation": 176, "path": "", "bbox": [412, 271.8, 412, 271.8], "centroid": [412, 271.8], "neighbors": [] }, { "code": "capital-SG", "kind": "capital", "group": "capitals", "name": "Singapore", "nameJa": "シンガポール", "reading": "シンガポール", "rank": 0, "path": "", "bbox": [439.7, 409.5, 439.7, 409.5], "centroid": [439.7, 409.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-sg";
console.log(layer.map, layer.features.length);
// country-sg 4
country-sg 4

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

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

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