geoadmin/mf-geoadmin3 — pull request #111 by elemoine (2013-07-10 13:09:55+00:00)
Title: Rely on MapServer service for layers

This PR adds a gaLayers service. This service fetches layers information from layers.json, and exposes a getLayerById function for creating ol.layer.Layer layers. Every created ol.layer.Layer is cached, to prevent creation on subsequent accesses.

Later we'll need to extend the gaLayers service to be able to request new layers when switching topics.

The background layer selector directive now relies on gaLayers, instead of gaWmtsLoader. The latter is completely gone, as we'll never need to request and parse WMTS capabilities.

Please review.