Options
All
  • Public
  • Public/Protected
  • All
Menu

Provides methods for converting between Geocortex/Esri API objects and their ArcGIS web map 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

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

  • _applyDrawingInfo(drawingInfo: DrawingInfo, mapService: EssentialsMapService): Promise<void>
  • Parameters

    • drawingInfo: DrawingInfo
    • mapService: EssentialsMapService

    Returns Promise<void>

Protected _applyWebMapLayerToGcxLayer

  • _applyWebMapLayerToGcxLayer(layer: WebMapLayer, index: number, gcxLayer: Layer): Promise<boolean>
  • Applies web map configuration to an Essentials layer. Returns a boolean indicating whether the map service will need to be refreshed as a result.

    Parameters

    • layer: WebMapLayer
    • index: number
    • gcxLayer: Layer

    Returns 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>
  • Applies a web map service layer configuration to an Essentials map service.

    Parameters

    • serviceLayer: ServiceLayer
    • mapService: EssentialsMapService

    Returns Promise<void>

Protected _canCreateGcxLayer

  • _canCreateGcxLayer(layer: WebMapLayer, mapService: EssentialsMapService): boolean
  • Determines whether a new Essentials Layer object can be created for the given web map layer if no existing layer matches.

    Parameters

    • layer: WebMapLayer
    • mapService: EssentialsMapService

    Returns boolean

Protected _canCreateGcxMapService

  • _canCreateGcxMapService(serviceLayer: ServiceLayer): boolean
  • Determines whether a new Essentials MapService object can be created for the given web map service layer if no existing map service matches.

    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 _createGcxLayer

  • _createGcxLayer(layer: WebMapLayer, mapService: EssentialsMapService): Promise<Layer>
  • Invoked when a new Essentials Layer object needs to be created from the given web map layer.

    Parameters

    • layer: WebMapLayer
    • mapService: EssentialsMapService

    Returns Promise<Layer>

Protected _createGcxMapService

  • _createGcxMapService(serviceLayer: ServiceLayer): Promise<EssentialsMapService>
  • Invoked when a new Essentials MapService object needs to be created from the given web map service layer.

    Parameters

    Returns Promise<EssentialsMapService>

Protected _esriFeatureLayerToFeatureCollection

  • _esriFeatureLayerToFeatureCollection(featureLayer: FeatureLayer): FeatureCollection
  • Parameters

    • featureLayer: FeatureLayer

    Returns FeatureCollection

Protected _findOrCreateMatchingGcxLayer

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

    • layer: WebMapLayer
    • mapService: EssentialsMapService

    Returns Promise<Layer>

Protected _findOrCreateMatchingGcxMapService

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

    Returns Promise<EssentialsMapService>

Protected _fromEsriColor

  • _fromEsriColor(color: Color): Color
  • Parameters

    • color: Color

    Returns Color

Protected _fromEsriFeatureLayer

  • Parameters

    • layer: FeatureLayer

    Returns ServiceLayer

Protected _fromEsriFeatureSet

  • _fromEsriFeatureSet(featureSet: FeatureSet): WebMapFeatureSet
  • Parameters

    • featureSet: FeatureSet

    Returns WebMapFeatureSet

Protected _fromEsriGeometry

  • _fromEsriGeometry(geometry: Geometry): Geometry
  • Parameters

    • geometry: Geometry

    Returns Geometry

Protected _fromEsriGraphic

  • _fromEsriGraphic(graphic: Graphic): WebMapFeature
  • Parameters

    • graphic: Graphic

    Returns WebMapFeature

Protected _fromEsriGraphicsLayer

  • _fromEsriGraphicsLayer(layer: GraphicsLayer): ServiceLayer
  • Parameters

    • layer: GraphicsLayer

    Returns ServiceLayer

Protected _fromEsriLabelingInfo

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

    • labelClasses: LabelClass[]

    Returns LabelingInfo[]

Protected _fromEsriLayer

  • Parameters

    • layer: Layer

    Returns ServiceLayer

Protected _fromEsriRenderer

  • _fromEsriRenderer(renderer: Renderer): Renderer
  • Parameters

    • renderer: Renderer

    Returns Renderer

Protected _fromEsriSpatialReference

  • _fromEsriSpatialReference(spatialReference: SpatialReference): SpatialReference
  • Parameters

    • spatialReference: SpatialReference

    Returns SpatialReference

Protected _fromEsriSymbol

  • _fromEsriSymbol(symbol: Symbol | JSON): WebMapSymbol
  • Parameters

    • symbol: Symbol | JSON

    Returns WebMapSymbol

Protected _fromGcxFeature

  • _fromGcxFeature(feature: Feature): WebMapFeature
  • Parameters

    Returns WebMapFeature

Protected _fromGcxFeatureSet

  • _fromGcxFeatureSet(featureSet: FeatureSet): WebMapFeatureSet
  • Parameters

    Returns WebMapFeatureSet

Protected _fromGcxMapService

  • _fromGcxMapService(mapService: EssentialsMapService): ServiceLayer
  • Parameters

    • mapService: EssentialsMapService

    Returns ServiceLayer

Protected _fromGcxTable

  • Parameters

    Returns Table

Protected _fromGcxlayer

  • _fromGcxlayer(layer: Layer): WebMapLayer
  • Parameters

    Returns WebMapLayer

Protected _fromObject

  • _fromObject(object: any): any
  • Parameters

    • object: any

    Returns any

Protected _getFeatureReductionSettings

  • _getFeatureReductionSettings(mapService: EssentialsMapService): FeatureReduction
  • Returns an AGOL clustering configuration that represents a combination of our settings and their defaults.

    Parameters

    • mapService: EssentialsMapService

    Returns FeatureReduction

Protected _getMapServiceDefinition

  • Gets the Essentials map service definition from a service layer for use with _createGcxMapService().

    Parameters

    Returns any

Protected _getPopupInfoFromLayer

  • Returns a popupInfo object based on the configured settings for this layer

    Parameters

    Returns PopupInfo

Protected _getWebMapLayerDefinitionFromDynamicLayer

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

    • dynamicServiceLayer: ArcGISDynamicMapServiceLayer
    • layerId: number

    Returns LayerDefinition

Protected _getWebMapLayerDefinitionFromFeatureLayer

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

    • featureLayer: FeatureLayer
    • Optional mapService: EssentialsMapService

    Returns LayerDefinition

Protected _getWebMapLayerDefinitionFromWfsLayer

  • _getWebMapLayerDefinitionFromWfsLayer(wfsLayer: WFSLayer): LayerDefinition
  • Parameters

    • wfsLayer: WFSLayer

    Returns 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

  • Parameters

    Returns boolean

Protected _isGraphicsLayer

  • Parameters

    Returns boolean

Protected _isKmlLayer

  • Parameters

    Returns boolean

Protected _isLayerCatalogService

  • _isLayerCatalogService(serviceLayer: ServiceLayer): boolean
  • Parameters

    Returns boolean

Protected _setGraphicsLayerRenderer

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

    • serviceLayer: GraphicsLayer
    • renderer: Renderer

    Returns 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
  • Parameters

    Returns Color

Protected _toEsriFeatureLayer

  • Parameters

    Returns Promise<Layer>

Protected _toEsriFeatureSet

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

    • featureSet: WebMapFeatureSet

    Returns Promise<FeatureSet>

Protected _toEsriGeometry

  • _toEsriGeometry(geometry: Geometry): Geometry
  • Parameters

    Returns Geometry

Protected _toEsriGraphic

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

    • feature: WebMapFeature

    Returns Promise<Graphic>

Protected _toEsriGraphicsLayer

  • Parameters

    Returns Promise<Layer>

Protected _toEsriLabelingInfo

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

    Returns LabelClass[]

Protected _toEsriLayer

  • Parameters

    Returns Promise<Layer>

Protected _toEsriRenderer

  • _toEsriRenderer(renderer: Renderer): Renderer
  • Parameters

    Returns Renderer

Protected _toEsriSpatialReference

  • Parameters

    Returns SpatialReference

Protected _toEsriSymbol

  • _toEsriSymbol(symbol: WebMapSymbol): Symbol
  • Parameters

    • symbol: WebMapSymbol

    Returns Symbol

Protected _toGcxFeature

  • _toGcxFeature(feature: WebMapFeature): Promise<Feature>
  • Parameters

    • feature: WebMapFeature

    Returns Promise<Feature>

Protected _toGcxFeatureSet

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

    • featureSet: WebMapFeatureSet

    Returns Promise<FeatureSet>

Protected _toGcxLayer

  • Parameters

    Returns Promise<Layer>

Protected _toGcxMapService

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

    Returns 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
  • Returns void

fromEsriColor

  • fromEsriColor(color: Color): Color
  • Parameters

    • color: Color

    Returns Color

fromEsriFeatureSet

  • fromEsriFeatureSet(featureSet: FeatureSet): WebMapFeatureSet
  • Parameters

    • featureSet: FeatureSet

    Returns WebMapFeatureSet

fromEsriGeometry

  • fromEsriGeometry(geometry: Geometry): Geometry
  • Parameters

    • geometry: Geometry

    Returns Geometry

fromEsriGraphic

  • fromEsriGraphic(graphic: Graphic): WebMapFeature
  • Parameters

    • graphic: Graphic

    Returns WebMapFeature

fromEsriLabelingInfo

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

    • labelingInfo: LabelClass[]

    Returns LabelingInfo[]

fromEsriLayer

  • Parameters

    • layer: Layer

    Returns ServiceLayer

fromEsriRenderer

  • fromEsriRenderer(renderer: Renderer): Renderer
  • Parameters

    • renderer: Renderer

    Returns Renderer

fromEsriSpatialReference

  • fromEsriSpatialReference(spatialReference: SpatialReference): SpatialReference
  • Parameters

    • spatialReference: SpatialReference

    Returns SpatialReference

fromEsriSymbol

  • fromEsriSymbol(symbol: Symbol): WebMapSymbol
  • Parameters

    • symbol: Symbol

    Returns WebMapSymbol

fromGcxFeature

  • fromGcxFeature(feature: Feature): WebMapFeature
  • Parameters

    Returns WebMapFeature

fromGcxFeatureSet

  • fromGcxFeatureSet(featureSet: FeatureSet): WebMapFeatureSet
  • Parameters

    Returns WebMapFeatureSet

fromGcxLayer

  • fromGcxLayer(layer: Layer): WebMapLayer
  • Parameters

    Returns WebMapLayer

fromGcxMapService

  • fromGcxMapService(mapService: EssentialsMapService): ServiceLayer
  • Parameters

    • mapService: EssentialsMapService

    Returns ServiceLayer

fromGcxTable

  • Parameters

    Returns Table

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
  • Parameters

    Returns Color

toEsriFeatureSet

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

    • featureSet: WebMapFeatureSet

    Returns Promise<FeatureSet>

toEsriGeometry

  • toEsriGeometry(geometry: Geometry): Geometry
  • Parameters

    Returns Geometry

toEsriGraphic

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

    • feature: WebMapFeature

    Returns Promise<Graphic>

toEsriLabelingInfo

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

    Returns LabelClass[]

toEsriLayer

  • Parameters

    Returns Promise<Layer>

toEsriRenderer

  • toEsriRenderer(renderer: Renderer): Renderer
  • Parameters

    Returns Renderer

toEsriSpatialReference

  • Parameters

    Returns SpatialReference

toEsriSymbol

  • toEsriSymbol(symbol: WebMapSymbol): Symbol
  • Parameters

    • symbol: WebMapSymbol

    Returns Symbol

toGcxFeature

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

    • feature: WebMapFeature

    Returns Promise<Feature>

toGcxFeatureSet

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

    • featureSet: WebMapFeatureSet

    Returns Promise<FeatureSet>

toGcxLayer

  • Parameters

    Returns Promise<Layer>

toGcxMapService

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

    Returns 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>