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
Let's start to configure the map settings
Step 1:
Name the map as required.
Select the required sheet tab.
Select the required map type.
Select the required zoom level.
Switch on Clustering if required.(Clustering combines a group of markers into one marker with the count as a label)
Switch on Refresh automatically if required.
Step 2:
Choose type of location as "Address" and Choose the "Address" field from the Google Sheet.
To Map your Data Longitude and latitude is Mandatory.
if you already have longitude and latitude then just select the header wherever it is necessary.
else click on button which has plus(+) symbol to add latitude and longitude in your Google sheet.
Step 3:
Select the Filter is required.
Select the required column from the sheet.
Select the required type.
Click Add Filter to add more filters.
Change the order of the filter as required.
Step 4:
Select the required marker color.
Select the required animation.
Click Add Marker to add more markers.
Select the required Label. (A marker label is a letter or number that appears inside a marker.)
The Show Same Location Marker switch will come by default switched off.
The Show Current Location option comes by default unchecked.
Enable this option to display your current location on the map in real-time. This feature helps you quickly identify your position and determine which customer location is nearest. By knowing your proximity to customers, you can efficiently provide services or deliver products based on your needs.
Step 5:
Configure the info window.
So that when the users click or hover on the marker the information will be displayed.
Click the "+" symbol to add more to the info window.
Change the order of the Info window as required.
Click on Save to save the Map.
Click View Map to view the map.
Click on Publish Map to publish the map.
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:
IP Address: The system can approximate location based on the user's IP address.
Wi-Fi Networks: When available, Wi-Fi networks can provide more precise location data, especially in urban environments with a dense number of Wi-Fi hotspots.
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:
GPS: Smartphones and tablets use GPS for highly accurate location tracking.
Cell Towers: Mobile carriers also use cell tower triangulation to help determine location when GPS is not available.
Wi-Fi and Bluetooth: In addition to GPS, mobile devices use nearby Wi-Fi networks and Bluetooth signals for more precise location detection.
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.