There are two methods for adding controls to a map:
ol.control.* objects when you instantiate the map object.addControl(), method passing in a single control object. If you need to pass more than one control, just loop using an array of control objects, using the same addControl().When you create your map, three control objects are added automatically. These three controls are as follows:
ol.control.Attribution: This is responsible for displaying credits for producers of map data sources or tiles providers like for OpenStreetMap. By default, the control is located in the bottom-right corner.ol.control.Zoom: This is responsible for showing the plus and minus buttons in the top-left corner. Those buttons when clicking help to do a zoom in for plus and a zoom out for minus.ol.control.Rotate: This is responsible for resetting the map rotation to 0.Since these controls are added without us explicitly adding them, how do we choose to not include them? The simplest way is to pass an empty array or null to the control's property when instantiating the map. Another way to change default controls is to explicitly set the options for each of them to true or false when you call the ol.controls.defaults function in the controls property of the ol.Map object.
Let's review this use case before going further.