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

wholeMapBoxfunction

The whole canvas as a window.

Import it

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

Definition

function wholeMapBox(map: Pick<ChizuMap, "width" | "height">): MapBox

Parameters

NameTypeDescription
mapPick<ChizuMap, "width" | "height">

The native map or map fields required by this signature; coordinates and region codes belong to its canvas.

Returns

MapBox

The whole canvas as a window.

Examples

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

console.log(wholeMapBox(WORLD));
// { x: 0, y: 0, width: 1000, height: 489 }
{ x: 0, y: 0, width: 1000, height: 489 }

What it prints (run when this page was built)

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