CM Map Locations - Add-on - User Location Tracking
Navigating the Locations Index Page
Table of Contents
What is This Add-on
The User Location Tracking Add-on help you show a button that adds your current location. The location is then displayed on a Google Map.
The process is the same with all CreativeMinds WordPress products.
Learn more: CM Map Locations (CMML) - Installation
TIP: Related Settings
Some options related to this feature such as path line, user marker, and tooltip on marker are managed in the User Tracking tab.
Configuring and Using the Add-on
1) Generate REST API Key
If you haven't done so, head to Admin Dashboard → CM Map Locations Pro → Settings.
Then, under the Setup tab and Location REST API section, generate a key.
2) Include Key
Now head to Admin Dashboard → CM Send User Location → CM Send User Location.
Under the General tab, include the key you just generated and the server address attached to it.
Also, choose if you want to include the description field near the button or not.
3) Use Shortcode
With everything configured, it's time to add the button to the site.
It's simple: apply the shortcode
- api - API Key
- server - Server address (server which runs the API key)
- name - Name field default text
- description_enable - Description field, 1 to show or 0 to hide
- description - Description field default text
The shortcode in the Back-End...
... will result in the button in the Front-End...
... And guest users will see the additional (obligatory) field "Name"
TIP: What Are Shortcodes
Shortcodes add dynamic content to your site via a small piece of code.
Learn more: Shortcodes - How To Use
You can change all labels that appear in the Front-End. To do so, head to the Labels tab.
Example of Front-End Labels
The API will only work starting on the following browser versions:
|Minimum version|| 5.0 - 49.0 (http)
How to Enable Geolocation in the Browser?
Each browser has a different process, but the principle is always the same.Learn more: Chrome Chrome Mobile | Firefox | IE/Edge | Safari | Opera
Common Errors and Solutions
|User can't share their location or location is not precise enough||Maybe device has poor or no geotracking capabilities||User should use a device with GPS|
|Error: Server or API key is missing.||Server or API key are missing|| Admin should add information in the plugin's settings
|Error: Geolocation information cannot be obtained.||API was not accessed correctly|| Review API
|Server address not found.||Server address in the settings does not match the API|| Admin should review the server address in the plugin's settings
|User denied the request for Geolocation.||User didn't let browser collect geolocation information|| User should allow browser.
More: Chrome Chrome Mobile | Firefox | IE/Edge | Safari | Opera
|Location information is unavailable.||Likely, the current browser does not support HTML5 Geolocation API|| User should update browser or try a different one
|The request to get user location timed out.||The server is not responding fast enough||Admin should contact the hosting provider|
|An unknown error occurred.||Many possible causes||If it happens repeatedly, contact support|