planning
All checks were successful
Publish To Prod / deploy_and_publish (push) Successful in 35s

This commit is contained in:
2024-10-14 09:15:30 +02:00
parent bcba00a730
commit 6e64e138e2
21059 changed files with 2317811 additions and 1 deletions

37
node_modules/ol/src/proj/projections.js generated vendored Normal file
View File

@@ -0,0 +1,37 @@
/**
* @module ol/proj/projections
*/
/**
* @type {Object<string, import("./Projection.js").default>}
*/
let cache = {};
/**
* Clear the projections cache.
*/
export function clear() {
cache = {};
}
/**
* Get a cached projection by code.
* @param {string} code The code for the projection.
* @return {import("./Projection.js").default} The projection (if cached).
*/
export function get(code) {
return (
cache[code] ||
cache[code.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/, 'EPSG:$3')] ||
null
);
}
/**
* Add a projection to the cache.
* @param {string} code The projection code.
* @param {import("./Projection.js").default} projection The projection to cache.
*/
export function add(code, projection) {
cache[code] = projection;
}