nearby関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A place made less exact: put on a grid about km kilometres across, so a reader's own place can be drawn without saying their street. Use it on what the browser's location gives before
it is drawn or kept.
インポート
import { nearby } from "@johnmorrisdotca/chikyu-earth/markers";
定義
function nearby(point: GeoPoint, km?: number): GeoPoint
引数
| 名前 | 型 | 説明 |
|---|---|---|
point | GeoPoint | Longitude and latitude in degrees. |
km (省略可) | number | The grid's size in kilometres (10). |
戻り値
GeoPoint
The point on the grid, to four decimals.
例
import { nearby } from "@johnmorrisdotca/chikyu-earth/markers";
console.log(nearby({ lon: -79.38321, lat: 43.65348 }));{ lon: -79.3423, lat: 43.6579 }出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。