Function defineProjection

  • Register a coordinate system so project (and the toWgs84 / toWebMercator fast paths) can resolve it. Idempotent; safe to call at app startup or lazily before the first project call.

    Parameters

    • code: string | number

      EPSG code or name to register the definition under.

    • proj4def: string

      A proj4 or WKT definition string.

    Returns void