Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "geocortex/infrastructure/highlightedLabel/HighlightedLabelUtils"

Index

Functions

generateSvgCirclePath

  • generateSvgCirclePath(radius: number): string
  • Parameters

    • radius: number

    Returns string

generateSvgHighlightLabelPath

  • generateSvgHighlightLabelPath(width: any, height: any, radius: any, showPointer?: boolean, pointerWidth?: number): string
  • Parameters

    • width: any
    • height: any
    • radius: any
    • Optional showPointer: boolean
    • Optional pointerWidth: number

    Returns string

getLabelSize

  • getLabelSize(labelStr: string, fontFamily: string, fontSize: string, layerId: string): object
  • Measures the actual rendered size of a text label in pixels. Adding an actual element to the document is expensive, and since the measurement tool will always ask for dimensions of one single fixed font family and size, we cache dimensions for each letter of a font in a dictionary for later reuse. This ensures only a limited number of page element additions and removals no matter how many labels are measured (this may be a large number if we're measuring actual features on the map using layer actions).

    Parameters

    • labelStr: string

      The text label to measure label size for

    • fontFamily: string

      The font family to be applied to the text

    • fontSize: string
    • layerId: string

    Returns object

    An object with the width and height of the speciified label

    • height: number
    • width: number

getTextLines

  • getTextLines(text: string): string[]
  • Parameters

    • text: string

    Returns string[]