本文へ移動

Chizu地図

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

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

目次

リファレンス · キュラソーの輪郭

default定数

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

Curaçao, alone: Natural Earth 5.1.2 admin-0 countries, 1:10m, Lambert azimuthal equal-area centred on the country, longer side 1000. The native map geometry, region identifiers, names, projection and insets; coordinates belong to this canvas.

インポート

import value from "@johnmorrisdotca/chizu/countries/cw";

定義

const map: ChizuMap = { "id": "country-cw", "kind": "country", "name": "Curaçao", "nameJa": "キュラソー", "regionName": "Country", "regionNamePlural": "Countries", "viewBox": "0 0 1000 829", "width": 1000, "height": 829, "wraps": false, "projection": { "kind": "azimuthal-equal-area", "centre": [-68.97123, 12.193815], "scale": 135694.14, "translate": [463.834, 468.347] }, "insets": [], "source": "Natural Earth 5.1.2 admin-0 countries, 1:10m, Lambert azimuthal equal-area centred on the country, longer side 1000", "regions": [{ "code": "CW", "name": "Curaçao", "nameJa": "キュラソー", "reading": "キュラソー", "group": "North America", "groupJa": "北アメリカ大陸", "iso3": "CUW", "path": "M904.93,695.58L987.26,779.74L1000,801.5L979.37,815.78L930.28,825.56L872.6,829.35L826.14,825.05L765.05,795.88L644.02,712.95L525.2,677.22L448.68,632.32L380.01,576.42L350.34,525.34L334.24,477.16L296.29,461.54L251.64,457.38L215.29,443.59L184.51,406.57L113.37,290.12L86.26,270.45L54.54,253.66L28.1,232.44L17.1,200.25L22.53,115.25L18.32,70.15L0,29.86L13,8.66L24.4,0L35.88,2.13L48.86,13.7L147.95,56.16L190.02,82.1L231.8,118.84L257.49,163.37L281.65,273.42L302.92,320.94L387.94,402.38L486.84,450.48L778.58,522.19L812.13,542.79L825.99,572.95L832.9,620.94L851,650.12Z", "neighbors": [], "bbox": [0, 0, 1000, 829.35], "centroid": [463.83, 468.35] }] }

メンバー

名前型説明
idstring

world, country-fr (France alone, from Natural Earth's countries) or divisions-fr (its départements).

kind"world" | "country" | "divisions" | "local"

What its regions are: the whole world, a single country, the divisions of one, or the shapes of a local map of a city or a venue.

namestring

The map's name in English and Japanese.

nameJa (省略可)string | undefined
regionNamestring

What a region is called here, singular and plural, in English: Country, Province.

regionNamePluralstring
viewBoxstring

The canvas: 0 0 width height.

widthnumber
heightnumber
wrapsboolean

Whether its east edge is its west edge: a map of the earth is a cylinder cut open, and pans round without stopping.

projectionChizuProjection
insetsChizuInset[]

The regions drawn in boxes of their own.

sourcestring

Where the outlines come from, in a line.

regionsChizuRegion[]

例

import map from "@johnmorrisdotca/chizu/countries/cw";
console.log(map.id, map.kind, map.regions.length, map.viewBox);
// country-cw country 1 0 0 1000 829
country-cw country 1 0 0 1000 829

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

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

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