From c6ff306ad0baee579319c090e4ad3aeee595b384 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sat, 20 Sep 2014 16:17:15 +0100 Subject: Correct check in featureHasPopup Check if the feature is a room, then check if the room has the expected information. --- src/leaflet-soton.js | 10 ++++++---- 1 file 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; } -- cgit v1.2.3