worldwind-ui API / react-worldwind / useDrawTool
Function: useDrawTool() ​
useDrawTool(
options?):UseDrawToolResult
Defined in: react/src/hooks.ts:352
A drawing and editing tool bound to the globe for the component's lifetime.
Parameters ​
options? ​
DrawToolOptions = {}
Returns ​
Example ​
tsx
const { state, start, toGeoJson } = useDrawTool();
return <button onClick={() => start('polygon')}>Draw ({state.features.length})</button>;