From 77c38d655545ec3e23a786fb36271c2bd69b08f3 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sat, 27 Sep 2014 15:20:53 +0100 Subject: Sort building rooms by URI This effects the building popup. --- src/leaflet-soton.js | 7 +++++++ 1 file changed, 7 insertions(+) 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); -- cgit v1.2.3