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 · Interactive maps

ensureChizuMapStylefunction

Put the style in the page once: in the document's head, or in the shadow root the host is in.

Import it

import { ensureChizuMapStyle } from "@johnmorrisdotca/chizu/mount";

Definition

function ensureChizuMapStyle(host: Element): void

Parameters

NameTypeDescription
hostElement

The page or shadow-root element that receives the native map and its scoped styles.

Examples

import { ensureChizuMapStyle } from "@johnmorrisdotca/chizu/mount";

// Put the mounted map's stylesheet in the page (or the shadow root) once, before drawing into it yourself.
ensureChizuMapStyle(document.body);

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