From c9c192fbcb3a6c5a9e8350d65254685fedf577cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Greinhofer?= Date: Thu, 27 Jun 2019 17:19:42 -0500 Subject: [PATCH] Add generic markers Adds generic markers for fatalities without a type. The marker will be a simple plain circle. We decided not to add an icon to avoid confusing the users. Fixes scrapd/scrapdviz#126 --- components/scrapd-map/component.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/components/scrapd-map/component.js b/components/scrapd-map/component.js index 17ce4cc..05689c7 100644 --- a/components/scrapd-map/component.js +++ b/components/scrapd-map/component.js @@ -123,24 +123,23 @@ function clusterMarker(coordinates, count) { function SingleMarker(fatality) { let Icon; - let markerStyle = markerStyle; + let SingleMarkerStyle = markerStyle; if (fatality.Type == 'motorcycle') { - markerStyle = markerStyleMotorcycle; + SingleMarkerStyle = markerStyleMotorcycle; Icon = ; } else if (fatality.Type == 'pedestrian') { - markerStyle = markerStylePedestrian; + SingleMarkerStyle = markerStylePedestrian; Icon = ; } else if (fatality.Type == 'bicycle') { - markerStyle = markerStyleBicycle; + SingleMarkerStyle = markerStyleBicycle; Icon = ; } else if (fatality.Type == 'motor vehicle') { - markerStyle = markerStyleMotor; + SingleMarkerStyle = markerStyleMotor; Icon = ; } return ( - - {/* */} + {Icon} );