Options
All
  • Public
  • Public/Protected
  • All
Menu

Static utility methods for printing.

Hierarchy

  • PrintUtilities

Index

Methods

Static adjustPictureMarkerSymbol

  • adjustPictureMarkerSymbol(graphic: Graphic): PictureMarkerSymbol
  • Adjusts picture marker symbols to ensure that they are sent to the Essentials REST endpoint in the format in which it's expecting them.

    Parameters

    • graphic: Graphic

      The graphic for which to adjust the marker symbol for.

    Returns PictureMarkerSymbol

    A copy of the original {@link esri.symbols.PictureMarkerSymbol} with the adjustments applied or null if the supplied graphic does not contain a text symbol.

Static adjustTextSymbol

  • adjustTextSymbol(graphic: Graphic, layerId?: string): TextSymbol
  • Adjusts text symbols to bring the ArcGIS API for JavaScript's interpretation of them in line with the Geocortex Essentials print and export map rest endpoints' interpretation, which may differ since Essentials caters to both the Silverlight and HTML5 viewers which handle text symbols slightly differently.

    layerid

    string The Id of the layer containing the text symbol.

    Parameters

    • graphic: Graphic

      The esri {@link esri.Graphic} object containing the text symbol.

    • Optional layerId: string

    Returns TextSymbol

    A copy of the original text symbol with the adjustments applied or null if the supplied graphic does not contain a text symbol.

Static getImageAsBase64

  • getImageAsBase64(url: string, outputFormat?: string): Deferred
  • Gets the base64 representation for an image. If the image is from another domain and CORS is not configured on the server or otherwise available, the utility cannot convert the image. If this is the case, an object will be returned with the reject. This object contains an error and the url which caused the failure.

    Parameters

    • url: string

      The URL of the image to encode.

    • Optional outputFormat: string

      Optional: Either "image/png" or "image/jpg". If not specified, defaults to "image/png".

    Returns Deferred

    A Promise-like object which contains the base64 and which URL the data is for.