Blog

How to Generate Map Locations of User or Groups in WordPress

Generate Map Locations of User or Groups with ProfileGrid

If you maintain a membership website where you can generate map locations of user or groups, you get a chance to stand out among your competitors. By displaying map locations of your site users, you get to show your online reach. It will also help your site visitors to check from where most of the users are registering to your site. The map also gives you real-time access to stats of all logged in users.

The WordPress ProfileGrid plugin helps you generate maps showing locations of all registered users on your site. In this article, I will help you generate map locations of user or groups with ProfileGrid.

Activating Geolocation On ProfileGrid

The ProfileGrid plugin offers a few extensions, some are free and some are part of the premium pack. The Geolocation extension comes with the premium pack unlike bbPress and WooCommerce Integration, User Display Name and User Profile Custom Slugs extensions. In order to generate map locations of user or groups, you need to activate the Geolocation extension from the ‘Extensions’ page.

Show Map Locations profile gris extensions

Right after activation, the extension becomes part of the ‘Global Setting’ page. Then, when you click on the ‘Geolocation’ option you land on a page called the ‘Geolocation Setting Page’.

Show Map Locations settings

From here, you can select the expanse of your map whether it should be country-specific or that of the entire world. You can choose the level till which you want to zoom your map. Also, here you get the option to retrieve your Google API Key. By clicking on ‘You can sign up for a key HERE’, you land on a page, similar to the one given below.

Show Map Locations google API

From here, you select ‘Create a Project’ if you don’t have an API key already.  Eventually, Google will provide you with an API key with which you can generate map locations of user or groups.

Show Map Locations google API key

Features of the Geolocation Extension

The extension, apart from adding a Google Map on your site, lets you choose the Group from which you want to show the locations of the users. The location of Group members in an area is aggregated based on zoom in/out for the map. Individual locations of Group members can be seen by zooming in on the map. The extension picks up location data automatically from the group registration form. By clicking on an individual Group member’s location, a popup appears displaying the member’s name, Group name and profile picture.

Placing the Map on a Page

This WordPress User Profile Plugin apart from its array of extensions offers some very useful shortcodes. In fact, it has a whole page dedicated to shortcodes. The Geolocation Map can be displayed on any page. Now, in order to display the map on the frontend, you have to use the shortcode [PM_USERS_MAP].

Show Map Locations map page shortcode

Copy it from the ProfileGrid shortcode page and generate map locations of user or groups in any page of your choice. The shortcodes work like a magic spell in this plugin. One can perform any task in just a few clicks with shortcodes. For example, one can create a WordPress user profile page with just one specific shortcode of the plugin.

We can customize the Shortcode results using parameters. Users can apply the following parameters to control shortcode results: 

1. gid – Used for showing a specific Group(s) members by passing in the group IDs (comma separated)

2. exclude_users – Used for excluding specific users by passing in the user’s IDs (comma separated)

3. relative_time – Used for showing locations of only those members that have registered during a specific time span (today, yesterday, this_week, last_week, this_month, this_year)

4. info_popup – Used for showing or hiding the information popup when a viewer clicks on a member’s location maker

Given below is an example of a shortcode with parameters. We have pasted it on a new ‘Map’ page.

Show Map Locations map page

This will ensure that the locations of all the users from groups 1,2,3 will be shown on the map with an info pop-up.

Show Map Locations on google map

In the above picture, we see the locations of all the users on the Google map with an info pop-up showing their details.

Utility and Consumer Convenience

The utility of being able to generate map locations of user or groups on your site is many. You can show the branches of your company with their area heads on these maps. You can show the far-reaching extent of your staff members who are working from various parts of the world. Also, you can check from which area you are getting users on your site. This way you open up a global platform for your users. You let the users from one part of the world to communicate with others from another far end of the world. However, all this could not have been possible without the powers of the ProfileGrid plugin. It makes it a piece of cake to create a complete membership site. One can perform business from there, convert it into an online store or enlist students or employees of an organization in it.

  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

28 Comments

  1. Shean

    Hi there,
    Is it possible to create a link on the info-popup that directs you to the user’s profile page?
    Thanks.

    1. ProfileGrid

      User name on info popup already directs you to profile page.

      To generate map locations for users and groups refer to following steps:

      1) Install and activate ProfileGrid Extension ‘Geolocation’.
      2) After activating extension, site admin will be able to add address type field in fields for group.
      3) Configure the field options (to be filled by users of that group).

      To display user location, configure the setting for geolocation from “ProfileGrid >> Geolocation Settings” and then use shortcode [PM_USERS_MAP] to show locations of all users.

      1. Shean

        “User name on info popup already directs you to profile page”
        Thanks, wasn’t sure if the name was a link.

        Some users may not want to appear on the map. Is it possible for them to ‘hide’ this in privacy settings?

        Thank you

  2. Sarah Bishop

    I’m having trouble, I have created an address field in my user profile that includes town and country and I have enabled the map on a page using an API key with no group restrictions. None of the user profiles are showing up on the map (I’m using an iPad at the moment, I’m hoping it’s not restricted)

    Also I can’t get the map to focus over the UK I’ve tried United Kingdom, England and London but it says focused over Turkey

    Can you help?

    1. ProfileGrid

      Could you please confirm steps you have followed to generate the Google API key. According to Google’s new policy, you have to pay for using Map API, which otherwise does not have any restriction from ProfileGrid’s side.

      Regarding map focus issue, could you please confirm which version of extension you are using.

      Also for more details on map extension, you can visit the link: https://profilegrid.co/how-show-map-locations-of-all-users-or-specific-user-in-wordpress/

      1. Kris

        Hi’

        Exactly the two same issues :

        • Map is focused over Turkey
        • Noboby displayed on the map

        Thanks for support!

        1. ProfileGrid

          Could you please confirm if you have enabled the Geocoding, Geolocation and Maps JavaScript API in your project APIs.
          These three APIs are mandatory for using map features of GeoLocation extension.

          You may verify the enabled APIs for your project via this link (you will be required to login to your Google account): https://console.developers.google.com/google/maps-apis/api-list

          You may check here for more details about how to enable API in project: https://support.google.com/googleapi/answer/6158841

          If you still face any issue, we highly recommend you to open a ticket on our support portal. We may need screenshot for your API configuration settings for analysis and helping you with a fix.

    2. Pittarelo

      Oi Sara vc conseguiu a solução, estou com o mesmo problema

  3. Sarah

    Hi, what do you do if you have 2 profiles in the same location? You can only see the number and can’t see the profile information.

    1. ProfileGrid

      Map cluster depends on map zoom factor- to cover more area on the map, zoom should be lesser. If you zoom in the map, individual pins on the map will not cluster. Also, if you click on that cluster no., map will zoom in automatically and you will be able to see the individual pins on the map. You can change the zoom level from map settings in ProfileGrid.

      Google map is coordinate based. That means in order to display users separately by clicking on a cluster, details about zip code, the address have to be added.

  4. Rich Voyek

    Can map users, but include to user information? We would like a make of our users, but the spots remain anonymous.

    1. ProfileGrid

      ProfileGrid extension “Geolocation” generate maps displaying locations of all the users or specific groups via simple shortcodes. ProfileGrid gets access to location data from registration form itself.

      On map you can enable user info popup and link its redirect to the user profile page.

      1. Rich

        Do I create a group? What fields do I need to add to the group to get it to map the members of the group?

        1. ProfileGrid

          To show members on map, you need to add “Address” field in group fields. Once you enable the plugin “GeoLocation” , you’ ll see this field in custom fields list. In address field settings you will see other options to enable like Address Line 1, city, country etc..

          Please follow the steps below to add a field to the group:

          1) Login to the WordPress dashboard and go to the ProfileGrid menu
          2) Here you will see the Groups list
          3) Then go to the group Fields for a group
          4) Next you will see the list of fields for that group. You can edit, delete or add fields from here.

  5. Marco

    Hi!
    I need the following features:
    – Search function on the map, by user name, by group name, address / city
    – Display in the results only users belonging to a category
    – Give users the possibility to choose which categories they belong to, from one to all.
    – Display map on one side and user list on the other
    Is it possible to do this with your plugin?
    thanks a lot

    1. ProfileGrid

      Search features for ProfileGrid are planned to be enhanced in future but as of now, the requirements you listed are not available.

  6. Milad Ahadiani

    Dear Sir / Madam,

    Would you please let me know if there is a solution to update live users location’s on map through your kind product features??? or during for example each 4 hour interval per user?

    Thank you in advance
    Milad

    1. ProfileGrid Development Team

      Hello Milad, Sorry, this feature is not available yet.

  7. Solijon Sharipov

    Hi is there a way to have search option where users can be found by zipcode or address ? For instance I registered and put my address in San Francisco and then I would like to find users who nearby of my address?

    1. ProfileGrid

      While this functionality is on our roadmap for future development, it is not available as of now. We will update the information on our site and release notes once we release it.

  8. Fernando Pittarelo

    Boa tarde não esta parecendo todos os usuários em meu mapa

    1. ProfileGrid

      Could you please let us know if the addresses of the missing users on the map are correct or not. Only when a user’s address is correct, that user will display on the map.

      1. Fernando Pittarelo

        ola esta correto sim mas não apareceu no mapa

      2. Fernando Pittarelo

        Deu certo obrigado resolvido

  9. Fanny Verdollin

    Dear support,
    I have several problems,
    The result is that the map is not correctly zoomed and not populated with users of the group.
    First
    After registration, the new member receives a confirmation email “Dear fanny yoga,
    You are now a member of membres verdon Group on Tiers lieu Riez Verdon.
    Kind Regards. ” , but when login, the several error message : FOLLOWING ERROR(S) WERE FOUND: YOUR ACCOUNT HAS NOT BEEN ACTIVATED YET.”
    No user request are listed in User requests section.
    The User has been created in “wp Users list”
    I can also see it in the members section of frofilegrid, I can activate it manually, but login though login page does not work neither.
    Second
    In the user form registration in this new group, I have inserted an adress field for the Map. After registration, there are 2 fields in the User account, and no one has been filled in.
    Third
    The map is not zoomed correctly despite of configuration in map section

    Can you please help ?

    Fanny

    1. ProfileGrid

      As per our comment on your ticket, this issue seems to be related to your site’s local setup and our experts will get back to you with an update soon.

  10. Håkan

    Is it possible to have different information showing up for members on the map depending on the login status of the viewer? Meaning for logged in users show “all the information” while for not logged in users only show eg group or similar? This to provide better privacy for members.

    1. ProfileGrid

      Currently, ProfileGrid displays same information on map for all users. It cannot be customized as per users’ login state. However, we will consider this feature for possible inclusion in one of our future releases.

Leave a Comment to Milad Ahadiani Cancel comment

Your email address will not be published. Required fields are marked *