/
opt
/
canhelp
/
node_modules
/
leaflet
/
src
/
geo
/
crs
/
/opt/canhelp/node_modules/leaflet/src/geo/crs
mkdir
upload
Name
Size
Mode
Actions
CRS.Earth.js
1133
0755
edit
dl
rm
CRS.EPSG3395.js
588
0644
edit
dl
rm
CRS.EPSG3857.js
801
0644
edit
dl
rm
CRS.EPSG4326.js
983
0644
edit
dl
rm
CRS.js
5281
0644
edit
dl
rm
CRS.Simple.js
926
0644
edit
dl
rm
index.js
394
0644
edit
dl
rm
Edit:
/opt/canhelp/node_modules/leaflet/src/geo/crs/CRS.Simple.js
(926B)
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 });
Save
cmd:
run