1. Home
  2. Knowledge Base
  3. Map customization
  4. Show location on the map with GPS tracking

Show location on the map with GPS tracking

The “Show My Location” feature allows users to visualize their current position on an interactive map through GPS tracking.

To activate the “Show My Location” function, users should click or tap the “current location” button on the map interface. You can customize the style of the button with custom CSS.

show-my-location-map-button

Upon activation, the map automatically centers itself on the user’s current location, represented by an animated dot for easy identification.

For mobile device users, this feature includes real-time location monitoring, ensuring that any changes in the user’s location are immediately reflected on the map. This keeps the animated location dot centered, providing an up-to-date representation of the user’s position on the map.

How to Enable “Show My Location”?

To enable the “Show My Location” option, follow these steps:

1. Navigate to Settings.
2. Select “Basemap” followed by “Navigation”.
3. Activate the “Show My Location” feature.

You can set the zoom level that the map adopts when “Show My Location” is activated. The optimal zoom level value depends on your use case:

  • For detailed navigation, such as during an event map exploration or while following a walking tour, a higher zoom level ranging from 17 to 22 is recommended. This setting allows users to see details surrounding their location on the map.
  • On the other hand, for broader geographical overviews, such as viewing resources spread across a large area like a state or country, a lower zoom level between 5 to 10 is recommended. This enables users to gain a comprehensive view of resources near their location.

The default zoom setting is established at 17.5, providing a balanced view suitable for a variety of use cases.

show-my-location-map-settings

“Show My Location” with Embedded Maps

If you embed the map, you must include in the embed code the tag to allow for geolocation. This tag is included by default in our embed code:  allow=”geolocation

Auto-Start “Show My Location”

You can choose to automatically start the “Show My Location” when the map loads by adding at the end of the map URL:
?autoLocateOnStart=1

The map URL will look like this: https://viewer.mapme.com/afca54cf-723c-4cc5-9c51-81d5c81c8e81?autoLocateOnStart=1

For example, you can create a QR code for an interactive guided tour that will automatically open the map centered on the user’s current location. Simply add the string mentioned above to the URL when generating the QR code.

Related Articles

Start free trial

v

Need Help?

Chat or use Contact Form

Getting Started

Watch the 2-min-tutorial

What's New