summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/doors.html11
1 files changed, 5 insertions, 6 deletions
diff --git a/examples/doors.html b/examples/doors.html
index 070045e..a288885 100644
--- a/examples/doors.html
+++ b/examples/doors.html
@@ -100,12 +100,13 @@
console.log(roomsByUri);
data.buildings.features.forEach(function(building) {
- // if the building has some entrances in the data
- if ("entrances" in building.properties) {
+ var title = document.createElement("h2");
+ title.textContent = building.properties.name;
- var title = document.createElement("h2");
- title.textContent = building.properties.name;
+ div.appendChild(title);
+ // if the building has some entrances in the data
+ if ("entrances" in building.properties) {
if (building.properties.uri in buildingRooms) {
var rooms = buildingRooms[building.properties.uri];
@@ -129,8 +130,6 @@
}
});
- div.appendChild(title);
-
// create the list of entrances
var table = document.createElement("table");
var thead = document.createElement("thead");