diff --git a/src/containers/Map/ShapePoints.js b/src/containers/Map/ShapePoints.js
index cfae211..3482339 100644
--- a/src/containers/Map/ShapePoints.js
+++ b/src/containers/Map/ShapePoints.js
@@ -17,9 +17,11 @@ const iconStyle = {
iconSize: 0.5,
};
-const defibIconStyle = {
- ...iconStyle,
- iconAllowOverlap: true,
+const defibCircleStyle = {
+ circleRadius: 8,
+ circleColor: ["get", "defibColor"],
+ circleStrokeColor: "#FFFFFF",
+ circleStrokeWidth: 2,
};
const useStyles = createStyles(({ theme: { colors } }) => ({
@@ -64,12 +66,12 @@ export default function ShapePoints({ shape, children, ...shapeSourceProps }) {
/>
{/* Defibrillators (DAE) – separate layer (non-clustered) */}
-
{children}
diff --git a/src/scenes/AlertCurMap/ControlButtons.js b/src/scenes/AlertCurMap/ControlButtons.js
index a51500b..b66138c 100644
--- a/src/scenes/AlertCurMap/ControlButtons.js
+++ b/src/scenes/AlertCurMap/ControlButtons.js
@@ -20,8 +20,6 @@ export default function ControlButtons({
setZoomLevel,
detached,
}) {
- // const styles = useStyles();
-
return (
<>
{
+ const toggleDefibsOnAlertMap = useCallback(async () => {
+ if (defibsEnabled) {
+ defibsActions.setShowDefibsOnAlertMap(false);
+ return;
+ }
+
if (loadingDaeCorridor) {
return;
}
@@ -174,7 +183,7 @@ export default withConnectivity(
} finally {
setLoadingDaeCorridor(false);
}
- }, [alert, loadingDaeCorridor, navigation, toast]);
+ }, [alert, defibsEnabled, loadingDaeCorridor, navigation, toast]);
const [notifyAroundMutation] = useMutation(NOTIFY_AROUND_MUTATION);
const notifyAround = useCallback(async () => {
@@ -501,21 +510,33 @@ export default withConnectivity(
>
diff --git a/src/scenes/AlertCurOverview/styles.js b/src/scenes/AlertCurOverview/styles.js
index 3ae0cd5..9b4a89e 100644
--- a/src/scenes/AlertCurOverview/styles.js
+++ b/src/scenes/AlertCurOverview/styles.js
@@ -73,6 +73,9 @@ export default createStyles(({ wp, hp, scaleText, theme: { colors } }) => ({
actionShowDefibsButton: {
backgroundColor: colors.blue,
},
+ actionShowDefibsButtonActive: {
+ backgroundColor: colors.grey,
+ },
actionShowDefibsText: {},
actionShowDefibsIcon: {},
actionSmsButton: {},