@@ -5,7 +5,6 @@ import { useSelector, useDispatch } from 'react-redux'
5
5
import { updateMapState } from '../slices/mapSlice' ;
6
6
7
7
// Third party packages
8
- import { useMediaQuery } from '@uidotdev/usehooks' ;
9
8
import Button from 'react-bootstrap/Button' ;
10
9
11
10
// FA
@@ -92,7 +91,6 @@ export default function MapWrapper({
92
91
93
92
// Misc
94
93
const navigate = useNavigate ( ) ;
95
- const largeScreen = useMediaQuery ( 'only screen and (min-width : 768px)' ) ;
96
94
97
95
function centerMyLocation ( coordinates ) {
98
96
if ( mapView . current ) {
@@ -658,7 +656,30 @@ export default function MapWrapper({
658
656
659
657
return (
660
658
< div className = "map-container" >
661
- < div ref = { mapElement } className = "map" />
659
+ < div ref = { mapElement } className = "map" >
660
+ < div className = "zoom-btn" >
661
+ < Button className = "zoom-in" variant = "primary" onClick = { zoomIn } >
662
+ < FontAwesomeIcon icon = { faPlus } />
663
+ </ Button >
664
+ < div className = "zoom-divider" />
665
+ < Button
666
+ className = "zoom-out"
667
+ variant = "primary"
668
+ onClick = { zoomOut } >
669
+ < FontAwesomeIcon icon = { faMinus } />
670
+ </ Button >
671
+ </ div >
672
+
673
+ { ! isPreview && (
674
+ < Button
675
+ className = "map-btn my-location"
676
+ variant = "primary"
677
+ onClick = { toggleMyLocation } >
678
+ < FontAwesomeIcon icon = { faLocationCrosshairs } />
679
+ My location
680
+ </ Button >
681
+ ) }
682
+ </ div >
662
683
663
684
< div id = "popup" onClick = { cameraDetailRoute } className = "ol-popup" >
664
685
< FontAwesomeIcon
@@ -690,29 +711,6 @@ export default function MapWrapper({
690
711
</ Button >
691
712
) }
692
713
693
- { ! isPreview && ( ! iconClicked || largeScreen ) && (
694
- < Button
695
- className = "map-btn my-location"
696
- variant = "primary"
697
- onClick = { toggleMyLocation } >
698
- < FontAwesomeIcon icon = { faLocationCrosshairs } />
699
- My location
700
- </ Button >
701
- ) }
702
-
703
- < div className = "zoom-btn" >
704
- < Button className = "zoom-in" variant = "primary" onClick = { zoomIn } >
705
- < FontAwesomeIcon icon = { faPlus } />
706
- </ Button >
707
- < div className = "zoom-divider" />
708
- < Button
709
- className = "zoom-out"
710
- variant = "primary"
711
- onClick = { zoomOut } >
712
- < FontAwesomeIcon icon = { faMinus } />
713
- </ Button >
714
- </ div >
715
-
716
714
{ ! isPreview && (
717
715
< div >
718
716
< RouteSearch />
0 commit comments