Skip to content

Commit

Permalink
feat: Do not reset traffic colors on a right click for now
Browse files Browse the repository at this point in the history
  • Loading branch information
Stepan Kizim committed Oct 14, 2024
1 parent 796416a commit ae0f73e
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,11 @@

new mapboxgl.Popup().setLngLat(popup_coord).setHTML(popupContent).addTo(map);

const features = data[0]["edges"].map(to_traffic_flow).filter(flow => flow !== null).flat();
// Update the traffic-lines source with the new data
map.getSource("traffic-lines").setData({
type: "FeatureCollection",
features: features,
});
// // Update the traffic-lines source with the new data
// map.getSource("traffic-lines").setData({
// type: "FeatureCollection",
// features: data[0]["edges"].map(to_traffic_flow).filter(flow => flow !== null).flat(),
// });
})
.catch((err) => {
console.error("Bad /locate response: ", err);
Expand Down

0 comments on commit ae0f73e

Please sign in to comment.