(epsgKey, epsgValue, proj4 = proj4FromNpm)
| 14 | } |
| 15 | |
| 16 | export function registerProjection(epsgKey, epsgValue, proj4 = proj4FromNpm) { |
| 17 | if (Object.prototype.toString.call(arguments[0]) === '[object Object]') { |
| 18 | const projections = arguments[0]; |
| 19 | for (const epsgCode in projections) { |
| 20 | defineProjection(epsgCode, projections[epsgCode], proj4); |
| 21 | } |
| 22 | return; |
| 23 | } |
| 24 | defineProjection(epsgKey, epsgValue, proj4); |
| 25 | } |
| 26 | |
| 27 | export function getProjection(epsgKey, proj4 = proj4FromNpm) { |
| 28 | if (!proj4.defs(epsgKey)) { |
no test coverage detected