examples/map/js/backbone.marionette.js
function(item, ItemView, index){
    // get the itemViewOptions if any were specified
    var itemViewOptions = Marionette.getOption(this, "itemViewOptions");
    if (_.isFunction(itemViewOptions)){
      itemViewOptions = itemViewOptions.call(this, item, index);
    }

    // build the view 
    var view = this.buildItemView(item, ItemView, itemViewOptions);
    
    // set up the child view event forwarding
    this.addChildViewEventForwarding(view);

    // this view is about to be added
    this.triggerMethod("before:item:added", view);

    // Store the child view itself so we can properly
    // remove and/or close it later
    this.children.add(view);

    // Render it and show it
    this.renderItemView(view, index);

    // call the "show" method if the collection view
    // has already been shown
    if (this._isShown){
      Marionette.triggerMethod.call(view, "show");
    }

    // this view was added
    this.triggerMethod("after:item:added", view);
  }
function(item, ItemView, index){
    // get the itemViewOptions if any were specified
    var itemViewOptions = Marionette.getOption(this, "itemViewOptions");
    if (_.isFunction(itemViewOptions)){
      itemViewOptions = itemViewOptions.call(this, item, index);
    }

    // build the view 
    var view = this.buildItemView(item, ItemView, itemViewOptions);
    
    // set up the child view event forwarding
    this.addChildViewEventForwarding(view);

    // this view is about to be added
    this.triggerMethod("before:item:added", view);

    // Store the child view itself so we can properly
    // remove and/or close it later
    this.children.add(view);

    // Render it and show it
    this.renderItemView(view, index);

    // call the "show" method if the collection view
    // has already been shown
    if (this._isShown){
      Marionette.triggerMethod.call(view, "show");
    }

    // this view was added
    this.triggerMethod("after:item:added", view);
  }
function ( item , ItemView , index ) { // get the itemViewOptions if any were specified var itemViewOptions = Marionette . getOption ( this , "itemViewOptions" ) ; if ( _ . isFunction ( itemViewOptions ) ) { itemViewOptions = itemViewOptions . call ( this , item , index ) ; } // build the view  var view = this . buildItemView ( item , ItemView , itemViewOptions ) ; // set up the child view event forwarding this . addChildViewEventForwarding ( view ) ; // this view is about to be added this . triggerMethod ( "before:item:added" , view ) ; // Store the child view itself so we can properly // remove and/or close it later this . children . add ( view ) ; // Render it and show it this . renderItemView ( view , index ) ; // call the "show" method if the collection view // has already been shown if ( this . _isShown ) { Marionette . triggerMethod . call ( view , "show" ) ; } // this view was added this . triggerMethod ( "after:item:added" , view ) ; }
Render the child item's view and add it to the HTML for the collection view.
Render the child item s view and add it to the HTML for the collection view .