@kayahr/etchmap
    Preparing search index...

    Class WebMercatorProjection

    Web Mercator projection used by OpenStreetMap and compatible tile sources.

    Longitude is X and latitude is Y, both in degrees. Natural line interpolation follows the deterministic shortest great-circle route. Projection input latitudes are limited just short of the geographic poles so results remain finite; values beyond ordinary Web Mercator tile coverage remain available for correct clipping.

    Implements

    Index
    • Interpolates the shortest great-circle route between two longitude/latitude points or extrapolates along the same oriented great circle.

      Parameters

      • start: Point

        Route start with longitude as X and latitude as Y, in degrees.

      • end: Point

        Route end with longitude as X and latitude as Y, in degrees.

      • ratio: number

        Finite interpolation ratio. Zero returns start, one returns end, and values outside that range extrapolate beyond either endpoint.

      Returns Point

      Interpolated or extrapolated longitude and latitude in degrees.

      RangeError When ratio is not finite.

    • Converts longitude and latitude in degrees into normalized Web Mercator tile-world coordinates.

      Parameters

      • point: Point

        Longitude as X and latitude as Y, in degrees.

      Returns Point

      Point in normalized Web Mercator tile-world coordinates.

    • Converts normalized Web Mercator tile-world coordinates into longitude and latitude in degrees.

      Parameters

      • point: Point

        Point in normalized Web Mercator tile-world coordinates.

      Returns Point

      Longitude as X and latitude as Y, in degrees.