本文へ移動

Chizu地図

SVGの地図を描き、地域を表示範囲に収め、番号付きの注記や地理クイズを英語と日本語の名前で作れます。

「地図」は、土地や場所を図で表したものです。 名前について(英語)

目次

リファレンス · 表示範囲・形・クイズの道具

localConvergence関数

リファレンスの説明と例は英語です。見出しと目次は日本語です。

The angle, in degrees, between true north and the canvas's up at a place: how much a thing that points at a true bearing is turned on a local map. Zero on the central meridian, a few hundredths of a degree a kilometre or two east or west of it; positive east of the centre in the northern hemisphere, where the meridians lean in towards the pole. A marker at a bearing is turned by its bearing less this (localMap does it).

インポート

import { localConvergence } from "@johnmorrisdotca/chizu";

定義

function localConvergence(centre: readonly [number, number], lon: number, lat: number): number

引数

名前型説明
centrereadonly [number, number]

The centre of the local map, as [longitude, latitude] in degrees.

lonnumber

The longitude of the place, in degrees.

latnumber

The latitude of the place, in degrees.

戻り値

number

The angle, in degrees, between the grid's north and true north there; positive east of the centre.

例

import { localConvergence } from "@johnmorrisdotca/chizu";

console.log(localConvergence([139.7671, 35.6812], 139.7671, 35.69), localConvergence([139.7671, 35.6812], 139.85, 35.69) > 0);
// 0 true
0 true

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

ソースを見るGitHub で編集@johnmorrisdotca/chizu 1.5.0 のソースから作成しました。

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