Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a map service defined in a Map. A MapService is related to an Esri map service layer. It contains a reference to that Esri service in the serviceLayer property.

Hierarchy

Index

Constructors

Events

Properties

Methods

Constructors

constructor

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

Protected _initiallyVisible

_initiallyVisible: boolean

Whether or not the map service is initially visible.

attributionDataUrl

attributionDataUrl: string

The URL, when available, where the layer's attribution data is stored.

baseMapGroup

baseMapGroup: string

The base map group that this service belongs to, if applicable.

baseMapGroupIndex

baseMapGroupIndex: number

The zero-based index of this map service within its base map group, if applicable.

baseMapGroupIsMutuallyExclusive

baseMapGroupIsMutuallyExclusive: boolean

Indicates whether the base map group that this service belongs to allows only one base map to be selected at a time.

bingProperties

bingProperties: any

The parameters supplied for creation of a Bing map through the connection string This object will be null for any MapService which is not a Bing map.

catalogId

catalogId: string

The catalog id

clusterLayer

clusterLayer: Layer

The clustering Layer object.

configuredOpacity

configuredOpacity: number

The initial opacity defined in the Site.

configuredVisible

configuredVisible: boolean

The initial visibility defined in the Site. This will be True if the default is to have the map service visible, false otherwise.

copyright

copyright: string

The attribution information for the layer.

dataProvider

dataProvider: string

The default data provider (e.g. "Oracle", "SqlServer") for all layers in this map service.

defaultDateFormat

defaultDateFormat: string

The default format string used for formatting date values originating from this map service.

defaultNumberFormat

defaultNumberFormat: string

The default format string used for formatting numeric values originating from this map service.

description

description: string

Description of the map service.

disableClientCaching

disableClientCaching: boolean

Whether or not to disable caching of the MapService on the client.

displayName

displayName: string

The display name of the MapService.

drawingBehavior

drawingBehavior: string

The drawing behavior of this map service. One of:

  • MapService - the map service is rendered on the server
  • FeatureLayer - the map service is rendered on the client

essentialsMap

essentialsMap: Map

The Map that the MapService belongs to.

explodedClusterLayer

explodedClusterLayer: Layer

The Layer object for exploded clusters.

extensions

extensions: Extension[]

Any extensions of the MapService, as defined by the administrator on the server.

failureAction

failureAction: string

The failure action, which describes how the end user application should deal with a failed service.

failureTimeout

failureTimeout: number

The timeout (in seconds) before this mapService will be deemed to have failed

failureTimeoutThresholdExceeded

failureTimeoutThresholdExceeded: boolean

Boolean indicating whether the map service has timed out yet. This does not, in itself indicate an error. Subsequent resolution is possible.

featureClustering

featureClustering: FeatureCluster

Used to indicate what the MapService is capable of and is currently doing regarding clustering

geometryServiceUrl

geometryServiceUrl: string

The URL of the geometry service.

hasAttributionData

hasAttributionData: boolean

If the current map service has attribution data or not

hasLayerCatalog

hasLayerCatalog: boolean

Indicates whether this instance has layer catalog.

heatMap

The heap map settings for this map service.

iconUri

iconUri: string

URI to an icon representation of this map service, for display in client applications.

id

id: string

The ID of the MapService.

identifiable

identifiable: boolean

Whether or not this mapService can be identified in the client application.

imageFormat

imageFormat: string

Format in which images will be drawn.

inActiveTheme

inActiveTheme: boolean

Observable indicating whether this map service is in the active theme or not.

includeCatalogItems

includeCatalogItems: boolean

Whether or not the catalog items for this mapService should be included in identify results or not.

includeInLayerList

includeInLayerList: boolean

Whether or not to include this map service in the layer lists of client applications.

includeMosaicDatasetValues

includeMosaicDatasetValues: boolean

Whether or not the mosaic dataset values for this mapService should be included in identify results or not.

initializationFailure

initializationFailure: Error

Gets the error that occurred during initialization of the service layer, or null if there were no errors during initialization.

instantSearch

instantSearch: boolean

Indicates whether the map service is searchable through Instant Search.

isExpanded

isExpanded: boolean

Whether or not the map service will be expanded by default when shown in a layer list.

isInitialized

isInitialized: boolean

Whether or not the object was successfully initialized.

isServiceLayerLoaded

isServiceLayerLoaded: boolean

Indicates whether or not the service layer (Esri's native layer) has been loaded.

isTimeAware

isTimeAware: boolean

Boolean indicating whether this map service is time aware or not

isUserCreated

isUserCreated: boolean

Indicates whether or not a mapService was created by a user at runtime

layerHyperlinks

layerHyperlinks: LayerHyperlink[]

A collection of LayerHyperlinks associated with this map service.

layerThemeSettings

layerThemeSettings: LayerThemeSetting[]

A collection containing the layer theme settings for this map service.

layers

layers: Layer[]

The collection of Layer objects.

layersFilteredView

layersFilteredView: Layer[]

A view of the layers which is filtered to only include the active layers in the application. This will change, when, for example, a layer theme is applied. If no filter (layer theme) has been applied, then this collection will be the same as the 'layers' collection

mapServiceFunction

mapServiceFunction: string

The logical function of the MapService, either Base or Operational.

mapServiceType

mapServiceType: string

The type of MapService.

mapUrl

mapUrl: string

The URL used to retrieve a map image. Maybe a templated URL, as in the case of WMTS using RESTful encoding. May also be used to define the url that should used for WMS GetMap requests.*

maxScale

maxScale: number

A maximum scale value that overrides the map service's defined maximum scale.

minScale

minScale: number

A minimum scale value that overrides the map service's defined minimum scale.

onFailureTimeoutThresholdExceeded

onFailureTimeoutThresholdExceeded: function

function invoked when the failure timeout threshold is exceeded

Type declaration

    • (): void
    • Returns void

opacity

opacity: number

The opacity of the map service.

opacityFilter

opacityFilter: number

A value between 0 and 1 inclusive that is used to filter the opacity of the map service. The map service's opacity will be combined with the filter to produce the final opacity seen by the end user.

operationalSpatialReference

operationalSpatialReference: string

The runtime spatial reference to use that is compatible with the map's spatial reference. For now this is just used for WMS and WFS.

originalUrl

originalUrl: string

The original URL of the Essentials map service REST endpoint.

properties

properties: any

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

proxyUrl

proxyUrl: string

The proxy URL for this service.

requestEncoding

requestEncoding: string

The request encoding for a WMTS service. Can be KVP or RESTful.

serverVersion

serverVersion: string

The map server version for the service host.

serviceLayer

serviceLayer: Layer

The Esri map service Layer object.

serviceTag

serviceTag: string

A unique identifier for the service.

serviceToken

serviceToken: string

The security token that must be provided when requesting the service from ArcGIS Server.

serviceUrl

serviceUrl: string

The URL of the map service published by ArcGIS Server.

shortDisplayName

shortDisplayName: string

The short display name for the map service.

site

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

subDomains

subDomains: string[]

The set of subdomains to use in a WebTiledLayer tile request.

supportsDynamicLayers

supportsDynamicLayers: boolean

Whether or not the map service supports dynamic layers.

tables

tables: Layer[]

The collection of table objects.

tileInfo

tileInfo: TileInfo

tileMatrixSet

tileMatrixSet: string

tileRestUrl

tileRestUrl: string

The URL used to retrieve tile images in the case of a RESTful WMTS service, which may be a URL template.

timeAwareMode

timeAwareMode: string

Controls format of requests to time aware OGC services, as they don't follow the esri map settings. "Disabled", "Instant", or "Range"

timeInfo

timeInfo: TimeInfo

The time information for this map service - if it is time aware.

timeZoneId

timeZoneId: string

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

updateInterval

updateInterval: number

url

url: string

The URL that this resource was initialized from.

userLayerType

userLayerType: string

The type of user created layer. One of:

  • LayerAddition - the layer was added by browsing/searching for services and layers in a dialog
  • LayerCatalog - the layer was added from a catalog
  • Upload - the layer was added by uploading a file

Only applies to layers created at runtime.

Methods

Private _configureLayers

  • _configureLayers(layerResults: any, deepInitialize: boolean): void
  • Parameters

    • layerResults: any
    • deepInitialize: boolean

    Returns void

Private _configureObject

  • _configureObject(obj: any, deepInitialize?: boolean): void

Private _configureTables

  • _configureTables(tableResults: any, deepInitialize: boolean): void
  • Parameters

    • tableResults: any
    • deepInitialize: boolean

    Returns void

Private _configureTimeInfo

  • _configureTimeInfo(): void
  • Returns void

Private _createFrom

  • _createFrom(obj: any): void
  • Parameters

    • obj: any

    Returns void

Private _createServiceLayer

  • _createServiceLayer(): void
  • Returns void

Private _getDefaultGeometryServiceToken

  • _getDefaultGeometryServiceToken(): string
  • Returns string

Private _getDefaultGeometryServiceUrl

  • _getDefaultGeometryServiceUrl(): string
  • Returns string

Private _getLayersInfo

  • _getLayersInfo(layerId?: string): Promise<any>
  • Parameters

    • Optional layerId: string

    Returns Promise<any>

Private _handleDynamicLayers

  • _handleDynamicLayers(dynamicMapServiceLayer: ArcGISDynamicMapServiceLayer): void
  • Parameters

    • dynamicMapServiceLayer: ArcGISDynamicMapServiceLayer

    Returns void

Private _handleServiceLayerLoaded

  • _handleServiceLayerLoaded(layer: Layer): void
  • Parameters

    • layer: Layer

    Returns void

Private _initializationFailedHandler

  • _initializationFailedHandler(err: Error): void

Private _initializedHandler

  • _initializedHandler(sender: any): void

Private _layerLoadErrorHandler

  • _layerLoadErrorHandler(error: Error): void
  • Parameters

    • error: Error

    Returns void

Protected _processConnectionString

  • _processConnectionString(connectionString: string, obj: any): void
  • Parameters

    • connectionString: string
    • obj: any

    Returns void

Private _restErrorHandler

  • _restErrorHandler(error: Error): void

Private _restLoadHandler

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

Private _setVisibility

  • _setVisibility(layerID: string, visible: boolean, doNotRefresh?: boolean): void
  • Parameters

    • layerID: string
    • visible: boolean
    • Optional doNotRefresh: boolean

    Returns void

Private _syncLayerVisibilities

  • _syncLayerVisibilities(visibleLayerIds: Array<string>): void
  • Parameters

    • visibleLayerIds: Array<string>

    Returns void

Private _updateServiceToken

  • _updateServiceToken(token: string): void
  • Parameters

    • token: string

    Returns void

add

  • add(layer: Layer): void
  • Adds a Layer to the map service. Also manipulates the Esri Layer and adds appropriate layer info and drawing options for dynamic layers. Currently supports dynamic layers only.

    Parameters

    • layer: Layer

      A Layer to add to the map service

    Returns void

applyCatalogLayersChange

  • Adds the layers specified by the layer catalog details to the map service.

    Parameters

    Returns Array<Layer>

    A list of the layers that were added.

convertToDynamicLayers

  • convertToDynamicLayers(): void
  • Converts the map service to use to dynamic layers. This will only have an effect if the map service supports dynamic layers.

    Returns void

createFromDefinition

  • createFromDefinition(serviceDefinition: any): void
  • Populates the map service from a dynamic object which represents a map service.

    Parameters

    • serviceDefinition: any

      An object which represents the map service.

    Returns void

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

findLayerById

  • findLayerById(layerId: string): Layer
  • Find the Layer matching the specified Id.

    Parameters

    • layerId: string

      The Id of the Layer to find.

    Returns Layer

findLayerByName

  • findLayerByName(layerName: string): Layer
  • Find the Layer matching the specified name.

    Parameters

    • layerName: string

      The name of the Layer to find.

    Returns Layer

findLayerByNameAndId

  • findLayerByNameAndId(layerName: string, layerId: string): Layer
  • Find the table matching both the name and id.

    Parameters

    • layerName: string

      The name of the table

    • layerId: string

      The id of the table

    Returns Layer

findLayerOrTableById

  • findLayerOrTableById(id: string): Layer
  • Find the Layer or Table matching the specified Id. If the specified Id matches both a Layer and Table, the Layer will be returned.

    Parameters

    • id: string

      The Id of the Layer or Table to find.

    Returns Layer

findLayerOrTableByName

  • findLayerOrTableByName(name: string): Layer
  • Find the Layer or Table matching the specified name. If the specified name matches both a Layer and Table, the Layer will be returned.

    Parameters

    • name: string

      The name of the Layer or Table to find.

    Returns Layer

findLayerOrTableByNameAndId

  • findLayerOrTableByNameAndId(name: string, id: string): Layer
  • Somewhat of a workaround for the fact that names are not constrained unique (outside of the ESRI ecosystem) and ids could change This only returns a result if they both match, and this match is then almost guaranteed to be correct. However, there are cases where this won't return a match when there is one to make.

    Parameters

    • name: string
    • id: string

    Returns Layer

findServiceToken

  • findServiceToken(): string
  • Gets the access token for the map service, if there is one, by looking in a number of places.

    Returns string

findTableById

  • findTableById(tableId: string): Layer
  • Find the Table matching the specified Id.

    Parameters

    • tableId: string

      The Id of the Table to find.

    Returns Layer

findTableByName

  • findTableByName(tableName: string): Layer
  • Find the Table matching the specified name.

    Parameters

    • tableName: string

      The name of the Table to find.

    Returns Layer

findTableByNameAndId

  • findTableByNameAndId(tableName: string, tableId: string): Layer
  • Find the table matching both the name and id.

    Parameters

    • tableName: string

      The name of the table

    • tableId: string

      The id of the table

    Returns Layer

getConfiguredVisibleLayers

  • getConfiguredVisibleLayers(): string[]
  • Gets the IDs of the visible layers which were configured by the REST manager in an array.

    Note: If a layer is configured visible but is in fact not visible because its parent is not configured visible, that layer will not be included in the returned list of visible layers.

    Returns string[]

getDefaultVisibleLayers

  • getDefaultVisibleLayers(): string[]
  • Gets the IDs of the layers which are visible by default in the Esri service layer. Note: If a layer is visible by default but is in fact not visible because its parent is not visible by default, that layer will not be included in the returned list of visible layers.

    Returns string[]

getDynamicLayerInfoById

  • getDynamicLayerInfoById(layerId: string): DynamicLayerInfo
  • Gets a layers DynamicLayerInfo from the ServiceLayer by the layer's id. Works only when the underlying ServiceLayer is of esri.layers.ArcGISDynamicMapServiceLayer type.

    Parameters

    • layerId: string

      The layer id.

    Returns DynamicLayerInfo

    A DynamicLayerInfo or null if not found.

getFeatureLayer

  • getFeatureLayer(): Promise<FeatureLayer>
  • Gets the feature layer associated with this service. Only applicable for single-layer service types such as feature layers and image services. For other types of services, use getFeatureLayer() on individual layers.

    Returns Promise<FeatureLayer>

getLayerThemeSettings

  • Retrieves the layer theme settings for this mapService by specified layer theme or layer theme id

    Parameters

    Returns LayerThemeSetting

getVisibleLayers

  • getVisibleLayers(): string[]
  • Gets the IDs of the currently visible layers in an array. Note: If a layer is currently set visible but is in fact not visible because its parent is not visible, that layer will not be included in the returned list of visible layers.

    Returns string[]

initialize

  • initialize(obj?: any): void
  • Initializes the {@link geocortex.essentials.AsyncInitializable}. This is an asynchronous method, you may subscribe to the onInitialized and onInitializationFailed events for completion information.

    Parameters

    • Optional obj: any

    Returns void

initiateServiceFailureTimer

  • initiateServiceFailureTimer(): void
  • Returns void

isTiled

  • isTiled(): boolean
  • Gets whether or not this map service is Tiled (i.e. instance of esri.layers.TiledMapServiceLayer).

    Returns boolean

    true if this map service is tiled; false otherwise

isVisible

  • isVisible(): boolean
  • Gets whether the MapService is currently visible.

    Returns boolean

refresh

  • refresh(refreshTimeoutMs?: number, disableClientCaching?: boolean): void
  • Refreshes the map service by making a new request to the server.

    Parameters

    • Optional refreshTimeoutMs: number

      An optional parameter which if specified, will cause the map refresh to occur after the specified timeout. Any previous refresh timeouts will be cancelled when a new refresh timeout is set - ensuring that only one request goes out within the speicfied threshold. If undefined, the map refreshes immediately.

    • Optional disableClientCaching: boolean

      An optional parameter which, if set will disable client caching on the service layer (if supported) prior to refreshing it. Defaults to false.

    Returns void

refreshFilteredCollections

  • refreshFilteredCollections(): void
  • Refreshes the layersFilteredView collection.

    Returns void

remove

  • remove(layer: Layer): void
  • Removes a Layer from the the map service. Also manipulates the Esri Layer and removes appropriate layer info and drawing options for the layer. Currently supports dynamic layers only.

    Parameters

    • layer: Layer

      A layer to remove from the map service

    Returns void

setInActiveTheme

  • setInActiveTheme(value: boolean): void
  • Sets the inActiveTheme property of the MapService. Raises the "MapServiceInActiveThemeChangedEvent" event.

    Parameters

    • value: boolean

      The value to set.

    Returns void

setOpacity

  • setOpacity(opacity: number): void
  • Sets the opacity of the MapService.

    Parameters

    • opacity: number

      The opacity to be set, between 0.0 and 1.0 inclusive.

    Returns void

setOpacityFilter

  • setOpacityFilter(filter: number): void
  • Sets the opacity filter of the MapService.

    Parameters

    • filter: number

      The opacity filter to be set, between 0.0 and 1.0 inclusive.

    Returns void

setVisibility

  • setVisibility(visible: boolean): void
  • Sets the visibility of the MapService.

    Parameters

    • visible: boolean

      The visibility to be set (true: visible, false: hidden).

    Returns void

supportsLayerVisibility

  • supportsLayerVisibility(): boolean
  • Returns whether or not this service supports layer visibility.

    Returns boolean

toJson

  • toJson(): object
  • Exports the state of the map service as a JSON object. This can be used to recreate the layer again via createFromDefinition().

    Returns object

Static getGcxTimeInfo

  • getGcxTimeInfo(timeInfo: TimeInfo, restStartTimeOverrideString?: string, restEndTimeOverrideString?: string): TimeInfo
  • Parameters

    • timeInfo: TimeInfo
    • Optional restStartTimeOverrideString: string
    • Optional restEndTimeOverrideString: string

    Returns TimeInfo