btfou/layer-controller — pull request #5 by jebu75 (2014-08-26 20:20:49+00:00)
Title: changes to get LayerController working with CMV

I should clarify this is mostly working with the CMV. In my sample configuration I'm including the transparency and scales components but I'm not seeing those in the application. However, the major functionality seems to be there and dynamic layers are correctly handled unlike in the current CMV TOC.

I had to make a couple of small changes in the CMV Controller.js to pass in additional parameters (type, url). The CMV also passes a reference of the instantiated layer as part of the layerInfos array so I would imagine the url could probably just be taken from that. I'm not sure if the type of layer (dynamic, tiled, feature etc) could also be inferred from the layer object which is why I modified the controller.

This is a great project and can't wait to see support for the other layer types!

Sample CMV widget config:

```javascript
LayerController: {
include: true,
id: 'layerController',
type: 'titlePane',
path: 'gis/dijit/LayerController',
title: 'Layers',
open: true,
position: 1,
options: {
map: true,
tocLayerInfos: true,
components: ['transparency', 'scales'],
reorder: false,
basemapCount: 2,
dbootstrap: true
}
},
```