(name, ri, ci)
| 53 | |
| 54 | Given(/^the node map$/, function (docstring, callback) { |
| 55 | const addNode = (name, ri, ci) => { |
| 56 | const lonLat = this.tableCoordToLonLat(ci, ri); |
| 57 | if (name.match(/[a-z]/)) { |
| 58 | if (this.nameNodeHash[name]) |
| 59 | throw new Error(util.format('*** duplicate node %s', name)); |
| 60 | this.addOSMNode(name, lonLat[0], lonLat[1], null); |
| 61 | } else if (name.match(/[0-9]/)) { |
| 62 | if (this.locationHash[name]) |
| 63 | throw new Error(util.format('*** duplicate node %s', name)); |
| 64 | this.addLocation(name, lonLat[0], lonLat[1], null); |
| 65 | } |
| 66 | }; |
| 67 | |
| 68 | docstring.split(/\n/).forEach((row, ri) => { |
| 69 | row.split('').forEach((cell, ci) => { |
no test coverage detected