From 9aceb7235665caf2b9a6d25ba00a6db58fe60f49 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sat, 7 Jun 2014 09:45:46 +0100 Subject: Use a better way of disabling the bus routes --- src/leaflet-soton.js | 4 ++-- 1 file 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) { -- cgit v1.2.3