Closed RELNO closed 4 years ago
Fix by @yzheng1998 :
this function checks if the menu has the layer as a way to only load layers existing in this end point
const layerOrder = ["ABM", "AGGREGATED_TRIPS", "GRID", "ACCESS"]; const _renderLayers = () => { let layers = []; for (var layer of layerOrder) { if (menu.includes(layer)) { layers.push(layersKey[layer]); } } return layers; };
however,
data: cityioData.ABM.trips, cityioData, ABMmode, zoomLevel: viewState.zoom, sliders, }), AGGREGATED_TRIPS: AggregatedTripsLayer({ data: cityioData.ABM.trips, cityioData, ABMmode,
this type of nested check would break the app, since if there is no cityioDATA.abm, [‘trips’] would not exist
Fix by @yzheng1998 :
this function checks if the menu has the layer as a way to only load layers existing in this end point
however,
this type of nested check would break the app, since if there is no cityioDATA.abm, [‘trips’] would not exist