Skip to content

OlSnap

OlSnap(props): Element

Defined in: src/ol-snap.tsx:39

OpenLayers Snap interaction component for snapping drawn features to existing features. Enables vertex and edge snapping during draw/modify operations. Must be used within an OlVectorSource context.

OlSnapProps

Element

<OlVectorSource>
<OlSnap ref={snapRef} initialOptions={{ pixelTolerance: 10 }}>
{children}
</OlSnap>
</OlVectorSource>