Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a Geocortex Essentials Site that is configured on the server and accessed via a REST endpoint. You must call the initialize method on the Site before using it. To determine if the Site has already been initialized, check the AsyncInitializable.isInitialized property. The Site is initialized asynchronously, so you must attach an event handler to determine when the initialization has finished. You can also attach a handler to the event that will report initialization errors.

Hierarchy

Index

Constructors

Events

Properties

Methods

Constructors

constructor

  • new Site(url: string, map: Map): Site
  • Initializes a new instance of the Site class.

    Parameters

    • url: string

      URL to a Geocortex Essentials Site endpoint.

    • map: Map

      The {@link esri.Map} object with which this Site will be associated.

    Returns Site

Events

onInitializationFailed

onInitializationFailed: function

Occurs when initialization of this object fails.

Type declaration

    • (error: Error): void
    • Parameters

      • error: Error

      Returns void

onInitialized

onInitialized: function

Occurs when initialization succeeds with a response from the REST endpoint. Depending on the API, this response may actually be an error message served as a correct HTTP response.

Type declaration

    • (sender: any): void
    • Parameters

      • sender: any

      Returns void

Properties

Private _initializing

_initializing: boolean

arcGisPortalSecurityContext

arcGisPortalSecurityContext: ArcGisPortalSecurityContext

The necessary information for logging in to an ArcGIS Portal, such as ArcGIS Online. This will be set if the site is using secure ArcGIS Online content and a login is required, or will be null if the site is not using secure ArcGIS Online content and a login is not required.

configPreprocessor

configPreprocessor: function

An optional configuration preprocessor - a function to process the configuration in place before parsing and loading. After initialization, this is nulled out.

Type declaration

    • (configObject: any): void
    • Parameters

      • configObject: any

      Returns void

currentVersion

currentVersion: string

The current version of the Geocortex Essentials serving the Site.

dataProvider

dataProvider: string

The default data provider (e.g. "Oracle", "SqlServer", etc.) for all map services and layers in this site. Individual map services and layers may have overridden this default.

deepInitialize

deepInitialize: boolean

Whether or not to initialize this site with a complete representation of the Site in REST (deep initialization). If false, the different components of the Site such as the map will be initialized with a separate HTTP call after the Site has been retrieved.

defaultRenderers

defaultRenderers: object

A mapping of gcx mapservice ids to their original renderers (as JSON strings). The service layer object could either be a feature layer (single renderer) or a dynamic mapservice (array of renderers)

Type declaration

  • [id: string]: string | string[]

displayName

displayName: string

The display name of the Site.

displayTimeZoneId

displayTimeZoneId: string

The IANA ID of the time zone in which this site's field data should be displayed.

documentStore

documentStore: DocumentStore

The Document Store of the Essentials instance.

esriLegendProcessed

esriLegendProcessed: Observable<boolean>

essentialsMap

essentialsMap: Map

The Essentials Map defined in the Site.

extensions

extensions: Extension[]

The extensions of the Site, as defined by the administrator on the server.

geocodingEndpoints

geocodingEndpoints: GeocodingEndpoint[]

The GeocodingEndpoints defined in the Site.

geometryEndpoints

geometryEndpoints: GeometryEndpoint[]

The GeometryEndpoints defined in the Site.

geoprocessingEndpoints

geoprocessingEndpoints: GeoprocessingEndpoint[]

The GeoprocessingEndpoints defined in the Site.

hasAGOLRenderers

hasAGOLRenderers: Observable<boolean>

We need to spin up an ESRI widget to handle the legends for these

hasGeocodingEndpoints

hasGeocodingEndpoints: boolean

Whether the Site contains any geocoding endpoints.

hasGeometryEndpoints

hasGeometryEndpoints: boolean

Whether the Site contains any geometry endpoints.

hasGeoprocessingEndpoints

hasGeoprocessingEndpoints: boolean

Whether the Site contains any geoprocessing endpoints.

hasNamedExtents

hasNamedExtents: boolean

Whether the Site contains a collection of NamedExtent objects.

hasNorthArrow

hasNorthArrow: boolean

Whether the Site contains a north arrow configuration.

hasOverviewMap

hasOverviewMap: boolean

Whether the Site contains an overview map.

hasPrintTemplates

hasPrintTemplates: boolean

Whether the Site contains a collection of PrintTemplate objects.

hasSearchTables

hasSearchTables: boolean

Whether the Site contains a collection of SearchTable objects.

hasTimeSliders

hasTimeSliders: boolean

Whether the Site contains time slider information

hasViewers

hasViewers: boolean

Whether the Site has any configured viewers.

hasVirtualDirectory

hasVirtualDirectory: boolean

Whether the Site has a virtual directory defined.

hasWebMaps

hasWebMaps: boolean

Whether the Site contains a collection of WebMapReference objects.

hasWorkflows

hasWorkflows: boolean

Whether the Site contains a collection of Workflow objects.

id

id: string

The ID of the Site.

initializationFailure

initializationFailure: Error

The exception that occurred if the object could not be initialized.

isInitialized

isInitialized: boolean

Whether or not the object was successfully initialized.

layerCatalogs

layerCatalogs: LayerCatalog[]

Collection of LayerCatalog objects associated with the Site.

layerListRestEndpoint

layerListRestEndpoint: RestLayerList

The configurable layer list rest endpoint defined in the Site.

namedExtents

namedExtents: NamedExtent[]

Collection of NamedExtent objects associated with the Site.

onLayerLoad

onLayerLoad: function

Occurs when an Esri {@link esri.layers.Layer} has loaded.

Type declaration

    • (layer: Layer): void
    • Parameters

      • layer: Layer

      Returns void

onLayerLoadError

onLayerLoadError: function

Occurs when a there is a problem loading an Esri layer.

Type declaration

    • (error: Error): void
    • Parameters

      • error: Error

      Returns void

onPrincipalUpdated

onPrincipalUpdated: function

Occurs when the site principla has been updated, including right before site initialization, and on token refresh.

Type declaration

    • (): void
    • Returns void

onServiceLayersLoaded

onServiceLayersLoaded: function

Occurs when the service layers have been loaded in the map.

Type declaration

    • (site: Site): void
    • Parameters

      Returns void

onSignIn

onSignIn: function

Occurs when a federated sign in is initiated.

Type declaration

    • (args: object): void
    • Parameters

      • args: object
        • url: string

      Returns void

onSignOut

onSignOut: function

Occurs when sing out is initiated.

Type declaration

    • (): void
    • Returns void

onUserSignInCancelled

onUserSignInCancelled: function

Occurs when the user cancels the sign in process.

Type declaration

    • (args: object): void
    • Parameters

      • args: object
        • tryAgainAction: function
            • (): void
            • Returns void

      Returns void

originalUrl

originalUrl: string

The original URL of the Essentials site REST endpoint.

overviewMap

overviewMap: Map

The overview Map defined in the Site.

principal

principal: Principal

printTemplates

printTemplates: PrintTemplate[]

Collection of PrintTemplate objects associated with the Site.

properties

properties: object

The properties of the Site, as defined by the administrator on the server.

searchTables

searchTables: SearchTable[]

Collection of SearchTable objects associated with the Site. Note: To use Search Tables with a version of Essentials prior to 4.5, you must use "deep initialization" with the site. GVH does this always.

serviceLayersLoaded

serviceLayersLoaded: boolean

A boolean indicating that the esri service layers have been loaded in the map

signInRedirectUri

signInRedirectUri: string

Overrides the redirect target url used when signing in.

signOutRedirectUri

signOutRedirectUri: string

Overrides the redirect target url used when signing out.

site

The {@link geocortex.essentials.Site} that this resource belongs to.

siteInitializationTime

siteInitializationTime: number

Used by Analytics

siteServiceLayers

siteServiceLayers: MapService[]

A collection of service layers which are expected to appear in the site. Excludes any user-added layers

suspendLayersOnLoad

suspendLayersOnLoad: boolean

Suspend layers when initially being added to the map.

timeSliders

timeSliders: TimeSliderProfile[]

Collection of TimeSliderProfile objects associated with the Site

timeZoneId

timeZoneId: string

The IANA ID of the time zone in which this site's field data are current.

trustedUrls

trustedUrls: object[]

The trusted urls of the Site, as defined by the administrator on the server.

updateInterval

updateInterval: number

The interval period (in seconds) for updating the secured map services tokens.

url

url: string

The URL to a Geocortex Essentials Site's REST endpoint.

useSiteFullExtentForWMTSServices

useSiteFullExtentForWMTSServices: boolean

Helps to work around issues Essentials has when reprojecting WMTS full extents.

webMapsInfo

webMapsInfo: object

The object that represents information about web maps and the collection of WebMapReference objects associated with the Site.

Type declaration

workflows

workflows: Workflow[]

Collection of Workflow objects associated with the Site.

Methods

Private _configureObject

  • _configureObject(results: any, deepInitialize?: boolean, isFinal?: boolean): void
  • Parameters

    • results: any
    • Optional deepInitialize: boolean
    • Optional isFinal: boolean

    Returns void

Private _initializationFailedHandler

  • _initializationFailedHandler(err: Error): void

Private _initializedHandler

  • _initializedHandler(sender: any): void

Private _restErrorHandler

  • _restErrorHandler(error: Error): void

Private _restLoadHandler

  • _restLoadHandler(deepInitialize: boolean, result: any): void

canSignIn

  • canSignIn(): boolean
  • Determines whether the current user is able to sign in.

    Returns boolean

canSignOut

  • canSignOut(): boolean
  • Determines whether the current user is able to sign out.

    Returns boolean

doWhenInitialized

  • doWhenInitialized(callback: function): void
  • doWhenInitialized(scope: any, callback: function): void
  • Parameters

    Returns void

  • Performs a callback function when this instance has been initialized. If this instance is already initialized when this function is called, the callback function will execute immediately.

    Parameters

    • scope: any

      The scope to using when executing the callback - i.e. the value of the 'this' variable in the callback function. This parameter may be ommitted in which cased the first parameter will be used as the callback function.

    • callback: function

      The callback function to execute when this instance has been initialized.

    Returns void

findPrintTemplateById

  • Find the PrintTemplate matching the specified ID.

    Parameters

    • templateId: string

      The ID of the print template to find.

    Returns PrintTemplate

findWorkflowById

  • findWorkflowById(workflowId: string): Workflow
  • Find the Workflow matching the specified ID.

    Parameters

    • workflowId: string

      The ID of the Workflow to find.

    Returns Workflow

getDefaultBatchGeocoder

getEssentialsVersion

  • getEssentialsVersion(): number
  • Returns number

getFeatureServices

getLayerCatalog

  • getLayerCatalog(catalogParams: LayerCatalogParams, loadBegin: function, loadComplete: function, loadError: function): void
  • Gets the layer catalog asynchronously.

    Parameters

    • catalogParams: LayerCatalogParams

      The application.

    • loadBegin: function

      The callback to run when loading begins.

        • (): void
        • Returns void

    • loadComplete: function

      The callback to run when loading completes.

        • (results: any): void
        • Parameters

          • results: any

          Returns void

    • loadError: function

      The callback to run when loading errors.

        • (e: Error): void
        • Parameters

          • e: Error

          Returns void

    Returns void

getLayerCatalogDetails

  • getLayerCatalogDetails(catalogParams: LayerCatalogDetailsParams, loadBegin: function, loadComplete: function, loadError: function): void
  • Gets the layer catalog details asynchronously.

    Parameters

    • catalogParams: LayerCatalogDetailsParams

      The application.

    • loadBegin: function

      The callback to run when loading begins.

        • (): void
        • Returns void

    • loadComplete: function

      The callback to run when loading completes.

        • (results: any): void
        • Parameters

          • results: any

          Returns void

    • loadError: function

      The callback to run when loading errors.

        • (e: Error): void
        • Parameters

          • e: Error

          Returns void

    Returns void

getMap

  • getMap(): Map
  • Gets the Esri {@link esri.Map} control.

    Returns Map

getOfflineBasemaps

  • getOfflineBasemaps(loadComplete: function, loadError?: function): void
  • Gets the offline basemaps asynchronously.

    Parameters

    • loadComplete: function

      The callback to run when loading completes.

    • Optional loadError: function

      The callback to run when loading errors.

        • (e: Error): void
        • Parameters

          • e: Error

          Returns void

    Returns void

getResourceById

  • getResourceById(resources: any, resourceId: string): any
  • Find the Site resource matching the specified ID.

    Parameters

    • resources: any

      The array of resources to look up.

    • resourceId: string

      The ID of the resource to find.

    Returns any

getStreamServices

getTokenFromPrincipal

  • getTokenFromPrincipal(url: string, type: any): string
  • Allows resources to find the token for a given resource pertaining to the current user.

    Parameters

    • url: string

      The url of the resource that is being accessed.

    • type: any

    Returns string

    Returns the appropriate token for the given type.

initialize

  • initialize(siteObject?: any): void
  • Initializes the Site. This is an asynchronous method; for completion information, subscribe to the AsyncInitializable.onInitialized and AsyncInitializable.onInitializationFailed events.

    // Create a new empty ESRI map object
    var map = new esri.Map("map");
    
    // Create a new Site object, supplying a URL to the REST endpoint
    // of an existing Essentials site, and the map object just created
    var essentialsSite = new geocortex.essentials.Site("http://sampleserver1.geocortex.com/geocortex/essentials/rest/sites/CharlotteArcGISOnline", map);
    
    // Hook up events for when the initialization of the site completes,
    // and if it fails to initialize
    dojo.connect(essentialsSite, "onInitialized", site_Initialized);
    dojo.connect(essentialsSite, "onInitializationFailed", site_InitializationFailed);
    
    // Initialize the site, which will load all configured layers into the ESRI map object
    essentialsSite.initialize();

    Parameters

    • Optional siteObject: any

    Returns void

refreshPrincipal

  • refreshPrincipal(): Promise<void>
  • Refreshes the site's principal. Tries to do a passive sign in in refresh. If that fails, a login prompt may be triggered in a pop-up or new tab.

    Returns Promise<void>

search

  • search(queryParams: SearchQuery, searchBegin: function, searchComplete: function, searchError: function): void
  • Performs a search query operation. This is an asynchronous method, you may provide delegates for completion or error information.

    Parameters

    • queryParams: SearchQuery

      The parameters for the search query.

    • searchBegin: function

      The delegate that will be called when the operation has started.

    • searchComplete: function

      The delegate that will be called when the operation has completed, even if an error occurs.

    • searchError: function

      The delegate that will be called if an error occurs during the operation.

        • (e: Error): void
        • Parameters

          • e: Error

          Returns void

    Returns void

signIn

  • signIn(url?: string): void
  • Initiates a federated sign in.

    Parameters

    • Optional url: string

      An optional sign-in URL to use, otherwise the principal's default URL will be used.

    Returns void

signOut

  • signOut(): void
  • Initiates a single sign out. NOTE: This will invalidate the security session for all applications using the REST API. In other words, sign out for every application that signed in using our REST API.

    Returns void

updatePrincipal

  • updatePrincipal(principal: Principal): void
  • Updates the principal in the site with the given principal.

    Parameters

    • principal: Principal

      The principal to update the site with.

    Returns void

updateServiceTokensIfStale

  • updateServiceTokensIfStale(): Deferred
  • Refreshes the services tokens if they're currently stale. Otherwise returns a resolved deferred.

    Returns Deferred