Method: getLayersFromContext
Create an array of layers from an array of layerContext objects.

Parameters:
layersContext - {Array(Object)} An array of objects representing layers.

Returns:
{Array(<OpenLayers.Layer>)} An array of layers.
199488
function(layersContext) {
        var layers = [];
        for (var i=0, len=layersContext.length; i<len; i++) {
            var layer = this.getLayerFromContext(layersContext[i]);
            if (layer !== null) {
                layers.push(layer);
            }
        }
        return layers;
    }
1160790
public static KerasLayer getKerasLayerFromConfig(Map<String, Object> layerConfig,
                                                     KerasLayerConfiguration conf,
                                                     Map<String, Class<? extends KerasLayer>> customLayers,
                                                     Map<String, SameDiffLambdaLayer> lambdaLayers,
                                                     Map<String, ? extends KerasLayer> previousLayers)
            throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException {
        return getKerasLayerFromConfig(layerConfig, false, conf, customLayers, lambdaLayers, previousLayers);
    }
1273524
def getLayer(self, name):
        
        name = normalizers.normalizeLayerName(name)
        return self._getLayer(name)
220205
def layers(self):
        
        if self._layers is None:
            self.__init()
        self._getLayers()
        return self._layers
736797
@Override
    public Layer getLayer()
    {
        final Node<?> parent = getParent();// change, no iteration, no testing, no casting, recurses upwards to a Layer, and Layer returns itself, CYCLES!!!

        if (null != parent)
        {
            return parent.getLayer();
        }
        return null;
    }
524704
def layers():
  """"""
  global _cached_layers
  if _cached_layers is not None:
    return _cached_layers
  layers_module = tf.layers
  try:
    from tensorflow.python import tf2  # pylint: disable=g-direct-tensorflow-import,g-import-not-at-top
    if tf2.enabled():
      tf.logging.info("Running in V2 mode, using Keras layers.")
      layers_module = tf.keras.layers
  except ImportError:
    pass
  _cached_layers = layers_module
  return layers_module
115199
def retrieve_layers(self, *args, **options):
        
        # init empty Q object
        queryset = Q()

        # if no layer specified
        if len(args) < 1:
            # cache queryset
            all_layers = Layer.objects.published().external()
            # check if there is any layer to exclude
            if options['exclude']:
                # convert comma separated string in python list, ignore spaces
                exclude_list = options['exclude'].replace(' ', '').split(',')
                # retrieve all layers except the ones specified in exclude list
                return all_layers.exclude(slug__in=exclude_list)
            else:
                # nothing to exclude, retrieve all layers
                self.verbose('no layer specified, will retrieve all layers!')
                return all_layers

        # otherwise loop over args and retrieve each specified layer
        for layer_slug in args:
            queryset = queryset | Q(slug=layer_slug)
            # verify existence
            try:
                # retrieve layer
                layer = Layer.objects.get(slug=layer_slug)
                # raise exception if layer is not external
                if not layer.is_external:
                    raise CommandError('Layer "%s" is not an external layer\n\r' % layer_slug)
                # raise exception if layer is not published
                if not layer.is_published:
                    raise CommandError('Layer "%s" is not published. Why are you trying to work on an unpublished layer?\n\r' % layer_slug)
            # raise exception if one of the layer looked for doesn't exist
            except Layer.DoesNotExist:
                raise CommandError('Layer "%s" does not exist\n\r' % layer_slug)

        # return published external layers
        return Layer.objects.published().external().select_related().filter(queryset)
395222
def get_layer(self, name: str=None):
        
        if name is None:
            name = self.__last_layer_name

        return self.__layers[name]
55762
function findLayers(layers, names) {
  if (!defined(names)) {
    // If a list of layers is not specified, we're using all layers.
    return layers;
  }
  return names.split(",").map(function(id) {
    return findLayer(layers, id);
  });
}
1080723
function(context, node) {
        var layerContext = {
            visibility: (node.getAttribute("hidden") != "1"),
            queryable: (node.getAttribute("queryable") == "1"),
            formats: [],
             styles: [],
             metadata: {}
        };

        this.runChildNodes(layerContext, node);
        // set properties common to multiple objects on layer options/params
        context.layersContext.push(layerContext);
    }
165201
def get_layers(self):
        
        layers = set()
        for element in self.elements:
            if isinstance(element, PolygonSet):
                layers.update(element.layers)
            elif isinstance(element, CellReference) or isinstance(
                    element, CellArray):
                layers.update(element.ref_cell.get_layers())
        for label in self.labels:
            layers.add(label.layer)
        return layers
1337822
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;
}
524034
def layer(self, layer_name):
		
		if layer_name in self.__layers.keys():
			return self.__layers[layer_name]
		elif layer_name in self.__class__.__builtin_layers__:
			return self.__class__.__builtin_layers__[layer_name]

		raise RuntimeError('Invalid layer name')
994330
function() {
            var layers = this.children,
                len = layers.length,
                n;

            for(n = 0; n < len; n++) {
                layers[n].clear();
            }
            return this;
        }
1151997
def get_layer(self):
        
        if self.layer:
            return
        try:
            self.layer = Layer.objects.get(slug=self.kwargs['slug'])
        except Layer.DoesNotExist:
            raise Http404(_('Layer not found'))
1181984
function(layerContext, node) {
        var obj = {"width": node.getAttribute("width"), "height": node.getAttribute("height")};
        layerContext.tileSize = obj;
    }
871657
function() {
      var self = this;

      var oldLayers = this.layers;
      this.layers = {};

      function findLayerView(layer) {
        var lv = _.find(oldLayers, function(layer_view) {
          var m = layer_view.model;
          return m.isEqual(layer);
        });
        return lv;
      }

      function canReused(layer) {
        return self.map.layers.find(function(m) {
          return m.isEqual(layer);
        });
      }

      // remove all
      for(var layer in oldLayers) {
        var layer_view = oldLayers[layer];
        if (!canReused(layer_view.model)) {
          layer_view.remove();
        }
      }

      this.map.layers.each(function(lyr) {
        var lv = findLayerView(lyr);
        if (!lv) {
          self._addLayer(lyr);
        } else {
          lv.setModel(lyr);
          self.layers[lyr.cid] = lv;
          self.trigger('newLayerView', lv, lv.model, self);
        }
      });

    }