本文へ移動

Chizu地図

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

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

目次

リファレンス

/divisions-geo

import { … } from "@johnmorrisdotca/chizu/divisions-geo";

最小化と gzip 圧縮をしたサイズは 1076.3 kB(読み込むものをすべて含み、esbuild で計測)

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

The regions of the 33 countries that have them, each as longitude and latitude in degrees (Natural Earth admin-1, 1:10m, simplified), for a globe or any spherical view: no projection, no boxes, and the border two regions share is the same list of points in both. Its own entry, and each country its own file behind a dynamic import, so a page pays only for the countries it loads. gb-2025 is the United Kingdom's councils of 2025 from the ONS, beside gb.

エクスポート

名前種類概要
ChizuGeoCollection型A map as longitude and latitude: the regions of one country, or the countries of the world, as a GeoJSON FeatureCollection with no projection.
ChizuGeoFeature型One region or country as a GeoJSON feature, in WGS84 [longitude, latitude] degrees: a Polygon or MultiPolygon.
ChizuGeoProperties型The properties of one feature of a map in longitude and latitude: a region's code (the same as in the flat map of the same country) and its ISO 3166-2 code, iso, where it has one, its names in English and Japanese; a country of the world also has iso3 and its larger part of the world, group and groupJa.
DIVISIONS_GEO_CODES定数Every map of a country's regions as longitude and latitude, by code: the country's for the 33 countries that have one, and VN-2025 and GB-2025 for Vietnam's and the United Kingdom's of 2025, as in DIVISIONS_CODES.
loadDivisionsGeo関数One country's regions as longitude and latitude, loaded on demand (the file for that country only); null for a code with no regions.

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

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