A base class for anything requiring access to the InstanceApi and instance of Vue app controlled by it.

APIScope

Hierarchy (view full)

Constructors

Properties

The instance of RampMap API scoped to a single Vue R4MP application.

APIScope

CLASS_BREAKS: string = 'class-breaks'
CONTAINER_CENTER: number = ...
CONTAINER_SIZE: number = 32
CONTENT_IMAGE_SIZE: number = 28
CONTENT_PADDING: number = ...
CONTENT_SIZE: number = 24
NONE: string = 'none'
SIMPLE: string = 'simple'
UNIQUE_VALUE: string = 'unique-value'

Accessors

  • get $element(): App<Element>
  • Returns App<Element>

  • get $vApp(): ComponentPublicInstance
  • The instance of Vue R4MP application controlled by this InstanceAPI. This is just a shorthand for this.$iApi.$vApp.

    Returns ComponentPublicInstance

    APIScope

Methods

  • Fits svg element in the size specified

    Parameters

    • element: any

      svg element to fit

    • CONTAINER_SIZE: number

      width/height of a container to fit the element into

    Returns void

  • Generates svg symbology for WMS layers.

    Parameters

    • imageUri: string

      url or dataUrl of the legend image

    Returns Promise<Object>

    a promise resolving with symbology svg code and its label

    generateWMSSymbology

  • Given feature attributes, return the image URL for that feature/graphic object.

    Parameters

    • attributes: Attributes

      object of feature attribute key value pairs

    • renderer: BaseRenderer

      an enhanced renderer (see function enhanceRenderer)

    Returns string

    svgcode Url to the features symbology image

    getGraphicIcon

  • Given feature attributes, return the symbol for that feature/graphic object.

    Parameters

    • attributes: Object

      object of feature attribute key value pairs

    • renderer: BaseRenderer

      an enhanced renderer (see function enhanceRenderer)

    Returns Symbol

    an ESRI Symbol object in server format

    getGraphicSymbol

  • Orchestrator function that will:

    • Fetch a legend from an esri map server
    • Extract legend for a specific sub layer
    • Convert server legend to a temporary renderer
    • Convert temporary renderer to a viewer-formatted legend (return value)

    Parameters

    • mapServerUrl: string

      service url (root service, not indexed endpoint)

    • OptionallayerIndex: string | number = undefined

      the index of the layer in the legend we are interested in. If not provided, all layers will be collapsed into a single legend

    Returns Promise<LegendSymbology[]>

    resolves in a viewer-compatible legend for the given server and layer index

    mapServerToLocalLegend

  • Renders a supplied image as an icon-style symbology item (fitting an image inside an icon container, usually 32x32 pixels).

    Parameters

    • imageUri: string

      a image dataUrl or a regular url

    • draw: any = null

      [optional=null] an svg container to draw the image on; if not supplied, a new one is created

    Returns Promise<string>

    renderSymbologyIcon

  • Renders a supplied image as an image-style symbology item (preserving the true image dimensions).

    Parameters

    • imageUri: string

      a image dataUrl or a regular url

    • draw: any = null

      [optional=null] an svg container to draw the image on; if not supplied, a new one is created

    Returns Promise<string>

    renderSymbologyImage