Drupal/OpenLayers: Hide empty layers in the layer switcher
When you you use the Drupal OpenLayers module to display several geometries , e.g. GPX tracks, on a base map one way to do it is to create a separate layer for each geometry to display. If you want the overlay layers to appear in the layer switcher but the actual number of overlay layers varies depending on the node data, all layers, including the empty ones, appear in the layer switcher. ...