Options
All
  • Public
  • Public/Protected
  • All
Menu

An interface used to describe the required components to implement a SnappingProvider which provides snapping information to the application.

Hierarchy

  • SnappingProvider

Index

Properties

app

The {@link geocortex.framework.application.Application} that this provider belongs to.

id

id: string

The ID of the provider.

libraryId

libraryId: string

The library that this provider belongs to.

name

name: string

The name of the provider - may be displayed in the viewer.

providerConfiguration

providerConfiguration: any

The configuration used to load the snapping provider.

Methods

activate

  • activate(radius: number): void
  • Activates the SnappingProvider with a radius.

    Parameters

    • radius: number

      The radius of snapping in pixels.

    Returns void

continueSnapping

  • continueSnapping(): void
  • Continues snapping in the SnappingProvider.

    Returns void

deactivate

  • deactivate(): void
  • Deactivates the SnappingProvider.

    Returns void

getSnappableLayers

  • Returns information about which layers can be snapped to.

    Parameters

    • appInfo: AppInfo

      The application info to parse.

    Returns LayerInfo[]

    An array of layer info.

initialize

  • initialize(config?: any): void
  • Initializes the SnappingProvider with configuration options.

    Parameters

    • Optional config: any

      A configuration object.

    Returns void

loadForExtent

  • loadForExtent(extent: Extent): void
  • Signals the SnappingProvider that it must refresh for a new extent.

    Parameters

    • extent: Extent

      The new map extent.

    Returns void

pauseSnapping

  • pauseSnapping(): void
  • Pauses snapping in the SnappingProvider.

    Returns void

provideSnappingPoint

  • provideSnappingPoint(screenPoint: ScreenPoint): Promise<Point>
  • Provides a snapping point for a given location.

    Parameters

    • screenPoint: ScreenPoint

      The location.

    Returns Promise<Point>

    A promise which when resolved will have a snapping point or null if not found.

registerLayer

  • Registers a layer for snapping.

    Parameters

    Returns boolean

    A boolean if the layer was added or not.

unregisterLayer

  • unregisterLayer(layer: Layer): void
  • Unregisters a layer from the SnappingProvider.

    Parameters

    • layer: Layer

      The layer to unregister.

    Returns void