> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: siteWindow.getCurrentGeolocation() # Method Link: https://dev.wix.com/docs/sdk/frontend-modules/window/get-current-geolocation.md # Method Description: Retrieves the current geolocation of a site visitor. The `getCurrentGeolocation()` method has the following limitations: + On Chrome, the method only works on HTTPS sites. + On Chrome, Firefox, and Safari, the method only works if the site visitor approves a popup. If they don't approve, the promise is rejected. + Run `getCurrentGeolocation()` with a [`setTimeout()`](https://www.w3schools.com/js/js_timing.asp) in case the browser is set to not detect the locale. Adding the timeout lets you handle the unfulfilled promise. # Method Permissions: # Method Permissions Scopes IDs: undefined # Method Code Examples: ## Get the geolocation data ```javascript import { window } from '@wix/site-window'; // ... window.getCurrentGeolocation() .then( (obj) => { let timestamp = obj.timestamp; // 1495027186984 let latitude = obj.coords.latitude; // 32.0971036 let longitude = obj.coords.longitude; // 34.774391099999995 let altitude = obj.coords.altitude; // null let accuracy = obj.coords.accuracy; // 29 let altAccuracy = obj.coords.altitudeAccuracy; // null let heading = obj.coords.heading; // null let speed = obj.coords.speed; // null } ) .catch( (error) => { let errorMsg = error; }); ```