diff options
Diffstat (limited to 'debian/missing-sources/leaflet.js/geo/projection/Projection.LonLat.js')
-rw-r--r-- | debian/missing-sources/leaflet.js/geo/projection/Projection.LonLat.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/debian/missing-sources/leaflet.js/geo/projection/Projection.LonLat.js b/debian/missing-sources/leaflet.js/geo/projection/Projection.LonLat.js new file mode 100644 index 0000000..774f66f --- /dev/null +++ b/debian/missing-sources/leaflet.js/geo/projection/Projection.LonLat.js @@ -0,0 +1,28 @@ +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])
+};
|