From 3c99fde45db83b531c41c350ed4d0ac2a3c40c62 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 14:45:13 +0200 Subject: Adding debian version 1.1.0-3. Signed-off-by: Daniel Baumann --- .../leaflet.js/geo/crs/CRS.Simple.js | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 debian/missing-sources/leaflet.js/geo/crs/CRS.Simple.js (limited to 'debian/missing-sources/leaflet.js/geo/crs/CRS.Simple.js') diff --git a/debian/missing-sources/leaflet.js/geo/crs/CRS.Simple.js b/debian/missing-sources/leaflet.js/geo/crs/CRS.Simple.js new file mode 100644 index 0000000..634baa2 --- /dev/null +++ b/debian/missing-sources/leaflet.js/geo/crs/CRS.Simple.js @@ -0,0 +1,36 @@ +import {CRS} from './CRS'; +import {LonLat} from '../projection/Projection.LonLat'; +import {toTransformation} from '../../geometry/Transformation'; +import * as Util from '../../core/Util'; + +/* + * @namespace CRS + * @crs L.CRS.Simple + * + * A simple CRS that maps longitude and latitude into `x` and `y` directly. + * May be used for maps of flat surfaces (e.g. game maps). Note that the `y` + * axis should still be inverted (going from bottom to top). `distance()` returns + * simple euclidean distance. + */ + +export var Simple = Util.extend({}, CRS, { + projection: LonLat, + transformation: toTransformation(1, 0, -1, 0), + + scale: function (zoom) { + return Math.pow(2, zoom); + }, + + zoom: function (scale) { + return Math.log(scale) / Math.LN2; + }, + + distance: function (latlng1, latlng2) { + var dx = latlng2.lng - latlng1.lng, + dy = latlng2.lat - latlng1.lat; + + return Math.sqrt(dx * dx + dy * dy); + }, + + infinite: true +}); -- cgit v1.2.3