Constructors

Methods

  • Determines whether the provided control is enabled for the bound layer, based on the config provided

    Parameters

    • control: LayerControl

      the control we want to determine the availability of

    • config: undefined | {
          controls?: string[];
          disabledControls?: string[];
      }

      an object containing information regarding enabled/disabled controls for the bound layer

    Returns boolean

    whether the control is available

  • Convert an image to a canvas element

    Parameters

    • url: string

      image url to convert (result from the esri print task)

    • Optionalcanvas: HTMLCanvasElement

      [optional = undefined] canvas to draw the image upon; if not supplied, a new canvas will be made

    • crossOrigin: boolean = true

      [optional = true] when set, tries to fetch an image with crossOrigin = anonymous

    Returns Promise<any>

    conversion promise resolving into a canvas of the image

  • Loads an image (as crossing) and converts it to dataURL. If a supplied imageUri is already a dataURL, just return it. If an image fails to load with the crossing attribute, return the original imageUri

    Parameters

    • imageUri: string

      url of the image to load and convert

    • imageType: string = 'image/png'

      [optional = 'image/png'] format of the image representation

    Returns Promise<string>

    promise resolving with the dataURL of the image

    convertImagetoDataURL

  • Get a 'good enough' uuid. For backup purposes if client does not supply its own unique layer id

    Returns string

    a uuid

    generateUUID