summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristopher Baines <cb15g11@soton.ac.uk>2014-09-20 16:17:15 +0100
committerChristopher Baines <cb15g11@soton.ac.uk>2014-09-20 16:17:15 +0100
commitc6ff306ad0baee579319c090e4ad3aeee595b384 (patch)
tree70c84ba4cbbb7a40e95ded1483f18ac82c650804 /src
parentcc19c592b3c5ed7dc814e427ce990235d27d2ff5 (diff)
downloadleaflet-soton-c6ff306ad0baee579319c090e4ad3aeee595b384.tar
leaflet-soton-c6ff306ad0baee579319c090e4ad3aeee595b384.tar.gz
Correct check in featureHasPopup
Check if the feature is a room, then check if the room has the expected information.
Diffstat (limited to 'src')
-rw-r--r--src/leaflet-soton.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/leaflet-soton.js b/src/leaflet-soton.js
index 85a322b..f2e4e5b 100644
--- a/src/leaflet-soton.js
+++ b/src/leaflet-soton.js
@@ -421,13 +421,15 @@ SELECT * WHERE {\
if( !('images' in feature.properties) ) { feature.properties.images=[]; }
if ('buildingpart' in feature.properties) {
- if( feature.properties.features.length==0
- && feature.properties.contents.length==0
- && feature.properties.images.length==0 ) {
+ if (feature.properties.buildingpart === "room" &&
+ feature.properties.features.length == 0 &&
+ feature.properties.contents.length == 0 &&
+ feature.properties.images.length == 0) {
+
return false;
}
}
-
+
return true;
}