Closed mjtejeda closed 1 year ago
Hello, I would like to know if there is a way to make the handleSelectionChanged function for the edges on the map more dynamic in order to decouple traffic data from the objects.
Here is a snippet of the code:
handleSelectionChanged(selectionType, selection) { if (selectionType === "edge" && selection === "MCT--SAX") { this.props.trafficKeyChanged("MCT - SAX"); } else if (selectionType === "edge" && selection === "MCT--SL") { this.props.trafficKeyChanged("MCT - SL"); } else if (selectionType === "edge" && selection === "MCT--AW") { this.props.trafficKeyChanged("MCT - AW"); }
Hello, I would like to know if there is a way to make the handleSelectionChanged function for the edges on the map more dynamic in order to decouple traffic data from the objects.
Here is a snippet of the code: