- Issue created by @dianacastillo
- 🇮🇳India prem suthar Ahemdabad- Gujrat , Jodhpur - Rajsthan
You can use this Java script code on the page where you need the current location of user From this code you will get the latitude and longitude.
navigator.geolocation.getCurrentPosition((position)=> { const p=position.coords; console.log(p.latitude,p.longitude); })
- 🇮🇹Italy itamair
Hi @dianacastillo
I recalled that this was faced sometime ago, but couldn't make it work by some embedded setup / settings in the Geofield module,
and (I feel) some custom frontend js hack should rather be applied.Please refer to this existing issue / thread that looks very related to what you are trying to accomplish:
https://www.drupal.org/project/geofield/issues/3065776 → - Status changed to Needs review
3 months ago 9:50pm 8 August 2024 - 🇮🇹Italy itamair
Closing this, due to lack of activity, after being marked as "needs review".
- Status changed to Fixed
3 months ago 2:41pm 22 August 2024 Automatically closed - issue fixed for 2 weeks with no activity.