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

PastedPlacestype

Matched native places in paste order and the original text items that were not found.

Import it

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

Definition

type PastedPlaces = {
    codes: string[];
    missing: string[];
};

Members

NameTypeDescription
codesstring[]

The region codes found, in the order they were written, each once.

missingstring[]

The lines that matched nothing, said back rather than dropped.

Examples

import WORLD from "@johnmorrisdotca/chizu/world";
import { placesFromText, type PastedPlaces } from "@johnmorrisdotca/chizu";

const found: PastedPlaces = placesFromText("Japan\nAtlantis", WORLD.regions);
console.log(found.codes, found.missing);
// [ 'JP' ] [ 'Atlantis' ]
[ 'JP' ] [ 'Atlantis' ]

What it prints (run when this page was built)

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