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

DISTRACTOR_SCORESconstant

What makes one place on a map a convincing wrong answer for another.

Somewhere on the far side of the map is never tempting, so the choices are drawn from the target's own corner of it: land neighbours first, then its group (the continent, or the larger part of the country), then whatever is nearest. It also keeps a "find it" board legible, since the choices are places on one map and clustered ones stay readable. The rule is the same wherever the map is: Japan's prefectures, Brazil's states, the countries of the world.

Import it

import { DISTRACTOR_SCORES } from "@johnmorrisdotca/chizu";

Definition

const DISTRACTOR_SCORES: { readonly neighbor: 100; readonly group: 60; readonly proximity: 40; } = {
    neighbor: 100,
    group: 60,
    proximity: 40,
} as const

Members

NameTypeDescription
neighbor100
group60
proximity40

Examples

import { DISTRACTOR_SCORES } from "@johnmorrisdotca/chizu";

console.log(DISTRACTOR_SCORES);
// { neighbor: 100, group: 60, proximity: 40 }
{ neighbor: 100, group: 60, proximity: 40 }

What it prints (run when this page was built)

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