Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • PrintUtils

Index

Properties

extentHalfHorizontalDistance_: number
extentHalfVerticalDistance_: number

Methods

  • getBottomLeftCorner(mapCenter: Coordinate): Coordinate
  • Get the coordinates of the bottom left corner of the printed map.

    Parameters

    • mapCenter: Coordinate

      Center of the map to print.

    Returns Coordinate

    The coordinates of the bottom left corner.

  • getBottomRightCorner(mapCenter: Coordinate): Coordinate
  • Get the coordinates of the bottom right corner of the printed map.

    Parameters

    • mapCenter: Coordinate

      Center of the map to print.รง

    Returns Coordinate

    The coordinates of the bottom right corner.

  • getOptimalResolution(mapSize: Size, printMapSize: Size, printMapScale: number): number
  • Get the optimal map resolution for a print scale and a map size.

    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

    The optimal map resolution.

  • getOptimalScale(mapSize: Size, mapResolution: number, printMapSize: Size, printMapScales: number[]): 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).

    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

    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.

  • getUpLeftCorner(mapCenter: Coordinate): Coordinate
  • Get the coordinates of the up left corner of the printed map.

    Parameters

    • mapCenter: Coordinate

      Center of the map to print.

    Returns Coordinate

    The coordinates of the up left corner.

  • getUpRightCorner(mapCenter: Coordinate): Coordinate
  • Get the coordinates of the up right corner of the printed map.

    Parameters

    • mapCenter: Coordinate

      Center of the map to print.

    Returns Coordinate

    The coordinates of the up right corner.

Generated using TypeDoc