Options
All
  • Public
  • Public/Protected
  • All
Menu

The Coordinates Manager manages all the coordinate models registered in the system. Not only does it act as the central repository for coordinate systems, it is also responsible for mapping between the input source coordinate stream and the output coordinate stream when needed - i.e. when there are subscribers to the output coordinate stream.

Hierarchy

  • CoordinatesManager

Index

Constructors

constructor

Properties

Protected _defaultCoordinatesModel

_defaultCoordinatesModel: CoordinatesModel

protected variables

Protected _prevCoord

_prevCoord: CoordinateBase

Protected _registeredCoordinateModels

_registeredCoordinateModels: string[]

app

The {@link geocortex.essentialsHtmlViewer.ViewerApplication} that this accessibility manager instance belongs to.

Methods

Protected _addModelSubscriptionHooks

  • We'll need to monitor when subscribers subscribe/unsubscribe to the outputStream observable so we can stop unnecessary coordinate tracking when it's no longer needed. This could be done with a modification to Events.ts but that will involve an increased memory footprint for functionality that's currently not used anywhere else in the system. After a discussion with , we've decided to hook into the outputStream bindingEvent subscribe and unsubscribe functions for the time being rather than modify Events.ts to support this. -

    Parameters

    Returns void

Protected _handleModelSubscriptionsChanged

  • _handleModelSubscriptionsChanged(coordsModel: CoordinatesModel, subscriptions: __type): void
  • Parameters

    Returns void

Protected _processCoordinatesModel

  • Parameters

    Returns void

Protected _validateCoordinateSystem

  • Parameters

    Returns boolean

Protected _validateModelRegistration

  • Parameters

    Returns boolean

getCoordinate

  • Retrieves the coordinates for the provided mapPoint or the current mouse pointer location one time in either the specified Coordinate System or in the currently active one

    Parameters

    Returns Promise<Coordinate>

    Promise Returns a promise for the coordinate information.

getCoordinatesModel

  • Get the specified coordinate model by id. This function will return valid coordinate model instances, whether or not they have been registered with the coordinates manager.

    Parameters

    • modelId: string

      The unique identifier for the coordinate model.

    Returns Promise<CoordinatesModel>

    Promise A promise for the requested coordinate model, whenever it is registered as a framework object.

hasRegisteredCoordinatesModel

  • hasRegisteredCoordinatesModel(modelId?: string): boolean
  • Tests to see if a coordinates model is registered with the coordinates manager. If no model id is provided, will check if there is a default model registeed else will check to see if the specified model has been registered or not.

    Parameters

    • Optional modelId: string

      Optional. If provided, will check to see if the specified model is registered, else will check if a default model is registered or not.

    Returns boolean

registerModel

  • Registers a new CoordinatesModel

    Parameters

    • model: CoordinatesModel
    • Optional setDefault: boolean

      If this is true then the currently registered model will be set as default. Please note that if there is only one model registered in hte system, it will automatically be set as default, regardless of this setting.

    Returns boolean

    The newly created CoordinatesModel or null on error.