diff options
author | Christopher Baines <cb15g11@soton.ac.uk> | 2014-04-11 12:21:30 +0100 |
---|---|---|
committer | Christopher Baines <cb15g11@soton.ac.uk> | 2014-04-11 12:21:30 +0100 |
commit | 9ad37c250e0e607960ee3068465976752992f7b9 (patch) | |
tree | aa401d0ee876c9bfab4fe9617d035c1112bd9fed | |
parent | 2cd1c682a24a2585336b744697c3e54e3804f1cb (diff) | |
download | leaflet-soton-9ad37c250e0e607960ee3068465976752992f7b9.tar leaflet-soton-9ad37c250e0e607960ee3068465976752992f7b9.tar.gz |
Some more ref validation
-rwxr-xr-x | create-data.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/create-data.js b/create-data.js index 149a5b4..001c0ae 100755 --- a/create-data.js +++ b/create-data.js @@ -281,6 +281,16 @@ function createRooms(buildings, workstations, callback) { if ("uri" in part.properties) { buildingPartsByURI[part.properties.uri] = part; + + var expectedRef = part.properties.uri.split("/").slice(-1)[0].split("-")[1]; + + if ("ref" in part.properties) { + if (part.properties.ref !== expectedRef) { + console.warn("Unexpected ref \"" + part.properties.ref + "\" for room " + part.properties.uri); + } + } else { + console.warn("Missing ref \"" + expectedRef + "\" for room " + part.properties.uri); + } } async.parallel([ |