Options
All
  • Public
  • Public/Protected
  • All
Menu

Provides methods for converting between Geocortex/Esri API objects and their project equivalents.

Note that once an input object has been converted, any additional attempts to convert it again will always return a reference to the same result object (this is a form of the Identity Map pattern). To reset this mapping, use clearCache().

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Protected _gcxLayerDefinitionFilter

_gcxLayerDefinitionFilter: object

A filter that determines which properties to save and restore for user-added layers.

Protected _gcxMapServiceDefinitionFilter

_gcxMapServiceDefinitionFilter: object

A filter that determines which properties to save and restore for user-added map services.

app

Methods

Protected _addSourceType

  • _addSourceType(sourceType: string, object: any): any
  • Adds a property to a converted object that identifies the type of the original source object.

    Parameters

    • sourceType: string
    • object: any

    Returns any

Protected _applyDrawingInfo

Protected _applyDynamicLayerInfo

  • _applyDynamicLayerInfo(layer: ProjectLayer, index: number, gcxLayer: Layer): void
  • Parameters

    • layer: ProjectLayer
    • index: number
    • gcxLayer: Layer

    Returns void

Protected _applyFeatureToGcxFeature

  • _applyFeatureToGcxFeature(feature: ProjectFeature, gcxFeature: Feature): Promise<void>
  • Parameters

    • feature: ProjectFeature
    • gcxFeature: Feature

    Returns Promise<void>

Protected _applyWebMapLayerToGcxLayer

  • _applyWebMapLayerToGcxLayer(layer: WebMapLayer, index: number, gcxLayer: Layer): Promise<boolean>

Protected _applyWebMapLayersToGcxLayers

  • _applyWebMapLayersToGcxLayers(serviceLayer: OperationalLayer, mapService: EssentialsMapService): Promise<boolean>
  • Applies web map layer configuration to a map service's layers. Returns a boolean indicating whether the map service will need to be refreshed as a result.

    Parameters

    Returns Promise<boolean>

Protected _applyWebMapServiceLayerToMapService

  • _applyWebMapServiceLayerToMapService(serviceLayer: ServiceLayer, mapService: EssentialsMapService): Promise<void>

Protected _canCreateGcxLayer

  • _canCreateGcxLayer(layer: WebMapLayer, mapService: MapService): boolean

Protected _canCreateGcxMapService

  • _canCreateGcxMapService(serviceLayer: WebMapServiceLayer): boolean

Protected _canRequeryFeatureData

  • _canRequeryFeatureData(feature: Feature): boolean
  • Determines whether a feature can be serialized using only its ID, rather than storing all of its attribute and geometry data. In this case, the original layer will be re-queried during deserialization to restore the data.

    Parameters

    Returns boolean

Protected _convert

  • _convert(source: any, destType: string, doConversion: function, args?: any[]): any
  • A wrapper for conversion methods that implements the Identity Map behaviour.

    Parameters

    • source: any
    • destType: string
    • doConversion: function
        • (arg0: any): any
        • Parameters

          • arg0: any

          Returns any

    • Optional args: any[]

    Returns any

Protected _createGcxFeature

  • _createGcxFeature(feature: ProjectFeature): Promise<Feature>
  • Parameters

    • feature: ProjectFeature

    Returns Promise<Feature>

Protected _createGcxLayer

  • _createGcxLayer(layer: WebMapLayer, mapService: MapService): Promise<Layer>

Protected _createGcxMapService

  • _createGcxMapService(serviceLayer: WebMapServiceLayer): Promise<MapService>

Protected _esriFeatureLayerToFeatureCollection

  • _esriFeatureLayerToFeatureCollection(featureLayer: FeatureLayer): FeatureCollection

Protected _findMatchingGcxFeature

  • _findMatchingGcxFeature(feature: ProjectFeature, gcxFeatureSet: FeatureSet): Promise<Feature>
  • Parameters

    • feature: ProjectFeature
    • gcxFeatureSet: FeatureSet

    Returns Promise<Feature>

Protected _findOrCreateMatchingGcxLayer

  • _findOrCreateMatchingGcxLayer(layer: WebMapLayer, mapService: EssentialsMapService): Promise<Layer>

Protected _findOrCreateMatchingGcxMapService

  • _findOrCreateMatchingGcxMapService(serviceLayer: ServiceLayer): Promise<EssentialsMapService>

Protected _fromEsriColor

  • _fromEsriColor(color: Color): Color

Protected _fromEsriFeatureLayer

Protected _fromEsriFeatureSet

  • _fromEsriFeatureSet(featureSet: FeatureSet): WebMapFeatureSet

Protected _fromEsriGeometry

  • _fromEsriGeometry(geometry: Geometry): Geometry

Protected _fromEsriGraphic

  • _fromEsriGraphic(graphic: Graphic): WebMapFeature

Protected _fromEsriGraphicsLayer

  • _fromEsriGraphicsLayer(layer: GraphicsLayer): ServiceLayer

Protected _fromEsriLabelingInfo

  • _fromEsriLabelingInfo(labelClasses: LabelClass[]): LabelingInfo[]

Protected _fromEsriLayer

Protected _fromEsriRenderer

  • _fromEsriRenderer(renderer: Renderer): Renderer

Protected _fromEsriSpatialReference

  • _fromEsriSpatialReference(spatialReference: SpatialReference): SpatialReference

Protected _fromEsriSymbol

  • _fromEsriSymbol(symbol: Symbol | JSON): WebMapSymbol

Protected _fromGcxExtendedProperties

Protected _fromGcxFeature

  • _fromGcxFeature(feature: Feature): ProjectFeature

Protected _fromGcxFeatureSet

  • _fromGcxFeatureSet(featureSet: FeatureSet): ProjectFeatureSet

Protected _fromGcxFeatureSetCollection

  • Parameters

    Returns ProjectFeatureSetCollection

Protected _fromGcxMapService

Protected _fromGcxTable

Protected _fromGcxlayer

  • _fromGcxlayer(layer: Layer): ProjectLayer

Protected _fromObject

  • _fromObject(object: any): any

Protected _getFeatureReductionSettings

  • _getFeatureReductionSettings(mapService: EssentialsMapService): FeatureReduction

Protected _getMapServiceDefinition

  • _getMapServiceDefinition(serviceLayer: WebMapServiceLayer): any

Protected _getPopupInfoFromLayer

Protected _getWebMapLayerDefinitionFromDynamicLayer

  • _getWebMapLayerDefinitionFromDynamicLayer(dynamicServiceLayer: ArcGISDynamicMapServiceLayer, layerId: number): LayerDefinition

Protected _getWebMapLayerDefinitionFromFeatureLayer

  • _getWebMapLayerDefinitionFromFeatureLayer(featureLayer: FeatureLayer, mapService?: EssentialsMapService): LayerDefinition

Protected _getWebMapLayerDefinitionFromWfsLayer

  • _getWebMapLayerDefinitionFromWfsLayer(wfsLayer: WFSLayer): LayerDefinition

Protected _inferAttributeType

  • _inferAttributeType(graphics: Graphic[], attributeName: string): string
  • Infers the type of an attribute from a given set of Graphic objects.

    Parameters

    • graphics: Graphic[]
    • attributeName: string

    Returns string

Protected _isFeatureCollection

Protected _isGraphicsLayer

Protected _isKmlLayer

Protected _isLayerCatalogService

  • _isLayerCatalogService(serviceLayer: ServiceLayer): boolean

Protected _queryFeatures

  • _queryFeatures(features: ProjectFeature[], featureSet: ProjectFeatureSet): Promise<Graphic[]>
  • Parameters

    • features: ProjectFeature[]
    • featureSet: ProjectFeatureSet

    Returns Promise<Graphic[]>

Protected _setGraphicsLayerRenderer

  • _setGraphicsLayerRenderer(serviceLayer: GraphicsLayer, renderer: Renderer): void

Protected _setVisibleLayers

  • _setVisibleLayers(serviceLayer: OperationalLayer, mapService: EssentialsMapService): boolean
  • Sets a map service's visible layers based on the settings in a web map operational layer. Returns a boolean indicating whether the service needs to be refreshed, i.e. whether any layer visibilities have changed.

    Parameters

    Returns boolean

Protected _toEsriColor

  • _toEsriColor(color: Color): Color

Protected _toEsriFeatureLayer

Protected _toEsriFeatureSet

  • _toEsriFeatureSet(featureSet: ProjectFeatureSet): Promise<FeatureSet>

Protected _toEsriGeometry

  • _toEsriGeometry(geometry: Geometry): Geometry

Protected _toEsriGraphic

  • _toEsriGraphic(feature: WebMapFeature): Promise<Graphic>

Protected _toEsriGraphicsLayer

Protected _toEsriLabelingInfo

  • _toEsriLabelingInfo(labelingInfo: LabelingInfo[]): LabelClass[]

Protected _toEsriLayer

Protected _toEsriRenderer

  • _toEsriRenderer(renderer: Renderer): Renderer

Protected _toEsriSpatialReference

Protected _toEsriSymbol

  • _toEsriSymbol(symbol: WebMapSymbol): Symbol

Protected _toGcxExtendedProperties

  • _toGcxExtendedProperties(extendedProperties: object, owner: string): Promise<NameValueProperty[]>
  • Parameters

    • extendedProperties: object
      • [name: string]: any
    • owner: string

    Returns Promise<NameValueProperty[]>

Protected _toGcxFeature

  • _toGcxFeature(feature: ProjectFeature): Promise<Feature>

Protected _toGcxFeatureSet

  • _toGcxFeatureSet(featureSet: ProjectFeatureSet): Promise<FeatureSet>

Protected _toGcxFeatureSetCollection

  • Parameters

    • fsc: ProjectFeatureSetCollection

    Returns Promise<FeatureSetCollection>

Protected _toGcxLayer

  • _toGcxLayer(layer: WebMapLayer, serviceLayer: WebMapServiceLayer): Promise<Layer>
  • Parameters

    • layer: WebMapLayer
    • serviceLayer: WebMapServiceLayer

    Returns Promise<Layer>

Protected _toGcxMapService

  • _toGcxMapService(serviceLayer: ServiceLayer): Promise<EssentialsMapService>

Protected _toObject

  • _toObject(object: any): Promise<any>
  • Parameters

    • object: any

    Returns Promise<any>

Protected _transformArcadeTokensToAGOLFormat

  • _transformArcadeTokensToAGOLFormat(template: string, exprTokens: string[]): string
  • Arcade Expression replacement tokens must all be prefixed with 'expression/' in AGOL

    Parameters

    • template: string
    • exprTokens: string[]

    Returns string

clearCache

  • clearCache(): void

clearExclusionCache

  • clearExclusionCache(): void
  • Returns void

exclude

  • exclude(object: any, destType: string): void
  • Parameters

    • object: any
    • destType: string

    Returns void

fromEsriColor

  • fromEsriColor(color: Color): Color

fromEsriFeatureSet

  • fromEsriFeatureSet(featureSet: FeatureSet): ProjectFeatureSet

fromEsriGeometry

  • fromEsriGeometry(geometry: Geometry): Geometry

fromEsriGraphic

  • fromEsriGraphic(graphic: Graphic): ProjectFeature

fromEsriLabelingInfo

  • fromEsriLabelingInfo(labelingInfo: LabelClass[]): LabelingInfo[]

fromEsriLayer

fromEsriRenderer

  • fromEsriRenderer(renderer: Renderer): Renderer

fromEsriSpatialReference

  • fromEsriSpatialReference(spatialReference: SpatialReference): SpatialReference

fromEsriSymbol

  • fromEsriSymbol(symbol: Symbol): WebMapSymbol

fromGcxFeature

  • fromGcxFeature(feature: Feature): ProjectFeature

fromGcxFeatureSet

  • fromGcxFeatureSet(featureSet: FeatureSet): ProjectFeatureSet

fromGcxFeatureSetCollection

  • Parameters

    Returns ProjectFeatureSetCollection

fromGcxLayer

  • fromGcxLayer(layer: Layer): ProjectLayer

fromGcxMapService

fromGcxTable

fromObject

  • fromObject(object: any): any
  • Converts an arbitrary object graph to a format that can be stored in a web map.

    Parameters

    • object: any

    Returns any

toEsriColor

  • toEsriColor(color: Color): Color

toEsriFeatureSet

  • toEsriFeatureSet(featureSet: WebMapFeatureSet): Promise<FeatureSet>
  • Parameters

    • featureSet: WebMapFeatureSet

    Returns Promise<FeatureSet>

toEsriGeometry

  • toEsriGeometry(geometry: Geometry): Geometry

toEsriGraphic

  • toEsriGraphic(feature: WebMapFeature): Promise<Graphic>
  • Parameters

    • feature: WebMapFeature

    Returns Promise<Graphic>

toEsriLabelingInfo

  • toEsriLabelingInfo(labelingInfo: LabelingInfo[]): LabelClass[]

toEsriLayer

toEsriRenderer

  • toEsriRenderer(renderer: Renderer): Renderer

toEsriSpatialReference

toEsriSymbol

  • toEsriSymbol(symbol: WebMapSymbol): Symbol
  • Parameters

    • symbol: WebMapSymbol

    Returns Symbol

toGcxFeature

  • toGcxFeature(feature: WebMapFeature): Promise<Feature>

toGcxFeatureSet

  • toGcxFeatureSet(featureSet: WebMapFeatureSet): Promise<FeatureSet>

toGcxFeatureSetCollection

  • Parameters

    • fsc: ProjectFeatureSetCollection

    Returns Promise<FeatureSetCollection>

toGcxLayer

toGcxMapService

  • toGcxMapService(serviceLayer: ServiceLayer): Promise<EssentialsMapService>

toObject

  • toObject(data: any): Promise<any>
  • Converts serialized web map data back into the original API objects wherever possible. This only works if the object graph was serialized using fromObject(). Note that prototype chains for object types other than the specific Geocortex/Esri types handled by this class will NOT be preserved by toObject(fromObject(someObject)).

    Parameters

    • data: any

    Returns Promise<any>