I am able to add the layer to the layer control, but not a layer group.
here is a snippet of what I am trying to do:
var layerControl = L.control.orderlayers();
var tileLayer = L.tileLayer(TILESTREAM_URL +
selectedLayer +
'/{z}/{x}/{y}.png',{wax: TILESTREAM_URL +
selectedLayer +
'.json'});
var utfGridLoss = new L.UtfGrid(TILESTREAM_URL +
selectedLayer +
'/{z}/{x}/{y}.grid.json?callback={cb}', {Default: false, JsonP: false});
var utfGrid = L.layerGroup([
utfGridLoss,
tileLayer
]);
map.addLayer(utfGrid);
layerControl.addOverlay(utfGrid, selectedLayer); // does not work
layerControl.addOverlay(tileLayer, selectedLayer); // works
I am able to add the layer to the layer control, but not a layer group.
here is a snippet of what I am trying to do: