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

mapWrapsAroundfunction

Whether this map's east and west edges are the same edge.

Import it

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

Definition

function mapWrapsAround(map: Pick<ChizuMap, "wraps">): boolean

Parameters

NameTypeDescription
mapPick<ChizuMap, "wraps">

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

Returns

boolean

Whether this map's east and west edges are the same edge.

Examples

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

console.log(mapWrapsAround(WORLD), mapWrapsAround((await loadCountry("fr"))!));
// true false
true false

What it prints (run when this page was built)

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