(epsgCode, projection, proj4)
| 3 | import { transformServerUrl } from './util'; |
| 4 | |
| 5 | function defineProjection(epsgCode, projection, proj4) { |
| 6 | if (proj4.defs(epsgCode)) { |
| 7 | return; |
| 8 | } |
| 9 | if (!projection) { |
| 10 | console.error(`${epsgCode} not define`); |
| 11 | return; |
| 12 | } |
| 13 | proj4.defs(epsgCode, projection); |
| 14 | } |
| 15 | |
| 16 | export function registerProjection(epsgKey, epsgValue, proj4 = proj4FromNpm) { |
| 17 | if (Object.prototype.toString.call(arguments[0]) === '[object Object]') { |
no outgoing calls
no test coverage detected