本文へ移動

Chizu地図

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

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

目次

リファレンス

地図・場所・クイズの要素

import { … } from "@johnmorrisdotca/chizu/element";

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

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

Browser elements for maps, located places and seeded geography questions. Importing this entry is safe on a server.

エクスポート

名前種類概要
CHIZU_ELEMENT_OPTION_KEYS定数Real host option keys, kept complete by TypeScript and checked by the builder's coverage gate.
ChizuElementOptions型Options that require host code rather than an HTML attribute.
ChizuLocatorクラス<chizu-locator>: locate a feature's id or a latitude,longitude pair, without contacting a geocoding service.
ChizuMapElementクラス<chizu-map>: a map with highlights, labels, five-shade figures and keyboard selection.
ChizuQuizクラス<chizu-quiz>: repeatable questions from a seed, native answer events and no persisted score.
defineLocator関数Register <chizu-locator> or a host's own tag; an existing definition is preserved.
defineMap関数Register <chizu-map> or a host's own tag; an existing definition is preserved.
defineQuiz関数Register <chizu-quiz> or a host's own tag; an existing definition is preserved.
loadElementMap関数Load a built-in map by world, country-<ISO> or divisions-<ISO>.
readMapColors関数Parse region colours, including native CSS colours with commas inside rgb()/hsl().
readMapData関数Parse finite choropleth figures; invalid JSON and nested or non-numeric values are rejected.

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

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