vendor/ember-leaflet-cartodb/cartodb_noleaflet.js
function(index) {
    var layers = [];
    for(var i = 0; i < this.layers.length; ++i) {
      var layer = this.layers[i];
      if(this._isLayerVisible(layer)) {
        layers.push(i);
      }
    }
    if (index >= layers.length) {
      return -1;
    }
    return +layers[index];
  }
function(index) {
    var layers = [];
    for(var i = 0; i < this.layers.length; ++i) {
      var layer = this.layers[i];
      if(this._isLayerVisible(layer)) {
        layers.push(i);
      }
    }
    if (index >= layers.length) {
      return -1;
    }
    return +layers[index];
  }
function ( index ) { var layers = [ ] ; for ( var i = 0 ; i < this . layers . length ; ++ i ) { var layer = this . layers [ i ] ; if ( this . _isLayerVisible ( layer ) ) { layers . push ( i ) ; } } if ( index >= layers . length ) { return - 1 ; } return + layers [ index ] ; }
return the layer number by index taking into
account the hidden layers.
return the layer number by index taking into account the hidden layers .