Demo

Demo 12 - Show Current Location

Scenario:  Prepare a Map to View Your Customer's Location and Your Current Location

This scenario involves displaying all customer details and their respective locations on a map and showing your current location marker. This allows you to see where you are on the map and identify which customer location is nearest to you so that you can efficiently provide services or deliver products based on your needs. 

List customer service details in a Google Sheet as shown below

Map My Sheet - Demo Spreadsheet

Let's start to  configure the map settings

Step 1:

Step 2:

Step 3:


Step 4:

Step 5:

View Map 

***IMPORTANT NOTE*** 

If you are not able to see Google Map below, Login to Google, reload the screen, and accept permissions (if prompted)

You can share the URL to others. However, please note that the Google Sheet also must be shared for them to load data for rendering into Google Map.

How the Current Location Appears on the Map

Below is the screenshot showing the current location. Once the location is detected, the blue dot marker will appear, indicating the position. It will automatically open the info window and display the current address.

Live Demo to Detect Your Current Location

Below, we’ve provided a "View Map" button. Once you click it, a new tab will open with the map that will detect your current location. Upon loading the map, you will be prompted to grant permission to access your location. If you allow it, you’ll be able to see your current position on the map.

Note: If you attempt to embed the map to get the user's current location, it may not work due to security reasons.

What to Expect When Your Location is Detected:

If the location is successfully retrieved, the map will display a blue dot marker indicating your position. In case of any issues while retrieving the location, the following error messages will be shown:

Unknown Error: Unexpected error retrieving location. Please try again.

Permission Denied: Location access is disabled. Enable it in your browser or device settings and try again.

Location Unavailable: Unable to determine your location. Check your network or device settings and try again.

Timeout: Location request timed out. Check your network or refresh the map and try again.

In the generic issue sometimes, "Unable to determine your location accurately. Please ensure GPS is enabled or try again." Learn More

Location Detection from Various Devices:

Location detection is a feature that allows websites or apps to determine a user’s geographical location based on their device's capabilities. The detection process varies slightly between desktop and mobile devices due to different technologies used for acquiring location data.

1. Location Detection on Computers (Desktops and Laptops) 

On computers, location detection is generally powered by:

For computers, browsers use the Geolocation API to access the device’s location. Users must grant permission for the website to access their location.

2. Location Detection on Mobile Devices (Smartphones and Tablets)

Mobile devices provide more accurate location detection through:

The Geolocation API is also used on mobile devices, and it typically provides a higher level of accuracy compared to computers due to the built-in GPS.

Hope you enjoyed the demo. Contact Us if you have any questions.