GlobeOptions型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
What globe() may be asked.
インポート
import type { GlobeOptions } from "@johnmorrisdotca/chikyu-earth";
定義
interface GlobeOptions {
size?: number;
rotation?: Rotation;
centre?: GeoPoint;
view?: GlobeView;
style?: StyleName;
graticule?: boolean;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
size (省略可) | number | undefined | Width and height of the square SVG, in pixels. Default 320. |
rotation (省略可) | Rotation | undefined | The turn, as [lambda, phi]. Default [0, 0]: the Greenwich meridian facing you, on the equator. |
centre (省略可) | GeoPoint | undefined | A home centre and shared view state. When |
view (省略可) | GlobeView | undefined | |
style (省略可) | "line" | "thick" | undefined | "line" (the default) or "thick". |
graticule (省略可) | boolean | undefined | Draw a light graticule under the countries. Default false. |
例
import { globe, type GlobeOptions } from "@johnmorrisdotca/chikyu-earth";
const options: GlobeOptions = { size: 200, style: "thick", graticule: true, centre: { lon: 10, lat: 30 } };
console.log(globe(options).startsWith("<svg"));true出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。