Class PrintUtils

Hierarchy

  • PrintUtils

Properties

extentHalfHorizontalDistance_: number
extentHalfVerticalDistance_: number

Methods

  • Get the coordinates of the bottom left corner of the printed map.

    Returns

    The coordinates of the bottom left corner.

    Parameters

    • mapCenter: Coordinate

      Center of the map to print.

    Returns Coordinate

  • Get the coordinates of the bottom right corner of the printed map.

    Returns

    The coordinates of the bottom right corner.

    Parameters

    • mapCenter: Coordinate

      Center of the map to print.รง

    Returns Coordinate

  • Get the optimal map resolution for a print scale and a map size.

    Returns

    The optimal map resolution.

    Parameters

    • mapSize: Size

      Size of the map on the screen (px).

    • printMapSize: Size

      Size of the map on the paper (dots).

    • printMapScale: number

      Map scale on the paper.

    Returns number

  • Get the optimal print scale for a map, the map being defined by its size (in pixels) and resolution (in map units per pixel).

    Returns

    The best scale. -1 is returned if there is no optimal scale, that is the optimal scale is lower than or equal to the first value in printMapScales.

    Parameters

    • mapSize: Size

      Size of the map on the screen (px).

    • mapResolution: number

      Resolution of the map on the screen.

    • printMapSize: Size

      Size of the map on the paper (dots).

    • printMapScales: number[]

      Supported map scales on the paper. The scales are provided as scale denominators, sorted in ascending order. E.g. [500, 1000, 2000, 4000].

    Returns number

  • Get the coordinates of the up left corner of the printed map.

    Returns

    The coordinates of the up left corner.

    Parameters

    • mapCenter: Coordinate

      Center of the map to print.

    Returns Coordinate

  • Get the coordinates of the up right corner of the printed map.

    Returns

    The coordinates of the up right corner.

    Parameters

    • mapCenter: Coordinate

      Center of the map to print.

    Returns Coordinate

Generated using TypeDoc