passing target element for placing the control
1
2
3
4
5
6
7
8
9
var lyrControl = new ol.control.LayerControl({  
      title           : "Layers on map",  
      draggable       : true,  
      width           : 250,  
      mapdivid        : 'map',  
      target          : 'lyrpaneltoggler',  
      mapconstrained  : false ,  
      hidden          : false,  
      lang            : 'en'  
    });