CM Map Locations (CMML) - Integration - Expert Directory
Integration with Expert Directory
Table of Contents
API Key is Required
This feature requires an API key from Google. Learn how to generate one:
What is This Feature
CM Map Locations can be integrated with the CM Expert Directory plugin.
This way, you can add a map to the listing of experts.
1) Showing Map
You can display the map by using a shortcode
It has two attributes:
- category - Specify one or more categories by their id or slug
- categoryfilter - Set "1" to allow users to filter categories and "0" to disable it (Default is "1")
[cmloc-expert category="id|slug" categoryfilter="0"]
Latitude and Longitude are Required!
The map will only display items that have latitude and longitude in their address.
You can add them by choosing the precise point on the map. To do so, enable the option Place the marker manually.
Alternatively, you can use services such as Get Lat Long from Address Convert Address to Coordinates to obtain coordinates.
2) Expert Pages With a Map
You can also show a Google map on each listing page.
Choose the default options in Admin Dashboard → CM Expert Directory Pro → Settings → Expert Page tab.
Then configure Show a Google map and Display map (where and how it should be shown).
TIP: Enabling/Disabling on Single Page
While editing an expert page, you can toggle the map on or off for that page alone.
Expert Directory With a Map
You can show a Google map on the expert directory
Navigate to Admin Dashboard → CM Expert Directory Pro → Settings → Expert Directory tab.
- Show CM Locations Map - Shows the map or not.
- Map position - Select the map position on the index page. Choose between:
- Before filters
- Between the filters and results
- After results
Note: this option was introduced in version 1.9.8.
- Show map on page load - Show the map by default or with a button click. Disabling might be recommended if the map takes time to load.
- Shows all experts on map - Show all experts or only the ones shown in the current page.
Then navigate to Admin Dashboard → CM Map Locations Pro → Settings → Index Page.
Find the section Map and configure the following options:
- Enable map - Enable this option to display the map on the Expert Directory page.
- Enable marker clustering - If enabled, multiple markers will be combined as a single when overlapping due to the zoom.
- Enable info window on marker clustering - Shows a tooltip when clicking on a clustered marker, listing each location.
- Marker label type - Choose the label type with the marker's name on the location's map. The options are:
- Show always below the marker
- Show tooltip on mouse hover
- Do not show label
- Clicking on the map marker will - Choose the action when the user click on the marker. The options are:
- Open the location's page - Directs to the expert page
- Redirect to custom URL - Directs to the address in the "URL" field of the location entry.
- Show tooltip with information about location - Displays part of the description without directing the user to another page. This feature has extra settings.
Example on the Front-end: