You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to hide the controls until the user presses a button to add points to the map.
At first just doing:
{mapIsEditable&&<DrawControlref={drawControl}controls={{point: true,polygon: true,trash: true}}onDrawCreate={({ features })=>{console.log('FEATURES: ',features)}.../>;}
seemed to work well until I try to toggle the controls multiple times, then the onDrawCreate gets executed the same amount of times I toggled the component.
I'm trying to hide the controls until the user presses a button to add points to the map.
At first just doing:
seemed to work well until I try to toggle the controls multiple times, then the
onDrawCreate
gets executed the same amount of times I toggled the component.I've tried using:
But this way the controls never show up when I toggle the prop.
Is there a way to toggle these or fix this error?
The text was updated successfully, but these errors were encountered: