Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "geocortex/infrastructure/LayerIntegrationUtils"

Index

Functions

buildFeatureLayerService

  • Build and initialize a populated Geocortex feature layer map service based on the provided feature service URL. The returned feature layer service will come with a service layer and a single Geocortex layer.

    Parameters

    • serviceUrl: string

    Returns Promise<FeatureLayerService>

    The promise of a Geocortex feature layer map service.

buildKmlService

  • buildKmlService(serviceUrl: string, serviceDefinition?: any): Promise<KmlService>
  • Build and initialize a KML map service based on the provided KML service URL.

    Parameters

    • serviceUrl: string

      The URL to the esri KML service layer.

    • Optional serviceDefinition: any

      A map service definition object containing the properties for the new map service (optional).

    Returns Promise<KmlService>

    The promise of a Geocortex KmlService.

buildLocalFeatureLayerService

  • buildLocalFeatureLayerService(featureCollectionObject: WebMapLayer, serviceDefinition?: any): Promise<LocalFeatureLayerService>
  • Create a local map service from a serialized feature layer (JSON data called a 'Feature Collection').

    Parameters

    • featureCollectionObject: WebMapLayer
    • Optional serviceDefinition: any

      A map service definition object containing the properties for the new map service (optional).

    Returns Promise<LocalFeatureLayerService>

    A Promise of a local feature layer service that exists in a disconnected state (does not have a valid URL).

discoverFeatureServices

  • discoverFeatureServices(url: string): Promise<string[]>
  • Queries the provided map service URL, and returns an array of feature service URLs that were found.

    Parameters

    • url: string

      Map service URL to interrogate for feature services.

    Returns Promise<string[]>

    The promise of an array of feature service URLs.

getGeocortexLayer

  • Utility method to assist with commands which take either a gcx Layer object or the id of one as a parameter. Generally this is done so that commands can be easily used in workflows as well as in code. Gets the Geocortex layer for the given args, either the layer itself or its id as a string.

    Parameters

    • layer: Layer | string

      Either the Geocortex layer or a string representing the layer id.

    • app: ViewerApplication

    Returns Layer

getRelatedFeatureLayer

  • getRelatedFeatureLayer(layer: Layer, relationshipId: number, relatedTableId?: number, app?: ViewerApplication): Promise<FeatureLayer>
  • Utility method to handle getting a related feature layer. Use this because it handles tables as well.

    Parameters

    • layer: Layer

      The geocortex layer object

    • relationshipId: number

      The id of the relationship

    • Optional relatedTableId: number
    • Optional app: ViewerApplication

    Returns Promise<FeatureLayer>