Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ICRS

Hierarchy

  • ICRS

Index

Properties

code

code: string

Standard code name of the CRS passed into WMS services (e.g. 'EPSG:3857').

projection

projection: IProjection

Projection that this CRS uses.

transformation

transformation: Transformation

Transformation that this CRS uses to turn projected coordinates into screen coordinates for a particular tile service.

Methods

getSize

  • getSize(zoom: number): Point
  • Returns the size of the world in pixels for a particular zoom.

    Parameters

    • zoom: number

    Returns Point

latLngToPoint

  • Projects geographical coordinates on a given zoom into pixel coordinates.

    Parameters

    Returns Point

pointToLatLng

  • The inverse of latLngToPoint. Projects pixel coordinates on a given zoom into geographical coordinates.

    Parameters

    • point: Point
    • zoom: number

    Returns LatLng

project

  • Projects geographical coordinates into coordinates in units accepted for this CRS (e.g. meters for EPSG:3857, for passing it to WMS services).

    Parameters

    Returns Point

scale

  • scale(zoom: number): number
  • Returns the scale used when transforming projected coordinates into pixel coordinates for a particular zoom. For example, it returns 256 * 2^zoom for Mercator-based CRS.

    Parameters

    • zoom: number

    Returns number