Classes
Type Definitions
-
Options{Object}
-
Properties:
Name Type Description featuresCollection<Feature> | undefined Snap to these features. Either this option or source should be provided.
edgeboolean
(defaults to true)Snap to edges.
vertexboolean
(defaults to true)Snap to vertices.
pixelTolerancenumber
(defaults to 10)Pixel tolerance for considering the pointer close enough to a segment or vertex for snapping.
sourceVectorSource | undefined Snap to features from this source. Either this option or features should be provided
-
Result{Object}
-
Properties:
Name Type Description vertexCoordinate | null Vertex.
vertexPixelPixel | null VertexPixel.
featureFeature | null Feature.
segmentArray<Coordinate> | null Segment, or
nullif snapped to a vertex. -
SegmentData{Object}
-
Properties:
Name Type Description featureFeature Feature.
segmentArray<Coordinate> Segment.