summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <cb15g11@soton.ac.uk>2014-06-07 09:45:46 +0100
committerChristopher Baines <cb15g11@soton.ac.uk>2014-06-07 09:45:46 +0100
commit9aceb7235665caf2b9a6d25ba00a6db58fe60f49 (patch)
tree91c1d194d81c180b6c393597a35d9b5ba267f7e5
parentaa8f9f509e360aefb33a03db7013a20f34db1b11 (diff)
downloadleaflet-soton-9aceb7235665caf2b9a6d25ba00a6db58fe60f49.tar
leaflet-soton-9aceb7235665caf2b9a6d25ba00a6db58fe60f49.tar.gz
Use a better way of disabling the bus routes
-rw-r--r--src/leaflet-soton.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/leaflet-soton.js b/src/leaflet-soton.js
index f32b3a9..eda94ae 100644
--- a/src/leaflet-soton.js
+++ b/src/leaflet-soton.js
@@ -453,7 +453,7 @@ SELECT * WHERE {\
layer.addData(data[layerName]);
}
- var routeLayer = new LS.RouteLayer(data.busRoutes, data.busStops, {
+ var routeLayer = new LS.RouteLayer(options.busRoutes ? data.busRoutes : emptyFeatureCollection, data.busStops, {
routeOptions: {
onEachFeature: function(feature, layer) {
layer.on('click', function(e) {
@@ -462,7 +462,7 @@ SELECT * WHERE {\
showPopup(map, content, e.latlng);
});
},
- style: options.busRoutes ? busRouteStyle : blankStyle
+ style: busRouteStyle
},
stopOptions: {
onEachFeature: function(feature, layer) {