⚡ End of Year Sale! 10% OFF all paid plans. Use code PG10JAN. Explore Plans

Blog

How to Generate Map Locations of User or Groups in WordPress

Generate Map Locations of User or Groups with ProfileGrid

ProfileGrid let you generate maps showing locations of all registered users on your site. In this article, we will help you generate map locations of user or groups with ProfileGrid.

Activating Geolocation On ProfileGrid

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

Immediately after activation, the extension is added to the ‘Global Settings’ page. By clicking on the ‘Geolocation’ option, you’ll be taken to the ‘Geolocation Settings’ page.

Show Map Locations settings

From this section, you can choose the scope of your map, whether it’s focused on a specific country or covers the entire world. You can also adjust the zoom level of your map. Additionally, you have the option to retrieve your Google API Key. By clicking on ‘Sign up for a key HERE,’ you’ll be directed to a page similar to the one shown below.

Show Map Locations google API

If you don’t already have an API key, select ‘Create a Project.’ Google will then provide you with an API key that you can use to generate map locations for users or groups.

Show Map Locations google API key

Features of the Geolocation Extension

This extension will add a Google Map to your site, allowing you to display the locations of users from a selected ProfileGrid Group. The map automatically groups members’ locations based on the zoom level—zooming in will reveal individual members’ locations. The extension pulls location data directly from the group registration form. When you click on a member’s location, a popup will show their 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].

The shortcode of the user map is [profilegrid_map], along with attributes [profilegrid_map gid=”2,3″ ex_uid=”4,5″ time=”this_month” info=”show”]. You can find more information about this shortcode in User Map section of the ProfileGrid Shortcodes List

Apply the following parameters to control shortcode results: 

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

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

3. relative_time – Display 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 – Display or hide the information popup when a viewer clicks on a member’s location maker

Let’s try out [profilegrid_map gid=”1, 2,3″ info=”show”].

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

Summary

In conclusion, integrating the ProfileGrid extension to showcase user maps and geolocations enhances the functionality and user experience of your WordPress site. With easy setup, this extension provides an interactive way to display member locations. Whether you’re managing a community, team, or any group-based site, the ability to visually map your members’ locations adds significant value, offering both convenience and engagement for your users. Try out this feature to showcase real-time geolocation data and let us know how it goes

34 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.

  11. Meghan

    Can different groups be displayed as different color icons on the map?

    1. ProfileGrid Editorial Team

      The groups show up in same colour on the map as of now.

  12. Michael

    Why my map only shows when i preview the page. If we go to the page or create a ink to go to the page, the page shows but no map. Can someone hep???

    1. ProfileGrid Editorial Team

      Please write us here, so we can help you with a solution.

  13. Damian Jay

    HI, I have a very strange issue.
    We have a user group with all users displayed on the map correctly except one member.
    We have the correct API key in place, the user who isn’t showing on the map does have their address entered correctly when signing up.

    This member was on the map a few weeks ago, but now does not show up at all.

    Any help on troubleshooting this would be appreciated – Thank you

    1. ProfileGrid

      Please raise a ticket at our support portal here in order to allow us to assist you.

Leave a Comment

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