Skip to content

Commit

Permalink
updated icon sizes, zoom control position
Browse files Browse the repository at this point in the history
  • Loading branch information
pshanmukha committed Jun 16, 2024
1 parent e489394 commit 8e937a8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/components/LocationSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const LocationSearch = ({ onPlaceClick, onError }: LocationSearchProps) => {

{isLoading && (
<div className="absolute inset-y-0 right-0 flex items-center px-2">
<CircularProgress size={20} />
<CircularProgress size={24} />
</div>
)}

Expand All @@ -80,7 +80,7 @@ const LocationSearch = ({ onPlaceClick, onError }: LocationSearchProps) => {
type="submit"
className="absolute inset-y-0 right-0 flex items-center px-2 text-gray-500 hover:text-gray-700"
>
<RiSearchLine />
<RiSearchLine size={24} />
</button>
)}

Expand All @@ -93,7 +93,7 @@ const LocationSearch = ({ onPlaceClick, onError }: LocationSearchProps) => {
onClick={() => handleClear()}
className="absolute inset-y-0 right-0 flex items-center px-2 text-gray-500 hover:text-gray-700"
>
<RiCloseLine />
<RiCloseLine size={24} />
</button>
)}
</div>
Expand Down
4 changes: 3 additions & 1 deletion src/components/Map.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Place } from "../api/Place";
import "leaflet/dist/leaflet.css";
import L, { Map as LeafletMap } from "leaflet";
import { MapContainer, TileLayer, Marker } from "react-leaflet";
import { MapContainer, TileLayer, Marker, ZoomControl } from "react-leaflet";
import { useEffect, useRef } from "react";
//marker images
import iconUrl from "leaflet/dist/images/marker-icon.png";
Expand Down Expand Up @@ -40,12 +40,14 @@ const Map = ({ place }: MapProps) => {
zoom={12}
scrollWheelZoom
className="h-full"
zoomControl={false}
>
<TileLayer
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
attribution='&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
/>
{place && <Marker position={[place.latitude, place.longitude]} />}
<ZoomControl position="bottomright" />
</MapContainer>
);
};
Expand Down

0 comments on commit 8e937a8

Please sign in to comment.