mapview.interactions.snap()

This module sets up the snap interaction for the mapview.

Methods

(inner) snap(mapview)

Sets up the snap interaction for the mapview.

Parameters:
NameTypeDescription
mapviewObject

The mapview object.

Properties
NameTypeDescription
Mapol.Map

The OpenLayers map object.

interactionObject

The interaction object.

Properties
NameTypeDescription
snapboolean | Object

The snap interaction configuration.

Properties
NameTypeAttributesDescription
layerstring<optional>

The key of the layer to snap to.

layerol.layer.Layer

The interaction layer.

layersObject

The map layers object.

(inner) tileloadend(e)

Callback function for the `tileloadend event of the feature source. Adds features from the loaded tile to the snap source.

Parameters:
NameTypeDescription
eol.TileLoadEvent

The tile load event.