leaflet
Version:
JavaScript library for mobile-friendly interactive maps
18 lines (13 loc) • 364 B
JavaScript
/*
* Simple equirectangular (Plate Carree) projection, used by CRS like EPSG:4326 and Simple.
*/
L.Projection = {};
L.Projection.LonLat = {
project: function (latlng) {
return new L.Point(latlng.lng, latlng.lat);
},
unproject: function (point) {
return new L.LatLng(point.y, point.x);
},
bounds: L.bounds([-180, -90], [180, 90])
};