landvex: Fixar och tester klara för alla komponenter
- Datafabrik: Dockerfile fix, agentorkestrering fungerar - Vision: Identify-modell, FAISS, OCR alla testade - API: Alla 7 integrationstester passerade - Upplösare: Entitetsupplösning verifierad
This commit is contained in:
+36
@@ -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
|
||||
});
|
||||
Reference in New Issue
Block a user