Skip to the content

Chizu地図

Draw SVG maps, frame regions, place numbered callouts and build geography quizzes with English and Japanese names.

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

Contents

Reference · Load maps and features

loadWorldDetailfunction

The world drawn finer: the same 173 countries on the same canvas, in the same projection, from Natural Earth's 1:50m outlines rather than its 1:110m ones, about 1.3 MB. For mountChizu's detail, which draws it from the fourth zoom step in, where the coarse coasts would look angular; everything else (framing, quizzes, callouts) keeps to the world itself, whose codes, names and neighbours it shares.

Import it

import { loadWorldDetail } from "@johnmorrisdotca/chizu/load";

Definition

function loadWorldDetail(): Promise<ChizuMap>

Returns

Promise<ChizuMap>

The finer world map with the same canvas and country codes as the coarse world map.

Examples

import { loadWorldDetail } from "@johnmorrisdotca/chizu/load";
import WORLD from "@johnmorrisdotca/chizu/world";

const detail = await loadWorldDetail();
const japan = (map: typeof WORLD) => map.regions.find((region) => region.code === "JP")!.path.length;
console.log(detail.id, japan(detail) > japan(WORLD) * 3);
// world-detail true
world-detail true

What it prints (run when this page was built)

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