Independent manager to display a mask layer adapted to the print. Listen to print events to auto setup.

Constructors

Accessors

Methods

  • Calculates the optimal resolution for printing a map based on the provided parameters.

    Parameters

    • mapSize: Size

      The size of the map in meters.

    • printMapSize: number[]

      The size of the map to be printed in dots.

    • scale: number

      The scale at which the map should be printed.

    Returns number

    The optimal resolution for printing the map.

  • Calculates the optimal scale for printing a map based on the map size, resolution, desired print size, and available map scales.

    Parameters

    • mapSize: Size

      The size of the map in meters. Expressed as an array [width, height].

    • mapResolution: number

      The resolution of the map in meters per pixel.

    • printMapSize: number[]

      The desired size of the printed map in inches. Expressed as an array [width, height].

    • mapScales: number[]

      The available map scales.

    Returns number

    The optimal scale for printing the map or -1 if any.