src/nodes/TMXLayer.js
function (pos) {
        var layerSize = this.layerSize,
            tiles = this.tiles

        if (pos.x < 0 || pos.y < 0 || pos.x >= layerSize.width || pos.y >= layerSize.height) {
            throw "TMX Layer: Invalid position"
        }

        var tile,
            gid = this.tileGIDAt(pos)

        // if GID is 0 then no tile exists at that point
        if (gid) {
            var z = pos.x + pos.y * layerSize.width
            tile = this.getChild({tag: z})
        }

        return tile
    }
function (pos) {
        var layerSize = this.layerSize,
            tiles = this.tiles

        if (pos.x < 0 || pos.y < 0 || pos.x >= layerSize.width || pos.y >= layerSize.height) {
            throw "TMX Layer: Invalid position"
        }

        var tile,
            gid = this.tileGIDAt(pos)

        // if GID is 0 then no tile exists at that point
        if (gid) {
            var z = pos.x + pos.y * layerSize.width
            tile = this.getChild({tag: z})
        }

        return tile
    }
function ( pos ) { var layerSize = this . layerSize , tiles = this . tiles if ( pos . x < 0 || pos . y < 0 || pos . x >= layerSize . width || pos . y >= layerSize . height ) { throw "TMX Layer: Invalid position" } var tile , gid = this . tileGIDAt ( pos ) // if GID is 0 then no tile exists at that point if ( gid ) { var z = pos . x + pos . y * layerSize . width tile = this . getChild ( { tag : z } ) } return tile }
Get the tile at a specifix tile coordinate

@param {geometry.Point} pos Position of tile to get in tile coordinates (not pixels)
@returns {cocos.nodes.Sprite} The tile
Get the tile at a specifix tile coordinate