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 · Framing, geometry and quiz tools

InsetTransformtype

What to do to a region's own geometry to seat it in its box: a scale, and a move.

Import it

import type { InsetTransform } from "@johnmorrisdotca/chizu";

Definition

type InsetTransform = {
    scale: number;
    x: number;
    y: number;
};

Members

NameTypeDescription
scalenumber
xnumber
ynumber

Examples

import { insetTransformAttribute, type InsetTransform } from "@johnmorrisdotca/chizu";

const move: InsetTransform = { scale: 0.5, x: 20, y: 610 };
console.log(insetTransformAttribute(move));
// translate(20 610) scale(0.5)
translate(20 610) scale(0.5)

What it prints (run when this page was built)

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