diff --git a/static/js/map.js b/static/js/map.js index d8a1ecb581f5f44cceaaca375b5eba0ed18304d4..82af2b8f2e894690c559b6bc135152be491ad988 100644 --- a/static/js/map.js +++ b/static/js/map.js @@ -160,11 +160,15 @@ BusMap.Map = function(opts) { }).bindLabel(route, { noHide: true, direction: 'right', + clickable: true, }).bindPopup(text + text_after, popupOpts).addTo(that.vehicleMarkersGroup); } else { that.vehicleMarkers[v].setLatLng([vehicles[v].lat, vehicles[v].lon]) .setIconAngle(vehicles[v].heading); } + that.vehicleMarkers[v].label.on('click', function() { + this._source.openPopup(); + }); that.vehicleMarkers[v].bm_updated = Date.now() // Add predictions to the marker popup, if available