ChizuViewtype
Where a mounted map is looking.
Import it
import type { ChizuView } from "@johnmorrisdotca/chizu/mount";
Definition
type ChizuView = {
zoom: MapZoom;
centre: {
x: number;
y: number;
};
box: MapBox;
};
Members
| Name | Type | Description |
|---|---|---|
zoom | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | |
centre | { x: number; y: number; } | |
box | MapBox |
Examples
import WORLD from "@johnmorrisdotca/chizu/world";
import { mountChizu, type ChizuView } from "@johnmorrisdotca/chizu/mount";
const mount = mountChizu(document.querySelector<HTMLElement>("#map")!, { map: WORLD });
const view: ChizuView = mount.view();
console.log(view.zoom, view.box);