Skip to content

Latest commit

 

History

History
36 lines (26 loc) · 1.7 KB

README.md

File metadata and controls

36 lines (26 loc) · 1.7 KB

Leaflet.Proj4js

Plugin for Leaflet offering a lightweight interface with Proj4js. Inspired by kartena / Proj4Leaflet.

Compatible with Leaflet version 1.0 (tested with 1.4.0), not compatible with version 0.x.

See demo (GRB-basiskaart Vlaanderen, Belgian Lambert 72, EPSG:31370).

Installation and usage

See demo.html.

API

Functions

Method Returns Description
projection(<String> code, <String> proj4def?, <Bounds> bounds?) Projection Projection factory.
crs(<String> code?, <crs options> options?) CRS CRS factory.

Crs Options

Option Type Default Description
infinite Boolean
bounds Bounds Bounds of the CRS, in projected coordinates.
wrapLat Number[]
wrapLng Number[]
projection Projection
proj4def String Proj.4 definition.
transformation Transformation To transform projected coordinates into pixel coordinates.
origin Number[] Tileset origin, in projected coordinates.
scale Number Scale for zoom level 0.
resolution Number Resolution (projection units per pixel) for zoom level 0.
scaleDenominator Number Scale denominator (WMTS) for zoom level 0.