UNPKG

maplair

Version:

JavaScript library for mobile-friendly interactive maps

24 lines (22 loc) • 1.02 kB
import {EarthCRS} from './EarthCRS.js'; import {LonLatProjection} from '../projection/LonLatProjection.js'; import {Transformation} from '../../geometry/Transformation.js'; /** @import {Projection} from '../projection/index.js' */ /** * A common CRS among GIS enthusiasts. Uses simple Equirectangular projection. * * Maplair complies with the * [TMS coordinate scheme for EPSG:4326](https://wiki.osgeo.org/wiki/Tile_Map_Service_Specification#global-geodetic). * If you are using a `TileLayer` with this CRS, ensure that there are two 256x256 * pixel tiles covering the whole earth at zoom level zero, and that the tile * coordinate origin is (-180,+90), or (-180,-90) for `TileLayer`s with * [the `tms` option](#tilelayer-tms) set. */ export class EPSG4326 extends EarthCRS { /** @type {string} */ static code = 'EPSG:4326'; /** @type {Projection} */ static projection = LonLatProjection; /** @type {Transformation} */ static transformation = /* @__PURE__ */ new Transformation(1 / 180, 1, -1 / 180, 0.5); }