Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return street view widget #1170

Merged
merged 2 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions src/components/molecules/widgets/WidgetWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
IWidgetAccidentCountByCarType,
IWidgetInjuredAccidentsWithPedestrians,
IWidgetKilledAndInjuredCountPerAgeGroup,
IWidgetStreetViewData,
} from 'models/WidgetData';
import visionZeroImage from 'assets/vision_zero_2_plus_1.png';
import vision_zero_10_50_90 from 'assets/vision_zero_10_50_90.png';
Expand All @@ -43,6 +44,7 @@ import { WidgetName } from 'models/WidgetName';
import KilledAndInjuredCountPerAgeGroupWidget from './KilledAndInjuredCountPerAgeGroupWidget';
import { getInjuredBySeverityVerbLabel } from 'utils/text.utils';
import KilledAndInjuredCountPerAgeGroupStackedWidget from './KilledAndInjuredCountPerAgeGroupStackedWidget';
import StreetViewWidget from './StreetViewWidget';

interface IProps {
widget: IWidgetBase;
Expand Down Expand Up @@ -80,11 +82,10 @@ const WidgetWrapper: FC<IProps> = ({ widget, locationText, sizeOptions, editorBa
widgetComponent = <HeatMap data={data.items as IPoint[]} />;
break;
}
// remove street_view until fixed
// case WidgetName.street_view: {
// widgetComponent = <StreetViewWidget data={data as IWidgetStreetViewData} />;
// break;
// }
case WidgetName.street_view: {
widgetComponent = <StreetViewWidget data={data as IWidgetStreetViewData} />;
break;
}
case WidgetName.accident_count_by_severity: {
widgetComponent = (
<CountBySeverityTextWidget
Expand Down
3 changes: 1 addition & 2 deletions src/services/data.verification/data.verification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ export const verifiedWidgetData = (widget: any) => {
break;
}
case 'street_view': {
//temporary till fixing widget
// isValid = validCoords(items.latitude) && validCoords(items.longitude);
isValid = validCoords(items.latitude) && validCoords(items.longitude);
break;
}
case 'most_severe_accidents': {
Expand Down
Loading