openlayers/ol3 — pull request #2649 by gberaudo (2014-08-28 12:12:19+00:00)
Title: Map and LayerGroup layer collection as a reference.

Ensures:
- getLayers() always returns defined and non-null result;
- getLayers() always returns the same object.

Solves:
- cumbersome undefined / null checks in caller code;
- unhandled cases like in Map.addLayer();
- using an obsolete layer collection reference after a setLayers(myNewLayers)
Ex:
- bindto(someLayers, map.getLayers()) having no more effects;
- var sync = new Synchronizer(map.getLayers(), ...); sync.syncLayers().