SDK JS
    Preparing search index...

    The synthetic overhead frame built by buildTopDownFrame.

    interface TopDownFrame {
        metresPerPixel: number;
        mvpWorld: Mat4;
        viewportHeight: number;
        viewportWidth: number;
        depth01FromHeightM(m: number): number;
        heightM(depth01: number): number;
        toPixel(lng: number, lat: number): [number, number];
    }
    Index

    Properties

    metresPerPixel: number

    Ground resolution of the grid, metres per pixel (the long axis).

    mvpWorld: Mat4

    Mercator-world → clip: an orthographic top-down projection over the stations' bbox.

    viewportHeight: number

    Grid height in pixels.

    viewportWidth: number

    Grid width in pixels.

    Methods

    • The window depth a height maps to — the inverse of heightM, and the minDepth01 depth gate that turns this pass into "the highest surface BELOW m" (higher surfaces are nearer, so they sit at smaller depths). Clamped to [0, 1].

      Parameters

      • m: number

      Returns number

    • Decode a window depth from the pass into metres above the map's zero.

      Parameters

      • depth01: number

      Returns number

    • Map a station to its grid pixel [x, rowFromBottom] (matches readPixels' GL origin).

      Parameters

      • lng: number
      • lat: number

      Returns [number, number]