This article provides instructions on how to install and configure Ultimate Member Maps.
Installing & activating
To add the Ultimate Member Maps extension to your site, follow these instructions:
- Purchase and download this plugin from here.
- Install the plugin by uploading it to your site by going to plugins > add new > upload plugin.
- On the upload plugin page click on the “choose file” button and select the pp-maps.zip file from your computer.
- Once the file pp-maps.zip appears on the screen click the “install now” button to install the plugin.
- Wait until “Plugin installed successfully” message appears.
- Activate your licence key by going to Ultimate Member > Settings > Licenses and enter your license key next to Maps License Key.
Adding your first map
When starting with a new site
- Add a field to a UM Form where users can enter their address. Depending on your needs you can use the Map Address field, the country field or any number of custom fields. e.g. Address line 1, Address line 2, City, Zip, Country
- Go to Ultimate Member > Settings > Map and enter the meta_key(s) of the address fields you setup in step 1
- Go to Ultimate Member > Member Directories, click on the directory where you want the map to appear.
- Slide Enable Map to Yes.
- Choose the options you would like, or just use the defaults. See a list of options below. Update the directory.
- Add a user with a valid address
- That’s it! You should now see the user on the map on the directory page.
When you already have members with addresses
- Go to Ultimate Member > Settings > Map and enter the meta_key(s) of the address fields that are in use.
- Click on the Geocode all users in DB button. If you have a lot of users or if your server has short execution limits you can limit the number of users being geocoded in a session.
- Follow steps 3 – 5 in above list.
- Delete the user cache on Ultimate Member > Dashboard under the User Cache block.
- That’s it! There should now be a map with all your users on the directory page
Output a members map on any page (without the directory) using the following shortcode [pp_maps]. The following parameters can be used:
- roles: The slug of the user roles that should be displayed (one or more)
- type: The map type: road, satellite, hybrid or terrain
- icon: A custom icon to be used on the map, if a user role has an icon set in the user role settings that will be used, otherwise the default icon will be used.
- fields: comma separated list of user fields that should be displayed in the info window (using the meta_key). E.g. ‘description’ is the meta_key for the user bio.
- showavatar: 0 to NOT show the user profile pic in info window. Default is to show avatar.
- maxzoom: Set maximum zoom level between 1 and 21 (smaller number allows for less zoom)
- initialzoom: Set initial zoom level between 1 and 21 (smaller number allows for less zoom) or leave blank to fit map to pins
- scroll: 0 to disable mouse scrolling on map
- lat: Latitude to center the map on, e.g. -28. Must be used in conjunction with long
- long: Longitude to center the map on, e.g. 153. Must be used in conjunction with lat
[pp_maps roles=’member, admin’ height=’400′ type=’satellite’ icon=’http://maps.google.com/mapfiles/ms/micons/blue.png’ fields=’description’ showavatar=’1′ maxzoom=’16’ initialzoom=’6′ scroll=’0′ lat=’-28′ long=’153′]
Custom icon per user role
If you have various user roles and want a global map with all users on, you can set a custom icon for each user role. Simply edit the User Roles and enter a URL to an icon under Map Options.
If you enable the map, but it is not displaying it is most likely, because there are no users with an address.
If there are users with addresses make sure that the address is ‘valid’ by checking whether Google Maps can find the address when searching for it on maps.google.com.
On the Maps Settings page, you can also use the bulk geocode function to see if the geocoding has failed or not.
On the Users page, there is a column which shows whether a user has been geocoded or not.
Another way to debug whether it is the geocoding that is not working or the map itself is to add two fields to the user form with the meta keys: geo_latitude and geo_longitude. These fields can be set to be only visible to admin. After editing and updating a user’s profile (with an address) the newly created geo fields should be populated. If it is not populated it could indicate that the geocoding did not work.
If the geocoding worked (i.e. the geo fields have values in them), but the map is still not appearing, there could be a conflict with another plugin or theme. Please check the debug console (F12 on most browsers).
The geo fields can also be used to manually adjust the exact location if google get’s it wrong.
Need support!! Please create a ticket here