code: function(url, terria, allowLoad, index) {
    index = index || 0;
    if (index >= mapping.length) {
      return undefined;
    }
    if (
      (mapping[index].matcher && !mapping[index].matcher(url)) ||
      (mapping[index].requiresLoad && !allowLoad)
    ) {
      return createCatalogItemFromUrl(url, terria, allowLoad, index + 1);
    } else {
      var item = new mapping[index].constructor(terria);
      if (!allowLoad) {
        return item;
      }
      item.url = url;
      item.name = url;
      return item
        .load()
        .yield(item)
        .otherwise(function(e) {
          console.log(e);
          return createCatalogItemFromUrl(url, terria, allowLoad, index + 1);
        });
    }
  }
docs: Creates a type derived from {@link CatalogMember} based on a given URL.
  
  @param {String} url The derived type name.
  @param {Terria} terria The Terria instance.
  @param {Boolean} allowLoad Whether it's ok to attempt to load the URL and detect failures. We generally do this for WMS type services, but not for local files.
  @returns {CatalogMember} The constructed data item or promise, or undefined if the URL is not supported.