Open bwyss opened 9 years ago
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 was able to get around this issue by using a leaflet featureGroup, but the UtfGrid layer does not follow the layer order change
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: