From 8bbe245ce92404ea78002f4f2cee76a108f470a6 Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Mon, 16 Dec 2019 05:24:02 +0000 Subject: [PATCH] Add snippet and comments that will not display the riders by default. #270 --- templates/map/initOpenStreetMap.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/templates/map/initOpenStreetMap.js b/templates/map/initOpenStreetMap.js index 5f51866b..37750b3e 100644 --- a/templates/map/initOpenStreetMap.js +++ b/templates/map/initOpenStreetMap.js @@ -20,8 +20,14 @@ function mapCreate(div_id, center_lat, center_lng, map_type, zoom) { }).addTo(map); // rider marker layer group + // .addTo(map) --> this will display your riders by default var ridersLayerGroup = L.layerGroup().addTo(map); + // this little snippet will not display your riders by default. + // Instead, a toggle button will display in the map, with a checkbox with text Riders. + // Check that to display the riders + //var ridersLayerGroup = L.layerGroup(); + $.ajax({ url: '{{ path('rider_locations') }}', }).done(function(response) {