@dioramajs/data/map
Exports of @dioramajs/data/map.
import { default, dotGrid, project } from '@dioramajs/data/map'Functions
dotGrid | A grid of dots over the view: land, sea inside the world's outline, nothing outside it. |
project | Projected x, y of a latitude and a longitude from the central meridian, in radians. |
unpack | Decodes the land mask of @dioramajs/globe/land: 1 for land, `WIDTH` cells a row. |
unproject | Latitude and longitude in radians of a projected point, undefined outside the world. |
viewOf | The region's projected bounds around its middle meridian (moved by `center`), shrunk by `zoom` and widened to the box's proportions, so the region fits and the rest of the box shows more map. |
Constants
default | A flat map of the world or a region, its land as dots or a solid fill, with markers for the element's places and arcs between them that draw in once in view. Fires `dio:marker` on the element when a marker lights up or goes dark. |
REGIONS | West, east, south and north edges of a region in degrees. |