Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • HighlightManager

Index

Constructors

constructor

  • Initializes a new instance of an {@link geocortex.essentialsHtmlViewer.mapping.infrastructure.HighlightManager} object.

    class

    The central system for highlighting features.

    constructs
    memberof

    geocortex.essentialsHtmlViewer.mapping.infrastructure

    Parameters

    • app: ViewerApplication

      The {@link geocortex.essentialsHtmlViewer.ViewerApplication} that this module belongs to.

    Returns HighlightManager

Properties

activeHighlightLayerName

activeHighlightLayerName: string

ID of the currently active highlight layer

app

The ViewerApplication that this module belongs to.

config

Default configuration for highlight layers

onMaxGeometryVerticesExceeded

onMaxGeometryVerticesExceeded: function

This function will be invoked if the max highlightable vertices threshold is exceeded (after generalization if configured). Such graphics will not be highlighted.

Type declaration

    • (graphic: Graphic): void
    • Parameters

      • graphic: Graphic

      Returns void

persistStarHighlights

persistStarHighlights: boolean

Whether highlights from the starred selection should persist on the map even when no result containing view is open

Methods

activeHighlightLayerGraphics

  • activeHighlightLayerGraphics(): Graphic[]
  • Returns the graphics currently in the active highlight layer.

    Returns Graphic[]

    active layer highlighted graphics.

applyHighlightConfiguration

  • applyHighlightConfiguration(layerName: string): void
  • Applies the default highlight configuration to the named highlight layer

    Parameters

    • layerName: string

    Returns void

applyState

  • Restore state from a saved project

    Parameters

    Returns Promise<void>

clearAllHighlight

  • clearAllHighlight(features: InfrastructureFeature[] | Graphic[]): void
  • Clears all the highlights from all layers for the specified features

    Parameters

    • features: InfrastructureFeature[] | Graphic[]

    Returns void

clearEmphasis

  • clearEmphasis(features: InfrastructureFeature[] | Graphic[], highlightLayerName?: string): void
  • Same as above, but has the wrong name

    deprecated:

    Please use highlightManager.clearFocus instead.

    Parameters

    • features: InfrastructureFeature[] | Graphic[]
    • Optional highlightLayerName: string

    Returns void

clearFocus

  • clearFocus(features: InfrastructureFeature[] | Graphic[], highlightLayerName?: string): void
  • Clears the focused highlights on features in the list of features provided, returning them to the default highlight state

    Parameters

    • features: InfrastructureFeature[] | Graphic[]

      The list of features to highlight.

    • Optional highlightLayerName: string

    Returns void

clearHighlight

  • clearHighlight(features: InfrastructureFeature[] | Graphic[], highlightLayerName?: string): void
  • Clears the specified features from the specified (or default) highlight layer

    Parameters

    • features: InfrastructureFeature[] | Graphic[]
    • Optional highlightLayerName: string

    Returns void

clearHighlights

  • clearHighlights(layer?: GraphicsLayer | HighlightLayer | string, clearSelected?: boolean): void
  • Clears the highlights from the default layer, or the named or provided layer if one is named or provided.

    Parameters

    • Optional layer: GraphicsLayer | HighlightLayer | string
    • Optional clearSelected: boolean

    Returns void

clearSelected

  • clearSelected(features: InfrastructureFeature[] | Graphic[]): void
  • Manually clear selected highlight from a set of features. This clears the selected property as well (so it doesn't just get put back) but does not propagate this change to other potential copies of this feature.

    Parameters

    • features: InfrastructureFeature[] | Graphic[]

    Returns void

defaultHighlightLayerGraphics

  • defaultHighlightLayerGraphics(): Graphic[]
  • Returns the graphics currently in the default highlight layer.

    Returns Graphic[]

    default layer highlighted graphics.

emphasizeFeatures

  • emphasizeFeatures(features: InfrastructureFeature[] | Graphic[], highlightLayerId?: string): void
  • Same as above, but the wrong name

    deprecated:

    Please use highlightManager.focusFeatures

    Parameters

    • features: InfrastructureFeature[] | Graphic[]
    • Optional highlightLayerId: string

    Returns void

enableHighlight

  • enableHighlight(graphic: Graphic): void
  • Enables highlights on a graphic which has been suppressed. This will restore the original highlighted/focused state

    Parameters

    • graphic: Graphic

      The graphic to enable.

    Returns void

exportState

  • Export saved project state

    Returns Promise<HighlightManagerState>

focusFeatures

  • focusFeatures(features: InfrastructureFeature[] | Graphic[], highlightLayerId?: string): void
  • Focuses the features in the list of features provided, and adds them to the active highlight later, or the layer specified layer.

    Parameters

    • features: InfrastructureFeature[] | Graphic[]

      The list of features to highlight.

    • Optional highlightLayerId: string

    Returns void

getFocusedBorderColor

  • Gets the current focused border color. Returns the 6 or 8 digit hex color in RGB or ARGB form.

    Parameters

    Returns string

getFocusedFillColor

  • Gets the current focused fill color. Returns the 6 or 8 digit hex color in RGB or ARGB form.

    Parameters

    Returns string

getGeometryGeneralizationParams

  • getGeometryGeneralizationParams(): object
  • Gets the geometry generalization parameters. If any of the parameters is 0, generalization is disabled.

    Returns object

    • maxDeviationMeters: number
    • thresholdVertices: number

getHighlightBorderColor

  • Gets the current border color. Returns the 6 or 8 digit hex color in RGB or ARGB form. The bright color of the inner line is taken to be the highlight color

    Parameters

    Returns string

getHighlightBorderWidth

  • Gets the current border width. Returns the width of the bottom border.

    Parameters

    Returns number

getHighlightFillColor

  • Gets the current fill color. Returns the 6 or 8 digit hex color in RGB or ARGB form. The transparent fill is applied to the bottom graphic.

    Parameters

    Returns string

getHighlightLayer

  • getHighlightLayer(layerName: string): GraphicsLayer
  • Gets the graphics layer associated with a particular highlight layer name

    deprecated:

    use highlightManager.getInternalHighlightLayer and check the graphicsLayer property on the returned object

    Parameters

    • layerName: string

    Returns GraphicsLayer

getHighlightLayerOrActive

  • getHighlightLayerOrActive(layerName?: string): GraphicsLayer
  • Gets the graphics layer associated with the named or active highlight layer

    deprecated:

    Use getInternalHighlightLayerOrActive to get the infrastructure.HighlightLayer instance instead.

    Parameters

    • Optional layerName: string

    Returns GraphicsLayer

getHighlightLayers

  • getHighlightLayers(): object
  • Gets the set of graphics layers used by highlight layers, keyed by name.

    deprecated:

    This method doesn't really make sense anymore as a single graphics layer can be used by multiple highlight layers.

    Returns object

    • [name: string]: GraphicsLayer

getInternalHighlightLayer

  • Gets a highlight layer with the specified name.

    Parameters

    • layerName: string

      The name of the layer to get.

    Returns HighlightLayer

    highlight layer

getInternalHighlightLayerOrActive

  • getInternalHighlightLayerOrActive(layerName?: string): HighlightLayer
  • Gets a highlight layer with the specified name, or the active layer if one is not specified.

    Parameters

    • Optional layerName: string

    Returns HighlightLayer

    highlight layer

getInternalHighlightLayers

  • getInternalHighlightLayers(): object
  • Gets the set of infrastructure.HighlightLayer currently in use, keyed by name.

    Returns object

getMaxHighlightableGeometryVertices

  • getMaxHighlightableGeometryVertices(): number
  • Gets the maximum number of vertices a geometry can contain for it to be highlightable. A value of '0' means unlimited.

    Returns number

getOrCreateHighlightLayer

  • getOrCreateHighlightLayer(layerName: string, fillColor?: any, borderColor?: any): GraphicsLayer
  • Creates a new highlight layer that uses its own graphics layer, returning the graphics layer used.

    deprecated:

    Use highlightManager.getOrCreateInternalHighlightLayer, with the option to use a unique or common graphics layer

    Parameters

    • layerName: string

      The name of the layer to create.

    • Optional fillColor: any

      The color to fill with, leave as null for default

    • Optional borderColor: any

      The color to color the border with, leave as null for default

    Returns GraphicsLayer

getOrCreateInternalHighlightLayer

  • getOrCreateInternalHighlightLayer(layerName: string, fillColor?: any, borderColor?: any, useCommonGraphicsLayer?: boolean): HighlightLayer
  • Creates a new highlighting layer with the specified name. This will throw an error if a layer with the specified name exists.

    Parameters

    • layerName: string

      The name of the layer to create.

    • Optional fillColor: any

      The color to fill with, leave as null for default

    • Optional borderColor: any

      The color to color the border with, leave as null for default

    • Optional useCommonGraphicsLayer: boolean

    Returns HighlightLayer

getSelectedBorderColor

  • Gets the current focused border color. Returns the 6 or 8 digit hex color in RGB or ARGB form.

    Parameters

    Returns string

getSelectedFillColor

  • Gets the current focused fill color. Returns the 6 or 8 digit hex color in RGB or ARGB form.

    Parameters

    Returns string

highlightEsriFeatureSet

  • highlightEsriFeatureSet(esriFeatureSet: FeatureSet, highlightLayerName?: string): void
  • Highlights the features in the Esri Feature Set provided, and adds them to the active highlight later, or the layer specified layer. Features added will take the fill and border color that are currently set.

    Parameters

    • esriFeatureSet: FeatureSet

      The Esri feature set to highlight.

    • Optional highlightLayerName: string

    Returns void

highlightFeatures

  • highlightFeatures(features: InfrastructureFeature[] | Graphic[], highlightLayerId?: string): void
  • Highlights the features in the list of features provided, and adds them to the active highlight later, or the user specified layer. Features added will take the fill and border color that are specified in the feature, or the current highlight colors if one is not specified.

    Parameters

    • features: InfrastructureFeature[] | Graphic[]

      The list of features to highlight.

    • Optional highlightLayerId: string

    Returns void

highlightGraphics

  • highlightGraphics(graphics: Graphic[], highlightLayerName?: string): void
  • Highlights the provided graphics on the provided layer (or default)

    deprecated

    call highlightManager.highlightFeatures instead, or use the commands from HighlightModule

    Parameters

    • graphics: Graphic[]
    • Optional highlightLayerName: string

    Returns void

highlightSelected

  • highlightSelected(features: InfrastructureFeature[] | Graphic[], highlightLayerId?: string): void
  • Highlights a feature with selected status only, omitting the base highlight. This is used in order to implement persistent selection highlights.

    Parameters

    • features: InfrastructureFeature[] | Graphic[]
    • Optional highlightLayerId: string

    Returns void

redrawHighlight

  • redrawHighlight(highlightId: string): void
  • Redraws a single feature's highlight, keyed by highlight id

    Parameters

    • highlightId: string

    Returns void

redrawHighlights

  • redrawHighlights(highlightLayerId?: string): void
  • Redraws the current set of highlights. If any have been suppressed or have changed geometries this will update them.

    Parameters

    • Optional highlightLayerId: string

    Returns void

refreshHighlights

  • refreshHighlights(highlightLayerId?: string): void
  • Called when LayerVisualizationChangedEvent fires. Will reapply highlight symbology using the renderer currently active on the layer.

    Parameters

    • Optional highlightLayerId: string

    Returns void

removeHighlightLayer

  • removeHighlightLayer(layerName: string): void
  • Removes the layer with the specified name, and any associated highlights.

    Parameters

    • layerName: string

      The name of the layer to remove.

    Returns void

setActiveHighlightLayer

  • setActiveHighlightLayer(layerName: string): void
  • Sets the active highlight layer. This is the layer that new features will be added to, or cleared from. TODO: Deprecate this concept entirely. Still technically necessary from workflow if managing multiple highlight layers though.

    Parameters

    • layerName: string

      The name of the layer to set as Active.

    Returns void

setBorderWidth

  • setBorderWidth(width: number, layer?: string | HighlightLayer): void
  • Sets the border width to the one specified. Note that highlights and focus have the same border width at the moment. This is for commands that use a single value to set the highlight border width.

    Parameters

    • width: number

      The number (in pixels) for the width of the highlight.

    • Optional layer: string | HighlightLayer

    Returns void

setFocusedBorderColor

  • setFocusedBorderColor(color: string | Color, layer?: string | HighlightLayer): void
  • Sets the focused border color to the one specified. Used by commands and config that takes a single color

    Parameters

    • color: string | Color

      Any color format accepted by dojo.Color constructor.

    • Optional layer: string | HighlightLayer

    Returns void

setFocusedFillColor

  • setFocusedFillColor(color: string | Color, layer?: string | HighlightLayer): void
  • Sets the focused fill color to the one specified.

    Parameters

    • color: string | Color

      Any color format accepted by dojo.Color constructor.

    • Optional layer: string | HighlightLayer

    Returns void

setGeometryGeneralizationParams

  • setGeometryGeneralizationParams(thresholdVertices: number, maxDeviationInMeters: number): Promise<void>
  • Sets the geometry generalization parameters. If any of the parameters is 0 or invalid, generalization is disabled.

    Parameters

    • thresholdVertices: number
    • maxDeviationInMeters: number

    Returns Promise<void>

    Returns a promise which is resolved when the appropriate internal parameters are computed and applied.

setHighlightBorderColor

  • setHighlightBorderColor(color: string | Color, layer?: string | HighlightLayer): void
  • Sets the border color to the one specified. Used by commands and config that takes a single color

    Parameters

    • color: string | Color

      Any color format accepted by dojo.Color constructor.

    • Optional layer: string | HighlightLayer

    Returns void

setHighlightFillColor

  • setHighlightFillColor(color: string | Color, layer?: string | HighlightLayer): void
  • Sets the fill color to the one specified.

    Parameters

    • color: string | Color

      Any color format accepted by dojo.Color constructor.

    • Optional layer: string | HighlightLayer

    Returns void

setHighlightLineOpacity

  • setHighlightLineOpacity(opacity: number, layer?: string | HighlightLayer): void
  • Sets the opacity of polyline highlights. Other geometry types are not affected.

    Parameters

    Returns void

setInnerBorderWidth

  • setInnerBorderWidth(width: number, layer?: string | HighlightLayer): void
  • Individual setter for inner border width.

    Parameters

    Returns void

setInnerFocusedBorderColor

  • setInnerFocusedBorderColor(color: Color | string, layer?: string | HighlightLayer): void
  • Individual setter for inner focus border color

    Parameters

    Returns void

setInnerHighlightBorderColor

  • setInnerHighlightBorderColor(color: string | Color, layer?: string | HighlightLayer): void
  • Individual setter for inner highlight border color

    Parameters

    Returns void

setInnerSelectionBorderColor

  • setInnerSelectionBorderColor(color: Color | string, layer?: string | HighlightLayer): void
  • Individual setter for inner focus border color

    Parameters

    Returns void

setMaxHighlightableGeometryVertices

  • setMaxHighlightableGeometryVertices(val: number): void
  • Sets the maximum number of vertices a geometry can contain for it to be highlightable. A value of '0' means unlimited.

    Parameters

    • val: number

    Returns void

setOuterBorderWidth

  • setOuterBorderWidth(width: number, layer?: string | HighlightLayer): void
  • Individual setter for outer border width.

    Parameters

    Returns void

setOuterFocusedBorderColor

  • setOuterFocusedBorderColor(color: Color | string, layer?: string | HighlightLayer): void
  • Individual setter for outer focus border color

    Parameters

    Returns void

setOuterHighlightBorderColor

  • setOuterHighlightBorderColor(color: string | Color, layer?: string | HighlightLayer): void
  • Individual setter for outer highlight border color

    Parameters

    Returns void

setOuterSelectionBorderColor

  • setOuterSelectionBorderColor(color: Color | string, layer?: string | HighlightLayer): void
  • Individual setter for outer focus border color

    Parameters

    Returns void

setSelectionBorderColor

  • setSelectionBorderColor(color: string | Color, layer?: string | HighlightLayer): void
  • Sets the focused border color to the one specified. Used by commands and config that takes a single color

    Parameters

    • color: string | Color

      Any color format accepted by dojo.Color constructor.

    • Optional layer: string | HighlightLayer

    Returns void

setSelectionFillColor

  • setSelectionFillColor(color: string | Color, layer?: string | HighlightLayer): void
  • Sets the focused fill color to the one specified.

    Parameters

    • color: string | Color

      Any color format accepted by dojo.Color constructor.

    • Optional layer: string | HighlightLayer

    Returns void

suppressHighlight

  • suppressHighlight(graphic: Graphic): void
  • Suppresses highlights, with the ability to return to the original state by calling enableHighlight Note that highlights will be suppressed across all layers the geometry appears on (to deal properly with temp editing layers)

    Parameters

    • graphic: Graphic

      The graphic to supress.

    Returns void

updateHighlightId

  • updateHighlightId(graphic: Graphic, originalHighlightId?: string): boolean
  • Given a graphic, this method will change all stored highlights using the attached or supplied highlightId to use a new highlightId created from the geometry of the graphic. Use when a graphics geometry changes.

    Parameters

    • graphic: Graphic
    • Optional originalHighlightId: string

    Returns boolean