gridOnEarthfunction
The part of a tile that lies on the Earth, or undefined when the tile misses the Earth entirely.
Import it
import { gridOnEarth } from "@johnmorrisdotca/chikyu-earth/door";
Definition
function gridOnEarth(level: MapGridLevel, col: number, row: number, extent: MapGrid["extent"]): MapPlace | undefined
Parameters
| Name | Type | Description |
|---|---|---|
level | MapGridLevel | The level. |
col | number | The column. |
row | number | The row. |
extent | { west: number; south: number; east: number; north: number; } | The Earth's extent in degrees. |
Returns
MapPlace | undefined
The overlap, or undefined.
Examples
import { gibsGrid, gridOnEarth } from "@johnmorrisdotca/chikyu-earth/door";
console.log(gridOnEarth(gibsGrid("250m").levels[3]!, 0, 0, { west: -180, south: -90, east: 180, north: 90 }));{ lonMin: -180, lonMax: -144, latMin: 54, latMax: 90 }What it prints (run when this page was built)