From 53e6f8ddc3a07ac781cb00d5af9805de16178415 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sat, 20 Sep 2014 11:05:55 +0100 Subject: Expose the routeLayer such that it can be used --- src/leaflet-soton.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/leaflet-soton.js b/src/leaflet-soton.js index 8b34aaf..1673318 100644 --- a/src/leaflet-soton.js +++ b/src/leaflet-soton.js @@ -544,7 +544,7 @@ SELECT * WHERE {\ } if ("Route" in L) { - var routeLayer = new L.Route(options.busRoutes ? data.busRoutes : emptyFeatureCollection, data.busStops, { + var routeLayer = map.routeLayer = new L.Route(options.busRoutes ? data.busRoutes : emptyFeatureCollection, data.busStops, { routeOptions: { onEachFeature: function(feature, layer) { layer.on('click', function(e) { -- cgit v1.2.3