ChizuView型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Where a mounted map is looking.
インポート
import type { ChizuView } from "@johnmorrisdotca/chizu/mount";
定義
type ChizuView = {
zoom: MapZoom;
centre: {
x: number;
y: number;
};
box: MapBox;
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
zoom | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | |
centre | { x: number; y: number; } | |
box | MapBox |
例
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);この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。