Skip to content
Discussion options

You must be logged in to vote

thank you so much for your help!
been able to make an implementation I'm happy with.
leaving it here for reference, probably not that idiomatic though

import {
  Map,
  MapFullscreenControl,
  MapLocateControl,
  MapMarker,
  MapPopup,
  MapTileLayer,
  MapZoomControl,
} from "@/components/ui/map"
import { useState } from "react"
import { toast } from "sonner";
import { useMapEvents } from "react-leaflet";
import { Send } from "lucide-react";

interface MapPickerProps {
  latitude?: number
  longitude?: number
  onLocationSelect: (lat: number, lng: number) => void
}

// You can refer to this react-leaflet's example: https://react-leaflet.js.org/docs/example-events/.
export function MapPicker

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
3 replies
@jarjk
Comment options

@tonghohin
Comment options

@jarjk
Comment options

Answer selected by jarjk
Comment options

You must be logged in to vote
4 replies
@tonghohin
Comment options

@jarjk
Comment options

@tonghohin
Comment options

@jarjk
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants