本文へ移動

Chikyu Earth地球

世界の国の輪郭を線で描いた地球儀です。地球と同じ速さで回ります。宇宙から見たような地球と、好きな場所の目印も使えます。

「地球」(ちきゅう) は、私たちが住む星の名前です。 名前について(英語)

目次

リファレンス · SVG文字列としての地球儀

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 is given it takes precedence over rotation.

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

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/chikyu-earth 0.11.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。