Skip to the content

Chizu地図

Draw SVG maps of the world, its 253 countries and the regions of 33 of them, frame them, place numbered callouts and build geography quizzes, with names in English and Japanese today (Spanish, German and Chinese are planned).

Chizu is the Japanese word 地図 for map. About the name

Contents

Reference

/cities

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

1565.2 kB minified and gzipped, with everything it imports (measured with esbuild)

The world's cities for Chizu's city layer, from kuni: its own entry (@johnmorrisdotca/chizu/cities), the one part of Chizu that needs @johnmorrisdotca/kuni (an optional peer, 1.6.0 or later). A page that names no cities never loads it, and one that has its own list passes that to drawChizu's cities instead.

Exports

NameKindWhat it is
CHIZU_CITY_TIERSconstantThe tiers loaded when none are asked for: every capital and every city of 100,000 people or more, about 9,000 cities.
ChizuCitytypeOne city as the layer reads it: the fields of kuni's City that a map needs, so a kuni city is one as it is.
ChizuCityOptionstypeHow the city layer is drawn: drawChizu's cityOptions.
ChizuCityPlacedtypeA city placeCities named: where its dot is on the canvas, the name printed and the side of the dot it is on.
loadKuniCitiesfunctionKuni's cities, each once, ready for drawChizu's cities: the tiers asked for (capitals, 1m, 100k, 15k), or CHIZU_CITY_TIERS.

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/chizu 1.17.0.