Atlaslog
Atlaslog / Leaflet / API reference / CRS
Leaflet · API reference

CRS

Quick answer

L.CRS bundles projection, transformation and wrapping rules into one object that converts latitude and longitude into plane and pixel coordinates. Pick L.CRS.EPSG3857 for standard tiles, or swap in EPSG4326, EPSG3395 or L.CRS.Simple through the map's crs option. Its code property also feeds WMS request parameters.

Last verified 2026-11-03 · Leaflet 1.9.4 · Cite this page
L.map( id , { crs: L.CRS. EPSG4326 }) → Map
Key points
Example
var map4326 = L.map('map', {
  crs: L.CRS.EPSG4326,
  center: [39.907, 116.391],
  zoom: 4
});

L.tileLayer.wms('https://example.com/geoserver/wms', {
  layers: 'demo:province',
  format: 'image/png',
  transparent: true,
  crs: L.CRS.EPSG4326
}).addTo(map4326);
var MeterCRS = L.Util.extend({}, L.CRS.Simple, {
  code: 'LOCAL:METER',
  transformation: new L.Transformation(1, 0, -1, 0)
});

var indoor = L.map('map', {
  crs: MeterCRS,
  minZoom: -2,
  maxZoom: 4
});

indoor.setView([0, 0], 0);
Notes
Runnable examplesChinese originalAll API references
English edition written for Atlaslog. Code is taken from the original Chinese page and runs unchanged.
Cite this page

Atlaslog (2026). CRS. https://www.jingweizhi.com/en/leaflet/api/crs.html (accessed 2026-11-03).