src/nodes/TMXTiledMap.js
function (opts) {
        var layerName = opts.name,
            layer = null

        this.children.forEach(function (item) {
            if (item instanceof TMXLayer && item.layerName == layerName) {
                layer = item
            }
        })
        if (layer !== null) {
            return layer
        }
    }
function (opts) {
        var layerName = opts.name,
            layer = null

        this.children.forEach(function (item) {
            if (item instanceof TMXLayer && item.layerName == layerName) {
                layer = item
            }
        })
        if (layer !== null) {
            return layer
        }
    }
function ( opts ) { var layerName = opts . name , layer = null this . children . forEach ( function ( item ) { if ( item instanceof TMXLayer && item . layerName == layerName ) { layer = item } } ) if ( layer !== null ) { return layer } }
Get a layer

@opt {String} name The name of the layer to get
@returns {cocos.nodes.TMXLayer} The layer requested
Get a layer