diff --git a/public/marker-icon-red.png b/public/marker-icon-red.png new file mode 100644 index 0000000..fcde1d1 Binary files /dev/null and b/public/marker-icon-red.png differ diff --git a/public/marker-icon.png b/public/marker-icon.png new file mode 100644 index 0000000..950edf2 Binary files /dev/null and b/public/marker-icon.png differ diff --git a/public/marker-shadow.png b/public/marker-shadow.png new file mode 100644 index 0000000..9fd2979 Binary files /dev/null and b/public/marker-shadow.png differ diff --git a/src/app/map/page.tsx b/src/app/map/page.tsx index c11ddb8..34a880a 100644 --- a/src/app/map/page.tsx +++ b/src/app/map/page.tsx @@ -18,7 +18,7 @@ export default function Page() { > -
+
diff --git a/src/components/map.tsx b/src/components/map.tsx index 29ae55c..c00fbf9 100644 --- a/src/components/map.tsx +++ b/src/components/map.tsx @@ -1,24 +1,61 @@ import { MapContainer, Marker, Popup, TileLayer } from "react-leaflet"; +import { Icon } from "leaflet"; +import "leaflet/dist/leaflet.css"; const Map = () => { - const position = [45.5637, 10.16356]; + const positions = [ + { + name: "Autogeneral", + position: [45.49285083101236, 10.15951437254693], + }, + { + name: "Delizie e Sapori (Cuor di gelato)", + position: [45.55425938252774, 10.227818585851844], + }, + { + name: "Casa dell'Ottica di Zanotti Giulio", + position: [45.53644055688526, 10.222584658771389], + }, + { + name: "Nuova Ottica", + position: [45.48257540298808, 10.23957216093029], + }, + ]; + + const customMarker = new Icon({ + iconUrl: "marker-icon-red.png", + iconAnchor: [10, 20], + popupAnchor: [0, -15], + }); + return ( - <> - - - - Hey ! you found me + + + {positions.map((client) => ( + + + {client.name} +
+ P.IVA + 03417520172 +
+
-
- + ))} +
); };