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
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. ...