@geogirafe/lib-geoportal
    Preparing search index...

    Print panel component. Read print capabilities and generate options from it. Be able to print the content on the map, based on the layer tree and the OL map. Have actions on the print mask and on the map (rotation).

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    activeTooltips: any[] = []
    attributeNames: string[] = []
    callbacks: Callback[] = []
    componentManager: ComponentManager
    configManager: ConfigManager
    displayStyle?: string
    dpis: number[] = []
    layouts: MFPCapabilitiesLayout[] = []
    name: string
    printFormats: string[] = []
    rendered: boolean = false
    scales: number[] = []
    selectedLayout?: MFPCapabilitiesLayout
    shadow: ShadowRoot
    showCustomScale: boolean = false
    stateManager: StateManager
    styleUrl: null | string = null
    styleUrls: string[] = ...
    template: Hole | (() => Hole)
    templateUrl: string = './template.html'
    timeoutId?: Timeout
    userInteractionManager: UserInteractionManager

    Accessors

    Methods

    • Deserialize an element and set the current element state to the deserialized one

      Parameters

      • _serializedElement: unknown

        The element serialization as returned by the serialize method

      Returns void

    • Used to know the matching HTML element.

      Parameters

      • attributeName: string

      Returns "number" | "text" | "textarea" | "checkbox"

      An arbitrary type based on the matching "capabilities" attribute.

    • Returns string

      The render state.

      • 'error' if there was an error fetching the capabilities.
      • 'setup' if the capabilities have been set up.
      • 'loading' if the capabilities are being fetched.
    • Convert the string in parameter with uHtml and return it. This allows to convert a string with html in a right html object. For example, htmlUnsafe('

      ') will return an html div object.

      Parameters

      • str: string

      Returns Hole

    • Removes the print element with the specified itemId from the printList array. Cancel the print if is it not finished.

      Parameters

      • itemId: string

      Returns void

    • Sync both rotation inputs and update the map rotation value.

      Parameters

      • event: Event

      Returns void

    • Update the values relative to the layout (attributes, scales, etc.) Set scale and print format in the state. Renders the panel with new info.

      Parameters

      • event: KeyboardEvent

      Returns void

    • On print element clicked:

      • Download it on success
      • Do nothing otherwise element.

      Parameters

      • itemId: string

      Returns void

    • Set selected scale in the state and update the mask.

      Parameters

      • event: KeyboardEvent

      Returns void

    • Prints the current map state regarding every print options. Can add datasource (based on selection) and a legend. The status will be tracked until finished.

      Returns void

    • In the templates, sometimes for accessibility reasons, we have to support the KeyDown Event In those case, we often juste want to do the same as the click event when Enter or Space is pressed Then this method can be used : it just calls the click event on the same element

      Parameters

      • e: KeyboardEvent

      Returns void

    • Get the print formats based on the configuration. Removes formats not proposed in the available formats.

      Parameters

      • configFormats: undefined | string[]
      • availableFormats: undefined | string[]

      Returns string[]

    • Whitelist the availableScales with the given scales, or allows every of them.

      Parameters

      • availableScales: number[]
      • Optionalscales: number[]

      Returns number[]

    • Parameters

      • printFormats: string[]
      • OptionaldefaultFormat: string

      Returns undefined | string

      a valid default format from an array of print formats.