Composr Supplementary: Setting Up a Map of Your Composr User's Locations

Written by Steve Jarvis, Sponsored by Arvixe hosting

Potentially Outdated Tutorial

This supplementary tutorial might be outdated as it was written for a previous version of Composr CMS (version 10).


Image

Member map

Member map

(Click to enlarge)

Something I have been asked to add on a few occasions for community based forums is a map of the site user's locations. For a larger community this can be a chance to show the variety in locations of their members. Composr has an addon created specifically for this purpose. To add a map of your Users locations there are a few steps to follow:
  1. Go to the Admin Zone
  2. Navigate to the Structure section of the Admin Zone menu
  3. Choose the Addons icon
  4. Scroll down and choose "Import non-bundled addon(s)"
  5. Click Download and choose the Information display category
  6. Choose UserMappr
  7. Scroll down and click the "Import non-bundled addon(s)" button
  8. Click Proceed if none of the files will make any changes to files you have edited yourself

Now your map addon for this is fully installed, I recommend adding your location on your profile so when you add the content block to a page you will be able to see if it is working correctly. To be able to do this you need to know your latitude and longitude coordinates. A simple website to find these is: https://itouchmap.com/latlong.html. Once you have the latitude and longitude go to your profile page on your website and click the edit tab.

Once you are on the account edit screen choose the profile sub-tab at the top of the screen. Scroll down to two new fields which have been added called latitude and longitude. Input your coordinates and click to save.

Image

Longitude and latitude fields

Longitude and latitude fields

(Click to enlarge)

If you are creating a new page on which to display the user map, you will need to create this next, or if you are adding it to an existing page, you need to go to that page and edit it. You can add the information block for this map in exactly the same way you would add any other information block to your website which is by clicking the "add block" icon (if you are using the WYSIWYG editor is on the third line near the right hand side of the icons and looks like a red square).

On the add block screen scroll down until you see the block title called:
"Display's a Google map with user locations marked by markers. ([b][u]main_google_map_users[/u][/b])"

Choose this block and fill in the screen accordingly i.e. title etc. I usually make the map a voluntary feature and untick (uncheck) the Geolocate User option which will locate where users are and add the data to their profile. You can also choose the size of the map which will appear and choose to center the map around the markers which are added. If you choose this latter option the map may look a bit strange where it is centred until you have a few entries.

You can now preview the block or click "Use" and Composr will add it to your page. Click save on the page you are editing and the map should now appear.

Feedback

Please rate this tutorial:

Have a suggestion? Report an issue on the tracker.