Google Maps and Buddypress Questions

1. How to display specific Profiles on Map,
- Being able to show profiles based on either their roles or the profile type.
For ex. I want only users who are store owners that has a BP Profile to be able
to appear on the map vs regular users that won't appear on the map.

2. How do I make the BP map full width to the page, I added is_responsive="true" to
[agm_members_map] to get [agm_members_map is_responsive="true"] and nothing
happens. Actually the map itself gets automatically reduced even though it's
on a page that has full width enabled (at least 800px).

3. Can I use font awesome icon for the custom map marker.

4. How do I adjust the users Avatar size on the Map?

5. Where are the in depth tutorial for this and it's usage for each add-ons?

  • Tyler Postle

    Hey Anthony,

    Hope you're doing well today!

    1. How to display specific Profiles on Map,
    - Being able to show profiles based on either their roles or the profile type.
    For ex. I want only users who are store owners that has a BP Profile to be able
    to appear on the map vs regular users that won't appear on the map.

    You could hide the address field to only the store owner user role, that way regular members can't fill it out :slight_smile:

    You could add this to your functions.php to add a new CSS body class for each user role:

    function wpmu_role_body_class( $classes ) {
        global $current_user;
        foreach( $current_user->roles as $role )
            $classes[] = ' role-' . $role;
        return trim( $classes );
    }
    add_filter( 'body_class', 'wpmu_role_body_class' );

    Then you can add something like this:

    .role-subscriber #field-id, .role-editor #field-id, .role-author #field-id, .role-contributor #field-id {
    display: none;
    }

    That way it hides the field for all but your store owner user role :slight_smile:

    2. How do I make the BP map full width to the page, I added is_responsive="true" to
    [agm_members_map] to get [agm_members_map is_responsive="true"] and nothing
    happens. Actually the map itself gets automatically reduced even though it's
    on a page that has full width enabled (at least 800px).

    You can use the width parameter to make it full width on your page :slight_smile:

    like this:

    [agm_members_map width="100%"]

    3. Can I use font awesome icon for the custom map marker.

    Any icons you want to use will have to be uploaded through the custom icons add-on. This is a cool idea though, I'll mark it as a feature request :slight_smile:

    4. How do I adjust the users Avatar size on the Map?

    I'll put in a future request for this as well :slight_smile:

    5. Where are the in depth tutorial for this and it's usage for each add-ons?

    Right now there is just the info you see on the add-ons page inside the plugin or usage page.

    Are there any other add-ons you need further assistance with? More than happy to help!

    Look forward to hearing back.

    All the best,
    Tyler

  • Anthony

    Thank you for your help so far. I also was wondering if there was a way to allow users to search for BP members on the map using their Zip code or and if there was a way to filter the search. See example attached. The first drop down info is pulled from the users profile that states the gender, the second drop down will contain the different type of user or role they play in the community, second is the address they listed. Once they hit submit, they'll be taken to a page that has the filtered results in a form of a list or display it on a Google map page.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.