Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

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

    Parameters

    • url: string

      The URL to the REST endpoint of the Map.

    Returns Map

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

baseMaps

baseMaps: BaseMap[]

The collection of BaseMaps for the map.

clickableGraphics

clickableGraphics: any

A hack to allow code to register clickable graphics without a viewer application reference

exportMapImageOptions

exportMapImageOptions: ExportMapImageOptions

The ExportMapImageOptions which outline the options for exporting the map image.

extentManager

extentManager: ExtentManager

The ExtentManager that manages all extent changes for the esri map.

fitTiledMapsToExtent

fitTiledMapsToExtent: boolean

Configuration parameter which controls whether to fit tiled maps to extent. When true, for maps that contain tiled map service layers, you are guaranteed to have the input extent shown completely on the map. The default value is false.

fullExtent

fullExtent: Extent

The esri.geometry.Extent which represents the full extent of the Map.

initialExtent

initialExtent: Extent

The esri.geometry.Extent which represents the initial extent of the Map.

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.

isLoaded

isLoaded: boolean

Is the map loaded? This means the underlying esri map has loaded and that we have applied application specific fixes

layerThemesInfo

layerThemesInfo: LayerThemesInfo

The LayerThemesInfo for layer themes which can be applied to this Map

mapServices

mapServices: MapService[]

The collection of {@link geocortex.essentials.MapService} object.

mapServicesFilteredView

mapServicesFilteredView: MapService[]

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

originalUrl

originalUrl: string

The original URL of the Essentials map REST endpoint.

primaryMapService

primaryMapService: MapService

The primary MapService of the Map.

serviceLayersAdded

serviceLayersAdded: boolean

Whether esri service layers have yet been added to the {@link esri.Map} object

setExtentOnLoad

setExtentOnLoad: boolean

A boolean that manages whether or not the initial extent should be set when all map services have been added to the esri map or wait until another process manually calls setInitialExtent on the ExtentManager.

site

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

spatialReference

spatialReference: SpatialReference

The spatial reference of the map. This should match the spatial reference of the Esri map

supportedExportFormats

supportedExportFormats: string[]

The collection of supported export formats for the Map.

suspended

suspended: Observable<boolean>

Should new layers be added to the map in suspended state? It depends on whether the initial layer theme has been applied yet...

units

The DistanceUnit that is used by this map. This will be null for the overview map.

url

url: string

The URL that this resource was initialized from.

Methods

Private _configureMapServices

  • _configureMapServices(mapServiceResults: MapService[], deepInitialize: boolean): void
  • Parameters

    • mapServiceResults: MapService[]
    • deepInitialize: boolean

    Returns void

Private _configureObject

  • _configureObject(obj: object, deepInitialize?: boolean): void
  • Parameters

    • obj: object
      • Optional baseMaps?: RestBaseMap[]
      • Optional exportOptions?: ExportMapImageOptions
      • Optional fullExtent?: Extent
      • Optional initialExtent?: Extent
      • Optional layerThemes?: RestLayerThemesInfo
      • mapServices: MapService[]
      • primaryMapServiceID: string
      • Optional units?: DistanceUnit
    • Optional deepInitialize: 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

addMapService

  • Integrate a Geocortex map service into the viewer and onto the map.

    Parameters

    • args: MapService | object

      The Geocortex map service, containing a service layer and Geocortex layers, to be integrated onto the map and into the viewer. Can optionally accept an object containing "mapService" and "respectVisibility" properties. By default, visibilities of all added mapServices and layers are set to true. However, if "respectVisibility" is set to true, then this function will respect whatever visibility the added mapService is configured with. Supported map service types include: {@link essentials.FeatureLayerService}, {@link essentials.KmlService}, and {@link geocortex.essentialsHtmlViewer.mapping.infrastructure.LayerIntegrationUtils.LocalFeatureLayerService}.

    Returns void

addServiceLayers

  • addServiceLayers(serviceLayers: Layer[], serviceFunction: string): void
  • Creates a MapService for every service layer provided and adds them to Essentials map.

    Parameters

    • serviceLayers: Layer[]

      An array of service layers.

    • serviceFunction: string

      The logical function of the MapService, either Base or Operational

    Returns void

allLayers

  • Returns a flattened list of all the layers as defined by the Site.

    Returns Layer[]

allLayersAndTables

  • allLayersAndTables(): Layer[]
  • Returns a flattened list of all the layers and tables as defined by the Site.

    Returns Layer[]

allTables

  • Returns a flattened list of all the tables as defined by the Site.

    Returns Layer[]

applyCatalogLayersChange

  • applyCatalogLayersChange(detailsResults: any): void
  • Applies layer catlog changes to the map.

    Parameters

    • detailsResults: any

      The details object which was returned from the Layer Catalog endpoint.

    Returns void

applyStartupTheme

  • applyStartupTheme(): void
  • Returns void

calculateScale

  • calculateScale(): number
  • Calculates the current scale of the map and returns it. This method just delegates to esri.geometry.getScale(), passing it values that corresponding to the current state of the map.

    Returns number

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

enableUnsuspendedMapLayers

  • enableUnsuspendedMapLayers(): void
  • Resume any layers that were previously suspended and allow new layers to be added unsuspended It will be called once the default layer theme has been processed.

    Returns void

exportMap

  • exportMap(exportParameters: ReportParameters, exportComplete: function, exportError: function): void
  • Exports the Map using. This is an asynchronous method, you may provide delegates for completion or error information.

    Parameters

    • exportParameters: ReportParameters

      The export parameters.

    • exportComplete: function

      The delegate that will be called when the export has completed (even if an error occurs). This delegate expects one argument: a String representing the URL of the exported file.

        • (results: any): void
        • Parameters

          • results: any

          Returns void

    • exportError: function

      The delegate that will be called if an error occurs. This delegate expects an Error as argument.

        • (error: Error): void
        • Parameters

          • error: Error

          Returns void

    Returns void

filteredLayers

  • filteredLayers(): Layer[]
  • Returns a flattened list of all the layers contained in the filtered mapService collection. (Filtered by Layer Theme settings)

    Returns Layer[]

findLayerFromMatchingEsriFeatureLayer

  • findLayerFromMatchingEsriFeatureLayer(layer: FeatureLayer): Layer
  • Searches the Map for the layer corresponding to the input esri FeatureLayer. This can either be a spatial layer or a feature layer representing a table

    Parameters

    • layer: FeatureLayer

      The {@link esri.layers.FeatureLayer} whose Geocortex layer we want to find.

    Returns Layer

findMapServiceById

  • findMapServiceById(mapServiceId: string): MapService
  • Find the MapService matching the specified ID.

    Parameters

    • mapServiceId: string

      The ID of the MapService to find.

    Returns MapService

getMap

  • getMap(): Map
  • Returns the underlying {@link esri.Map}.

    Returns Map

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

loadServiceLayersInMap

  • loadServiceLayersInMap(map: Map): void
  • Loads all the ServiceLayer objects into the ESRI layers collection. This function is called automatically as part of the Site initialization process.

    Parameters

    • map: Map

    Returns void

refreshFilteredCollections

  • refreshFilteredCollections(): void
  • Refreshes the mapServicesFilteredView collection and the layersFilteredView collection for each of the map services and constituent layers

    Returns void

removeMapService

  • Removes a map service from both the Essentials map and the Esri map.

    Parameters

    • mapService: MapService

      The map service to be removed.

    Returns void

removeServiceLayer

  • removeServiceLayer(serviceLayer: Layer): void
  • Removes the MapService representing the service layer provided, from the Essentials MapServices array. Note: This will not remove it from the map.

    Parameters

    • serviceLayer: Layer

      The esri service layer, whose corresponding mapService we want to remove

    Returns void

setFeatureLayerExclusivelyVisible

  • setFeatureLayerExclusivelyVisible(layer: Layer): void
  • Sets one Layer as the exclusively visible layer.

    Parameters

    • layer: Layer

      The layer to make the only visible layer.

    Returns void