mmomtchev / rlayers

React Component Library for OpenLayers
ISC License
173 stars 35 forks source link

Snaping in interaction #172

Open HAIGHGG opened 1 year ago

HAIGHGG commented 1 year ago

Hello How can i implement snapping in my rinteraction when drawing lines? I can see its working when drawing polygons but i need snap linestring to linestring and linestring to point

best regards, and thank you for your work

mmomtchev commented 1 year ago

There is no component that supports it - you will have to create a new component, inherit from RDraw or RBaseInteraction and then create both an OpenLayers Draw and Snap elements: https://openlayers.org/en/latest/examples/snap.html