useOlModifyEventListener
useOlModifyEventListener(
modify,type,listener):void
Defined in: src/use-ol-modify-event-listener.ts:35
Hook to attach an event listener to an OpenLayers Modify interaction. Automatically handles cleanup when the component unmounts or dependencies change.
Parameters
Section titled “Parameters”modify
Section titled “modify”The OpenLayers Modify interaction instance (null-safe)
Modify | null
The type of modify event to listen for (e.g., ‘modifystart’, ‘modifyend’)
listener
Section titled “listener”The callback function to execute when the event fires
Returns
Section titled “Returns”void
Example
Section titled “Example”const modify = useOlModify()useOlModifyEventListener(modify, 'modifyend', (evt) => { console.log('Modification complete', evt.features)})