Let's go through a quick example using some of the functions we just covered.
var returned_controls = map.getControlsBy('active', true);
We just got an array of controls that were active and then removed the first item in the returned array from the map. If the
returned_controls array is empty, calling
removeControl will not do anything (you can't remove a
null control). ...