本文へ移動

Chizu地図

世界、253の国、33か国の州や県などの地域を、SVGの地図に描けます。表示する範囲を決めたり、番号付きの注記をつけたり、地理クイズを作ったりもできます。名前は今のところ英語と日本語で、スペイン語、ドイツ語、中国語にも対応する予定です。

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

目次

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

default定数

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

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

定義

const layer: ChizuFeatureLayer = {
    map: "country-gi",
    source: "Natural Earth 5.1.2 physical vectors, 1:10m, on the canvas of country-gi; names from Natural Earth and Wikidata",
    features: [
        {
            code: "Q199408",
            kind: "sea",
            group: "marine",
            name: "Alboran Sea",
            nameJa: "アルボラン海",
            reading: "あるぼらんかい",
            rank: 7,
            path: "M-1,-1L518,-1L518,1001L-1,1001Z",
            bbox: [-1, -1, 518, 1001],
            centroid: [258.5, 500],
            neighbors: [],
        },
        {
            code: "ne-1159105973",
            kind: "peak",
            group: "peaks",
            name: "Rock of Gibraltar",
            nameJa: "ジブラルタルの岩",
            rank: 9,
            elevation: 426,
            path: "",
            bbox: [485, 360.3, 485, 360.3],
            centroid: [485, 360.3],
            neighbors: [],
        },
        {
            code: "capital-GI",
            kind: "capital",
            group: "capitals",
            name: "Gibraltar",
            nameJa: "ジブラルタル",
            reading: "ジブラルタル",
            rank: 0,
            path: "",
            bbox: [221.2, 36.6, 221.2, 36.6],
            centroid: [221.2, 36.6],
            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-gi";
console.log(layer.map, layer.features.length);
// country-gi 3
country-gi 3

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

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

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