function createLayers(sources) {
  const len = sources.length;
  const layers = new Array(len);
  for (let i = 0; i < len; ++i) {
    layers[i] = createLayer(sources[i]);
  }
  return layers;
}
Create layers for all sources.
@param {Array<import("./Source.js").default|import("../layer/Layer.js").default>} sources The sources.
@return {Array<import("../layer/Layer.js").default>} Array of layers.