summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <cb15g11@soton.ac.uk>2014-09-27 15:20:53 +0100
committerChristopher Baines <cb15g11@soton.ac.uk>2014-09-27 15:20:53 +0100
commit77c38d655545ec3e23a786fb36271c2bd69b08f3 (patch)
tree0c227939a61ec1de27319305687a66c62163dfff
parent1148eeac36048f84740004a2dbc3f1e15a39cc6b (diff)
downloadleaflet-soton-77c38d655545ec3e23a786fb36271c2bd69b08f3.tar
leaflet-soton-77c38d655545ec3e23a786fb36271c2bd69b08f3.tar.gz
Sort building rooms by URI
This effects the building popup.
-rw-r--r--src/leaflet-soton.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/leaflet-soton.js b/src/leaflet-soton.js
index 2d96f97..0eb51be 100644
--- a/src/leaflet-soton.js
+++ b/src/leaflet-soton.js
@@ -1265,6 +1265,13 @@ SELECT * WHERE {\
for (var level in rooms) {
var levelRooms = rooms[level];
+ levelRooms.sort(function(a, b) {
+ if (a > b) {
+ return 1;
+ }
+ return -1;
+ });
+
levelRooms.forEach(function(uri) {
var room = LS.getFeatureByURI(uri);