Classes
Type Definitions
-
Options{Object}
-
Properties:
Name Type Argument Default Description features
module:ol/Collection~Collection.<module:ol/Feature~Feature> <optional>
Snap to these features. Either this option or source should be provided.
edge
boolean <optional>
true Snap to edges.
vertex
boolean <optional>
true Snap to vertices.
pixelTolerance
number <optional>
10 Pixel tolerance for considering the pointer close enough to a segment or vertex for snapping.
source
module:ol/source/Vector~VectorSource <optional>
Snap to features from this source. Either this option or features should be provided
-
Result{Object}
-
Properties:
Name Type Description snapped
boolean vertex
module:ol/coordinate~Coordinate | null vertexPixel
module:ol/pixel~Pixel | null -
SegmentData{Object}
-
Properties:
Name Type Description feature
module:ol/Feature~Feature segment
Array.<module:ol/coordinate~Coordinate>