Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "geocortex/infrastructure/GraphicsLayerUtils"

Index

Variables

Const ExcludeFromEnum

ExcludeFromEnum: object

Type declaration

  • ExportApplyStateName: string
  • ExportMapTaskName: string
  • WebMapName: string

Const GraphicsLayerType

GraphicsLayerType: object

Types of graphics layer created internally by the Viewer. These need to be kept in a certain order. Pushpins on top, labels below this, highlights underneath labels, and all above markup.

Type declaration

  • Highlight: string
  • Label: string
  • Markup: string
  • Pushpin: string

Functions

addGraphicToLayer

  • addGraphicToLayer(graphic: Graphic, layerId: string, app: ViewerApplication): boolean
  • Add a graphic to the specified layer. You must create the layer first.

    app

    The app that this module belongs to

    Parameters

    • graphic: Graphic

      The graphic to be added

    • layerId: string

      The layer ID to add the graphic to

    • app: ViewerApplication

    Returns boolean

    A boolean returning true on success and false otherwise

getAllMarkupLayers

  • getAllMarkupLayers(): GraphicsLayer[]
  • Returns a copy of an array containing the current registered markup layers Do not modify this array!

    Returns GraphicsLayer[]

getGraphicsLayersExceptExcluded

  • getGraphicsLayersExceptExcluded(app: ViewerApplication, excludeFromList: string[]): GraphicsLayer[]
  • Gets the map's graphics layers that are neither associated with the Essentials site nor used internally by GVH, all graphics layers except those excluded.

    Parameters

    Returns GraphicsLayer[]

getInternalGraphicsLayer

  • getInternalGraphicsLayer(id: string, app: ViewerApplication, layerType?: string, registerClickable?: boolean): GraphicsLayer
  • Create a new graphics layer and place it in the correct order in the map graphics layers collection.

    Parameters

    • id: string

      Id of the graphics layer.

    • app: ViewerApplication

      Reference to the ViewerApplication

    • Optional layerType: string

      One of "Pushpin", "Label", Highlight" or "Markup". Only required for layer creation. To simply retrieve a layer leave this out.

    • Optional registerClickable: boolean

    Returns GraphicsLayer

registerMarkupLayerAsClickable

  • This method registers the markup layer as a clickable graphic layer

    Parameters

    • layer: GraphicsLayer

      The markup layer

    • app: ViewerApplication

      The application that this module belongs to

    Returns void

registerStreamLayerAsClickable

  • registerStreamLayerAsClickable(layer: GraphicsLayer, app: ViewerApplication, displayName: string): void
  • This method registers the stream layer as a clickable graphic layer

    Parameters

    • layer: GraphicsLayer

      The stream layer

    • app: ViewerApplication

      The application that this module belongs to

    • displayName: string

      The display name for the Stream layer

    Returns void

registerWfsLayerAsClickable

  • registerWfsLayerAsClickable(layer: WFSLayer, app: ViewerApplication, displayName: string): void
  • This method registers a WFS layer as a clickable graphic layer

    Parameters

    • layer: WFSLayer

      The WFS layer

    • app: ViewerApplication

      The application that this module belongs to

    • displayName: string

      The display name for the WFS layer

    Returns void

removeInternalGraphicsLayer

  • removeInternalGraphicsLayer(id: string, app: ViewerApplication, layerType: string): void
  • Call this function to remove an internal graphics layer. This just ensures that the internal layer count is correct and that new layers get added to the right location.

    Parameters

    • id: string

      Id of the layer to remove

    • app: ViewerApplication
    • layerType: string

      Type of layer being removed. No checks performed to see if this is 'right'

    Returns void

tryRegisterClickableLayer

  • Convenience method to register a graphics layer as clickable if it's not been registered already.

    param:

    layer The graphics layer to register

    Parameters

    Returns boolean

    True if successfully registered, false otherwise.