code: function findLayers(startLayer, names) {
    return names.split(",").map(function(name) {
      // Look for an exact match on the name.
      let match = findLayer(startLayer, name, false);
  
      if (!match) {
        const colonIndex = name.indexOf(":");
        if (colonIndex >= 0) {
          // This looks like a namespaced name.  Such names will (usually?) show up in GetCapabilities
          // as just their name without the namespace qualifier.
          const nameWithoutNamespace = name.substring(colonIndex + 1);
          match = findLayer(startLayer, nameWithoutNamespace, false);
        }
      }
  
      if (!match) {
        // Try matching by title.
        match = findLayer(startLayer, name, true);
      }
  
      return match;
    });
  }
docs: /* Given a comma-separated string of layer names, returns the layer objects corresponding to them.