### Hierarchy

- Snap
  - CustomSnap

## Index

### Constructors

- constructor

### Methods

- addEventListener
- addFeature
- changed
- dispatchEvent
- dispose
- get
- getActive
- getKeys
- getListeners
- getMap
- getPointerCount
- getProperties
- getRevision
- handleEvent
- hasListener
- hasProperties
- notify
- on
- once
- removeEventListener
- removeFeature
- set
- setActive
- setMap
- setProperties
- snapTo
- stopDown
- un
- unset

## Constructors

### constructor

- new CustomSnap(options: Options): CustomSnap

- Overrides Snap.__constructor

  - Defined in contribs/gmf/src/editing/Snapping.js:35

  #### Parameters

  - ##### options: Options

  #### Returns CustomSnap

## Methods

### addEventListener

- addEventListener(type: string, listener: Listener): void

- Inherited from Target.addEventListener

  - Defined in node_modules/ol/events/Target.d.ts:50

  #### Parameters

  - ##### type: string

    Type.

  - ##### listener: Listener

    Listener.

  #### Returns void

### addFeature

- addFeature(feature: any, opt_listen?: boolean | undefined): void

- Inherited from CustomSnap.addFeature

  - Defined in node_modules/ol/interaction/Snap.d.ts:131

  Add a feature to the collection of features that we may snap to.

  api

  #### Parameters

  - ##### feature: any

    Feature.

  - ##### Optional opt_listen: boolean | undefined

    Whether to listen to the feature change or not Defaults to `true`.

  #### Returns void

### changed

- changed(): void

- Inherited from Observable.changed

  - Defined in node_modules/ol/Observable.d.ts:30

  Increases the revision counter and dispatches a 'change' event.

  api

  #### Returns void

### dispatchEvent

- dispatchEvent(event: BaseEvent | string): boolean | undefined

- Inherited from Target.dispatchEvent

  - Defined in node_modules/ol/events/Target.d.ts:61

  Dispatches an event and calls all listeners listening for events of this type. The event parameter can either be a string or an Object with a `type` property.

  api

  #### Parameters

  - ##### event: BaseEvent | string

    Event object.

  #### Returns boolean | undefined

  `false` if anyone called preventDefault on the event object or if any of the listeners returned false.

### dispose

- dispose(): void

- Inherited from Disposable.dispose

  - Defined in node_modules/ol/Disposable.d.ts:19

  Clean up.

  #### Returns void

### get

- get(key: string): any

- Inherited from BaseObject.get

  - Defined in node_modules/ol/Object.d.ts:94

  Gets a value.

  api

  #### Parameters

  - ##### key: string

    Key name.

  #### Returns any

  Value.

### getActive

- getActive(): boolean

- Inherited from Interaction.getActive

  - Defined in node_modules/ol/interaction/Interaction.d.ts:74

  Return whether the interaction is currently active.

  observable
  api

  #### Returns boolean

  `true` if the interaction is active, `false` otherwise.

### getKeys

- getKeys(): Array<string>

- Inherited from BaseObject.getKeys

  - Defined in node_modules/ol/Object.d.ts:100

  Get a list of object property names.

  api

  #### Returns Array<string>

  List of property names.

### getListeners

- getListeners(type: string): Array<Listener> | undefined

- Inherited from Target.getListeners

  - Defined in node_modules/ol/events/Target.d.ts:69

  Get the listeners for a specified event type. Listeners are returned in the order that they will be called in.

  #### Parameters

  - ##### type: string

    Type.

  #### Returns Array<Listener> | undefined

  Listeners.

### getMap

- getMap(): PluggableMap

- Inherited from Interaction.getMap

  - Defined in node_modules/ol/interaction/Interaction.d.ts:80

  Get the map associated with this interaction.

  api

  #### Returns PluggableMap

  Map.

### getPointerCount

- getPointerCount(): number

- Inherited from PointerInteraction.getPointerCount

  - Defined in node_modules/ol/interaction/Pointer.d.ts:140

  Returns the current number of pointers involved in the interaction, e.g. `2` when two fingers are used.

  api

  #### Returns number

  The number of pointers.

### getProperties

- getProperties(): {}

- Inherited from BaseObject.getProperties

  - Defined in node_modules/ol/Object.d.ts:106

  Get an object of all property names and values.

  api

  #### Returns {}

  Object.

  - ##### [x: string]: any

### getRevision

- getRevision(): number

- Inherited from Observable.getRevision

  - Defined in node_modules/ol/Observable.d.ts:37

  Get the version number for this object. Each time the object is modified, its version number will be incremented.

  api

  #### Returns number

  Revision.

### handleEvent

- handleEvent(mapBrowserEvent: any): boolean

- Inherited from Interaction.handleEvent

  - Defined in node_modules/ol/interaction/Interaction.d.ts:62

  Handles the {@link module:ol/MapBrowserEvent map browser event}.

  api

  #### Parameters

  - ##### mapBrowserEvent: any

    Map browser event.

  #### Returns boolean

  `false` to stop event propagation.

### hasListener

- hasListener(opt_type?: string | undefined): boolean

- Inherited from Target.hasListener

  - Defined in node_modules/ol/events/Target.d.ts:75

  #### Parameters

  - ##### Optional opt_type: string | undefined

    Type. If not provided, `true` will be returned if this event target has any listeners.

  #### Returns boolean

  Has listeners.

### hasProperties

- hasProperties(): boolean

- Inherited from BaseObject.hasProperties

  - Defined in node_modules/ol/Object.d.ts:112

  #### Returns boolean

  The object has properties.

### notify

- notify(key: string, oldValue: any): void

- Inherited from BaseObject.notify

  - Defined in node_modules/ol/Object.d.ts:117

  #### Parameters

  - ##### key: string

    Key name.

  - ##### oldValue: any

    Old value.

  #### Returns void

### on

- on(type: string | Array<string>, listener: (arg0: unknown) => unknown): { listener: ListenerFunction; target: EventTargetLike; type: string } | Array<{ listener: ListenerFunction; target: EventTargetLike; type: string }>

- Inherited from Observable.on

  - Defined in node_modules/ol/Observable.d.ts:47

  Listen for a certain type of event.

  api

  #### Parameters

  - ##### type: string | Array<string>

    The event type or array of event types.

  - ##### listener: (arg0: unknown) => unknown

    The listener function.

    - - (arg0: unknown): unknown

      - #### Parameters

        - ##### arg0: unknown

        #### Returns unknown

  #### Returns { listener: ListenerFunction; target: EventTargetLike; type: string } | Array<{ listener: ListenerFunction; target: EventTargetLike; type: string }>

  Unique key for the listener. If called with an array of event types as the first argument, the return will be an array of keys.

### once

- once(type: string | Array<string>, listener: (arg0: unknown) => unknown): { listener: ListenerFunction; target: EventTargetLike; type: string } | Array<{ listener: ListenerFunction; target: EventTargetLike; type: string }>

- Inherited from Observable.once

  - Defined in node_modules/ol/Observable.d.ts:57

  Listen once for a certain type of event.

  api

  #### Parameters

  - ##### type: string | Array<string>

    The event type or array of event types.

  - ##### listener: (arg0: unknown) => unknown

    The listener function.

    - - (arg0: unknown): unknown

      - #### Parameters

        - ##### arg0: unknown

        #### Returns unknown

  #### Returns { listener: ListenerFunction; target: EventTargetLike; type: string } | Array<{ listener: ListenerFunction; target: EventTargetLike; type: string }>

  Unique key for the listener. If called with an array of event types as the first argument, the return will be an array of keys.

### removeEventListener

- removeEventListener(type: string, listener: Listener): void

- Inherited from Target.removeEventListener

  - Defined in node_modules/ol/events/Target.d.ts:80

  #### Parameters

  - ##### type: string

    Type.

  - ##### listener: Listener

    Listener.

  #### Returns void

### removeFeature

- removeFeature(feature: any, opt_unlisten?: boolean | undefined): void

- Inherited from CustomSnap.removeFeature

  - Defined in node_modules/ol/interaction/Snap.d.ts:169

  Remove a feature from the collection of features that we may snap to.

  api

  #### Parameters

  - ##### feature: any

    Feature

  - ##### Optional opt_unlisten: boolean | undefined

    Whether to unlisten to the feature change or not. Defaults to `true`.

  #### Returns void

### set

- set(key: string, value: any, opt_silent?: boolean | undefined): void

- Inherited from BaseObject.set

  - Defined in node_modules/ol/Object.d.ts:125

  Sets a value.

  api

  #### Parameters

  - ##### key: string

    Key name.

  - ##### value: any

    Value.

  - ##### Optional opt_silent: boolean | undefined

    Update without triggering an event.

  #### Returns void

### setActive

- setActive(active: boolean): void

- Inherited from Interaction.setActive

  - Defined in node_modules/ol/interaction/Interaction.d.ts:87

  Activate or deactivate the interaction.

  observable
  api

  #### Parameters

  - ##### active: boolean

    Active.

  #### Returns void

### setMap

- setMap(map: PluggableMap): void

- Inherited from CustomSnap.setMap

  - Defined in node_modules/ol/interaction/Interaction.d.ts:94

  Remove the interaction from its current map and attach it to the new map. Subclasses may set up event handlers to get notified about changes to the map here.

  #### Parameters

  - ##### map: PluggableMap

    Map.

  #### Returns void

### setProperties

- setProperties(values: {}, opt_silent?: boolean | undefined): void

- Inherited from BaseObject.setProperties

  - Defined in node_modules/ol/Object.d.ts:133

  Sets a collection of key-value pairs. Note that this changes any existing properties and adds new ones (it does not remove any existing properties).

  api

  #### Parameters

  - ##### values: {}

    Values.

    - ##### [x: string]: any

  - ##### Optional opt_silent: boolean | undefined

    Update without triggering an event.

  #### Returns void

### snapTo

- snapTo(pixel: Array, pixelCoordinate: Array, map: PluggableMap): Result

- Inherited from CustomSnap.snapTo

  - Defined in node_modules/ol/interaction/Snap.d.ts:176

  #### Parameters

  - ##### pixel: Array

    Pixel

  - ##### pixelCoordinate: Array

    Coordinate

  - ##### map: PluggableMap

    Map.

  #### Returns Result

  Snap result

### stopDown

- stopDown(handled: boolean): boolean

- Inherited from PointerInteraction.stopDown

  - Defined in node_modules/ol/interaction/Pointer.d.ts:118

  This function is used to determine if "down" events should be propagated to other interactions or should be stopped.

  #### Parameters

  - ##### handled: boolean

    Was the event handled by the interaction?

  #### Returns boolean

  Should the `down` event be stopped?

### un

- un(type: string | Array<string>, listener: (arg0: unknown) => unknown): void

- Inherited from Observable.un

  - Defined in node_modules/ol/Observable.d.ts:64

  Unlisten for a certain type of event.

  api

  #### Parameters

  - ##### type: string | Array<string>

    The event type or array of event types.

  - ##### listener: (arg0: unknown) => unknown

    The listener function.

    - - (arg0: unknown): unknown

      - #### Parameters

        - ##### arg0: unknown

        #### Returns unknown

  #### Returns void

### unset

- unset(key: string, opt_silent?: boolean | undefined): void

- Inherited from BaseObject.unset

  - Defined in node_modules/ol/Object.d.ts:148

  Unsets a property.

  api

  #### Parameters

  - ##### key: string

    Key name.

  - ##### Optional opt_silent: boolean | undefined

    Unset without triggering an event.

  #### Returns void

Generated using TypeDoc