Skip to content

Commit

Permalink
refactor: anchor pin to bottom, trying to prevent marker from showing…
Browse files Browse the repository at this point in the history
… on page load
  • Loading branch information
clintonlunn committed May 30, 2024
1 parent 1ede2f2 commit 2d7dadc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/maps/CoordinatePickerMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ export const CoordinatePickerMap: React.FC<CoordinatePickerMapProps> = ({
<ScaleControl unit='metric' style={{ marginBottom: 0 }} position='bottom-left' />
{showFullscreenControl && <FullscreenControl />}
<NavigationControl showCompass={false} position='bottom-right' />
{(selectedCoord != null) && (
{(selectedCoord.lat !== 0 && selectedCoord.lng !== 0) && (
<>
<Marker longitude={selectedCoord.lng} latitude={selectedCoord.lat} draggable onDragEnd={onMarkerDragEnd}>
<Marker longitude={selectedCoord.lng} latitude={selectedCoord.lat} draggable onDragEnd={onMarkerDragEnd} anchor='bottom'>
<MapPin size={36} weight='fill' className='text-accent' />
</Marker>
<CoordinatePickerPopup
Expand Down

0 comments on commit 2d7dadc

Please sign in to comment.