| import {LatLng} from '../LatLng'; | |
| import {Bounds} from '../../geometry/Bounds'; | |
| import {Point} from '../../geometry/Point'; | |
| /* | |
| * @namespace Projection | |
| * @section | |
| * Leaflet comes with a set of already defined Projections out of the box: | |
| * | |
| * @projection L.Projection.LonLat | |
| * | |
| * Equirectangular, or Plate Carree projection — the most simple projection, | |
| * mostly used by GIS enthusiasts. Directly maps `x` as longitude, and `y` as | |
| * latitude. Also suitable for flat worlds, e.g. game maps. Used by the | |
| * `EPSG:4326` and `Simple` CRS. | |
| */ | |
| export var LonLat = { | |
| project: function (latlng) { | |
| return new Point(latlng.lng, latlng.lat); | |
| }, | |
| unproject: function (point) { | |
| return new LatLng(point.y, point.x); | |
| }, | |
| bounds: new Bounds([-180, -90], [180, 90]) | |
| }; | |