Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • FeatureSet

Index

Constructors

constructor

  • Initializes a new instance of the {@link geocortex.essentialsHtmlViewer.mapping.infrastructure.FeatureSet} class.

    class

    Represents a Geocortex Essentials FeatureSet.

    constructs
    memberof

    geocortex.essentialsHtmlViewer.mapping.infrastructure

    Parameters

    • Optional options: FeatureSetOptions

      The options for the new FeatureSet (i.e. esriFeatureSet / layer / allowUnsafeContent).

    Returns FeatureSet

Properties

app

The {@link geocortex.framework.application.Application} that this module belongs to.

attributes

The collection of feature attributes

type

ObservableCollection

dataLinksResolved

dataLinksResolved: Observable<boolean>

Whether the datalinks (if any) for this feature set have been resolved.

dataLinksState

dataLinksState: DataLinksState

Indicates the current state with regard to resolving data links.

defaultDateFormat

defaultDateFormat: string

The default format to use for displaying date fields that have no explicit format.

defaultNumberFormat

defaultNumberFormat: string

The default format to use for displaying number fields that have no explicit format.

displayName

displayName: LazyObservable<string>

The display name to be associated with this FeatureSet. Get display name from layer if not explicitly set.

type

String

esriFeatureSet

esriFeatureSet: FeatureSet

Set of ESRI features

type

esri FeatureSet

extendedProperties

More properties of feature set

type

ObservableCollection

featureLayer

featureLayer: FeatureLayer

The esri feature layer containing metadata about the feature attributes.

features

The collection of Geocortex Features.

type

ObservableCollection

iconUri

iconUri: LazyObservable<string>

The icon associated with this featureSet. If not explicitly set, obtain from layer if available

type

String

id

id: string

An id of this feature set

type

String

isSelectedInCollection

isSelectedInCollection: Observable<boolean>

Only used by a particular view model. This should be refactored out.

layer

layer: Layer

The Layer this FeatureSet is a part of.

type

geocortex.essentials.Layer

uniqueId

uniqueId: string

An id guaranteed to be unique (auto-generated).

type

String

Methods

Protected _addFeatureWithoutNotification

  • _addFeatureWithoutNotification(feature: Feature, doNotCheckForDuplicates?: boolean, featureSetIndex?: number): boolean
  • Parameters

    • feature: Feature
    • Optional doNotCheckForDuplicates: boolean
    • Optional featureSetIndex: number

    Returns boolean

Private _applyDataLinks

  • _applyDataLinks(featureSet: FeatureSet, features: Feature[], dataLinks: any[], resultsCollection: any[], onDataLinkAddedToFeature?: function): void
  • Apply the datalinks with the given featureSet, datalinks and results collection

    Parameters

    • featureSet: FeatureSet
    • features: Feature[]
    • dataLinks: any[]

      The datalinks to be applied

    • resultsCollection: any[]
    • Optional onDataLinkAddedToFeature: function

    Returns void

Protected _cloneEsriStructure

  • _cloneEsriStructure(esriFeatureSet: FeatureSet): FeatureSet
  • Parameters

    • esriFeatureSet: FeatureSet

    Returns FeatureSet

Protected _fixFeatureSchema

  • Parameters

    Returns Feature

Protected _removeWithoutNotificationAt

  • _removeWithoutNotificationAt(index: number): boolean
  • Parameters

    • index: number

    Returns boolean

Protected _unwatchFeatureSetChanges

  • _unwatchFeatureSetChanges(): void
  • Returns void

Protected _watchFeatureSetChanges

  • _watchFeatureSetChanges(): RemovableHandle
  • Returns RemovableHandle

addFeature

  • addFeature(feature: Feature, doNotCheckForDuplicates?: boolean, featureSetIndex?: number): boolean
  • Adds a feature to this FeatureSet.

    Parameters

    • feature: Feature

      The feature to add to the featureSet.

    • Optional doNotCheckForDuplicates: boolean

      When true, the supplied feature will be added to this set without checking for duplicates. The default value is false.

    • Optional featureSetIndex: number

      Optional. If provided, feature is inserted at specified index in the featureSet.

    Returns boolean

addFeatureAt

  • addFeatureAt(feature: Feature, doNotCheckForDuplicates?: boolean, featureSetIndex?: number): boolean
  • Adds a feature to this FeatureSet at a specific index.

    Parameters

    • feature: Feature

      The feature to add to the featureSet.

    • Optional doNotCheckForDuplicates: boolean

      When true, the supplied feature will be added to this set without checking for duplicates. The default value is false.

    • Optional featureSetIndex: number

      Optional. If provided, feature is inserted at specified index in the featureSet.

    Returns boolean

append

  • Adds only those features to the feature set that are not already part of the feature set.

    Parameters

    Returns void

clearFeatures

  • clearFeatures(): void
  • Removes all features from this FeatureSet.

    Returns void

clone

  • Performs a shallow copy of this FeatureSet, returning the cloned value.

    Returns FeatureSet

cloneStructure

  • Given a FeatureSet, creates a new empty one just like the original (same layer, name etc) Note: This method will not copy the features within the original FeatureSet.

    Returns FeatureSet

containsFeature

  • containsFeature(feature: Feature): boolean
  • Determines whether a feature is in this FeatureSet.

    This method determines equality by using the default equality comparer for features, as defined in {@link geocortex.essentialsHtmlViewer.mapping.infrastructure.Feature.equals}().
    This method performs a linear search; therefore, this method is an O(n) operation, where n is the number of features.

    Parameters

    • feature: Feature

      The feature to locate in the FeatureSet.

    Returns boolean

    true if feature is found in the FeatureSet; otherwise, false.

doWhenDataLinkingCompleted

  • doWhenDataLinkingCompleted(callback: function): void
  • Executes the specified callback function when the datalinking operation is completed, or immediately if the datalinks are already resolved.

    Parameters

    • callback: function

      The callback function to execute when the datalinks are resolved.

    Returns void

featureSetChanged

  • Updates the current collection of features.

    params

    args Type of operation done on feature set.

    Parameters

    Returns void

findFeatureByEsriFeature

  • findFeatureByEsriFeature(esriFeature: Graphic, featureLayer?: FeatureLayer): Feature
  • Finds the Geocortex feature corresponding to the given ESRI feature if it exists in the feature set. There is an inherent assumption here that a Geocortex feature instance will be unique in a feature set.

    Parameters

    • esriFeature: Graphic

      The esri graphic for which the corresponding Geocortex feature needs to be retrieved.

    • Optional featureLayer: FeatureLayer

    Returns Feature

    The Geocortex feature corresponding to the given ESRI feature, if it exists, or null.

findFeatureById

  • findFeatureById(id: any): Feature
  • Finds the Geocortex feature having the given ID (primary key value).

    Parameters

    • id: any

      The ID to search for.

    Returns Feature

    The Geocortex feature corresponding to the given ID if it exists, or null.

getExtendedPropertyByName

  • getExtendedPropertyByName(name: string): any
  • Finds the extended property matching the specified name.

    Parameters

    • name: string

      The name of the property to find.

    Returns any

intersect

  • Creates a new feature set that contains elements that exist in both this set and the specified set.

    Parameters

    • other: FeatureSet

      The feature set to compare to the current set.

    Returns FeatureSet

    A new feature set that contains any elements that exist in both sets.

intersectInPlace

  • Modifies the current set to produce the set intersection of two sequences of Features by using the default equality comparer to compare values. The intersection of two sets A and B is defined as the set that contains all the elements of A that also appear in B, but no other elements.

    Parameters

    • other: FeatureSet

      Set containing elements to be retained in this set.

    Returns boolean

    true if this set changed as a result of the call; false otherwise.

loadAttributes

  • loadAttributes(): void
  • Loads the feature attributes.

    Returns void

loadFeatures

  • loadFeatures(): void
  • Loads the features from ESRI feature set

    Returns void

loadGeometries

  • loadGeometries(features: Feature[], successCallback?: function, errorCallback?: function): Deferred
  • Load the geometries for the specified features (if not already loaded). If null is passed in, the geometries for all features will be fetched.

    Parameters

    • features: Feature[]

      An array of features to load geometries for.

    • Optional successCallback: function

      Function to be called when the geometries have been loaded.

        • (): void
        • Returns void

    • Optional errorCallback: function

      A function that is called if an error occurred.

        • (error: Error): void
        • Parameters

          • error: Error

          Returns void

    Returns Deferred

removeFeature

  • removeFeature(feature: Feature): boolean
  • Removes a feature from this FeatureSet.

    This method determines equality by using the default equality comparer for features, as defined in {@link geocortex.essentialsHtmlViewer.mapping.infrastructure.Feature.equals}().
    This method performs a linear search; therefore, this method is an O(n) operation, where n is the number of features.

    Parameters

    • feature: Feature

      The feature to remove.

    Returns boolean

    true if item was successfully removed; otherwise, false. This method also returns false if item is not found.

resolveDataLinks

  • resolveDataLinks<T>(onDataLinkAddedToFeature?: function, honorVisible?: boolean, userState?: T, onDataLinkingComplete?: function, onDataLinkingFailed?: function): void
  • Resolves the datalinks (if any) for this feature set

    Type parameters

    • T

    Parameters

    • Optional onDataLinkAddedToFeature: function

      Function to be called when a datalink is resolved for a given feature

    • Optional honorVisible: boolean

      Boolean of whether or not we should only resolve visible datalinks. By default this is true.

    • Optional userState: T

      A User State that will be returned to the complete and fail callbacks

    • Optional onDataLinkingComplete: function

      a function that is called if the operation completes successfully

        • Parameters

          Returns void

    • Optional onDataLinkingFailed: function

      a function that is called if an error occurs

        • (featureSet: FeatureSet, error: Error, userState: T): void
        • Parameters

          • featureSet: FeatureSet
          • error: Error
          • userState: T

          Returns void

    Returns void

Protected setDataLinksState

  • Parameters

    Returns void

setExtendedProperty

  • setExtendedProperty(name: string, value: any): void
  • Sets the extended property matching the specified name.

    Parameters

    • name: string

      The name of the property to update.

    • value: any

      The property value.

    Returns void

subtract

  • Creates a new feature set that contains elements of the current set that do not appear in the second set.

    Parameters

    • other: FeatureSet

      The feature set whose elements that also occur in the first set will cause those elements to be removed from the returned set.

    Returns FeatureSet

    A new feature set that contains the set difference of the elements of two sets.

subtractInPlace

  • Modifies the current set to produce the set difference of two sequences of Features by using the default equality comparer to compare values. The set difference of two sets is defined as the elements of the first set that do not appear in the second set. Note: This method modifies this set to only keep those elements that do not appear in the second set. It does not also include those elements in the second set that do not appear in this set.

    Parameters

    • other: FeatureSet

      Set containing elements to be removed from this set.

    Returns boolean

    true if this set changed as a result of the call; false otherwise.

union

  • Creates a new feature set that contains all elements that are present in either the current set or in the specified feature set.

    Parameters

    • other: FeatureSet

      The feature set to add elements from.

    Returns FeatureSet

    A new feature set with the items added; or a copy of the original set if all the items were already in the set.

unionInPlace

  • Modifies the current set to produce the set union of two sequences of Features by using the default equality comparer. In other words, it adds all of the elements in the second set to this set if they're not already present.

    Parameters

    • other: FeatureSet

      Set containing elements to be added to this set.

    Returns boolean

    true if this set changed as a result of the call; false otherwise.