diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/teachingrooms.html | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/examples/teachingrooms.html b/examples/teachingrooms.html index 36ab2a1..7a5ca30 100644 --- a/examples/teachingrooms.html +++ b/examples/teachingrooms.html @@ -186,6 +186,9 @@ singleMarkerMode: true }); + var totalMappedTeachingRooms = 0; + var totalUnMappedTeachingRooms = 0; + data.buildings.features.forEach(function(building) { var roomsMissing = 0; @@ -207,6 +210,9 @@ if (!("center" in room.properties)) { roomsMissing += 1; + totalUnMappedTeachingRooms += 1; + } else { + totalMappedTeachingRooms += 1; } }); } @@ -221,6 +227,12 @@ } }); + console.log("Total mapped teaching rooms: " + totalMappedTeachingRooms); + console.log("Total un-mapped teaching rooms: " + totalUnMappedTeachingRooms); + console.log("Percentage done: " + ((totalMappedTeachingRooms / + (totalMappedTeachingRooms + + totalUnMappedTeachingRooms)).toFixed(2) * 100) + "%"); + map.addLayer(markers); }); |