aebadirad / Leaflet.AutoLayers

A dynamic leaflet layers control that pulls from multiple mapservers and manages basemaps and overlays plus order
MIT License
31 stars 21 forks source link

Support multiple mapservers in the config #13

Closed petersmythe closed 4 years ago

petersmythe commented 4 years ago

If you have a config with multiple mapservers, each with more than 1 layer configured, then only the first list of layers appears in the control. This is because the push of an array layers to self.mapLayers does not concatenate the list, it creates a second element in the self.mapLayers object. This simple fix solves the issue.