MoreScratch
MoreScratch

Reputation: 3083

Remove a control in OpenLayers 3

Is there a way to remove a control in OpenLayers 3? I am creating a custom control that includes a textbox and a button for executing a function. I want the user to be able to click an "x" to dismiss the control and/or hit the esc key to "close" it.

Upvotes: 0

Views: 2577

Answers (1)

Hicham Zouarhi
Hicham Zouarhi

Reputation: 1060

there is the

ol.Map.removeControl(yourControl);

here is it in the API Docs

Upvotes: 1

Related Questions