summaryrefslogtreecommitdiff
path: root/create-data.js
diff options
context:
space:
mode:
authorChristopher Baines <cb15g11@soton.ac.uk>2014-04-11 12:21:30 +0100
committerChristopher Baines <cb15g11@soton.ac.uk>2014-04-11 12:21:30 +0100
commit9ad37c250e0e607960ee3068465976752992f7b9 (patch)
treeaa401d0ee876c9bfab4fe9617d035c1112bd9fed /create-data.js
parent2cd1c682a24a2585336b744697c3e54e3804f1cb (diff)
downloadleaflet-soton-9ad37c250e0e607960ee3068465976752992f7b9.tar
leaflet-soton-9ad37c250e0e607960ee3068465976752992f7b9.tar.gz
Some more ref validation
Diffstat (limited to 'create-data.js')
-rwxr-xr-xcreate-data.js10
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([