Update timezone in cmn_location
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2024 11:23 PM
Hi Team,
I have to update timezone in cmn_location table using latitude and longitude.
How can we do it using GoogleMapsHelper OOB script include? Please help on this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2024 04:26 AM - edited 07-24-2024 04:26 AM
Absolutely not clear what your issue is. The mentioned fields can be filled with any values just like you do for other tables/fields. So why do you need any API for that? And why should the geo-coordinates of a location change permanently? Is it a moving location? Pretty strange!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2024 04:37 AM - edited 07-29-2024 01:31 AM
Hi Preethi26,
While GoogleMapsHelper might not be the best fit for this, you can leverage the Geolocation API to achieve this. Here's a quick approach:
- Use the Geolocation object to fetch the user's latitude and longitude.
Then, utilize a third-party service like a timezone lookup API to convert those coordinates to a timezone name. - Finally, update the cmn_location table with the retrieved timezone name.
This approach avoids custom scripting and leverages existing functionalities. Let me know if you'd like further details on the Geolocation API or timezone lookup services!
P.S. Looking for a unique gift idea? Check out our chocolate gift baskets Canada, perfect for any occasion!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2024 02:21 AM
Hi @frelancesage , Thank You Iam new to this. Can you provide some details on Geolocation API or timezone lookup services Please any documents i can refer?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2024 04:57 AM
Hi @Preethi26 ,
you will need to depend on 3rd party apis which can provide the Timezone based on Latitude and longitude.
below is on the the example that you can use.
https://api.geoapify.com/v1/geocode/reverse?lat=46.73917926727481&lon=2.3276588684885837&format=json&apiKey=YOUR_API_KEY
I hope this helps...
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....