I need the latitude
, longitude
of the current location of the user to show posts accordingly, I'm using next.js can anyone help me out?
I solve it by doing following :-
useEffect(()=> {
navigator.geolocation.getCurrentPosition(function(position) {
console.log("Latitude is :", position.coords.latitude);
console.log("Longitude is :", position.coords.longitude);
});
})