Exciting News! Flipper Code is now WePlugins! Same commitment to excellence, brand new identity.

Display user’s location on Google Maps

Sandeep Kumar Mishra
Sandeep Kumar Mishra
September 14, 2024
5 minutes read

With this User Locations On Google Maps extension, you can display WordPress User’s current locations on Google Maps beautifully. All the user information displayed in Infowindow and listing are dynamic and can be managed with the help of placeholders from the backend.

Please make sure you have installed the WP MAPS PRO plugin on your website. In case you have not installed it yet. Please download these plugins and configure them first. Here are the following steps to install the WP MAPS PRO plugin.

Process to configure User Location on maps:

  1. Step 1: Please navigate to Add or Edit Map, now scroll down to the User Locations on Google Maps ( Add-On Settings ) section, and open this section.
    • Please enable the Enable Addon option to use the user’s current location.
    • The second option is Select Role’s to Display, from here select the user role that you want to display on the map.
    • The third option is Ask Location After Days, here enter the number of days to ask logged-in user location.
    enable-user-locations-on-maps-pro
    • In the same section, you can also manage the Infowindow Message for Users. You can use the user placeholder to display the user information.
    infowinddow-message-for-users
  2. Step 2: After this small process, please click on the Save Map button.
  3. Step 3: Now login as the selected role user, Navigate to the map page you can see on the page load a location permission popup is displaying, click on the allow button now your current location is displaying on the map. This allow button displays the user’s current location on the map and also updates the logged in user’s address in the database. Once the user click on the allow button and then goes to his/her profile page in the WordPress backend profile page, user will see the updated address.

    If the SSL layer is not enabled on your site then this Allow Location Access popup will not display on your site map page.

    user-location-permission-in-mapspro

    The site Administrator has also added/updated the user location from the edit user page(backend), please navigate to Users->All Users and edit any user. At last, you can see an Address field. The Google autosuggest is enabled for this address field.
    edit-user-current-location
  4. Step 4: To assign the user role category, please navigate the users->Assign role Category. You can see your all roles here. You can assign the category to the specific role so different role user icons will be different.
    assign-role-category

    To assign a category, hover over any user role and click the edit icon that appears. You’ll then see a list of categories, where you can associate any category with the selected role. The marker icon for users with that role will reflect the category you choose.
    assign-category-to-role

You can see the user’s locations on Google Maps.

user-location-on-google-maps-maps-pro

To view a demo please click here.

Explore the latest in WordPress

Trying to stay on top of it all? Get the best tools, resources and inspiration sent to your inbox every Wednesday.