Using Google Maps plug in to show all Buddy Press members

I would like to use the Google Maps plug in to show all my buddypress members based on their City/State/Country. Members input this info during registration, so it would need to pass that info to the plug in. Anyone have an idea how to set that up? It would be one main map.

I found another plug in called “BP Members Avatar Map” but it requires the user to input their latitude and longitude I believe, which is a little cumbersome.

Thanks in advance!

  • aecnu
    • WP Unicorn

    Greetings tfullen,

    Thank you for this great question!

    To the best of my knowledge using the Google Maps plugin you will in the end need to mash maps to get a complete single map of your users which in my opinion will be more cumbersome then entering a longitude and latitude.

    Of course it is your call but here is an easy longitude and latitude finder for you too:

    http://itouchmap.com/latlong.html

    Please advise.

    Cheers, Joe

  • tfullen
    • Flash Drive

    Thanks Joe. Does the google maps plug in work for a user’s profile in buddypress or only when they post?

    So you’re saying I will have to manually insert every user’s longitude and latitude? There’s not a plug in or better method that automatically changes the address into coordinates and places a marker on the map?

    I appreciate your help and quick response!

    Tony

  • aecnu
    • WP Unicorn

    Greetings Tony,

    Thank you for the additional information and input, it is appreciated.

    Does the google maps plug in work for a user’s profile in buddypress or only when they post?

    I had to look this up because I did not know and it appears that it was not intended to work for the profile nor do I see an option for it to in the user profile area.

    For posts of course that is a whole different story.

    So you’re saying I will have to manually insert every user’s longitude and latitude?

    With using the Google Map plugin mashing feature yes. But since I figured out you were concentrating on user profiles here that has become no longer relevant in my opinion.

    There’s not a plug in or better method that automatically changes the address into coordinates and places a marker on the map?

    Not that I am aware of, have you managed to find anything suitable for this purpose in this last week by any chance?

    Please advise.

    Cheers, Joe

  • Jason
    • The Incredible Code Injector

    I’m pretty sure he’s talking about the Google map that appears on the member’s page in buddypress like here http://poteau.me/members (My website)

    That’s interesting, but I think it is using the query on that page, so it may not show every member, just the ones on that page.

    I’ve messed with this so little, so I really don’t know, but I did find it interesting and I was going to explore it further.

    I’ll play with it over the next week and see what It does..

  • gollumxcore
    • Design Lord, Child of Thor

    what Jason has on his website is much like what I need…i’d prefer it to show everyone though, not just those on that page…that way people have a way of “searching” for users in a specific location simply by moving around on a map.

    this brings up another issue that could potentially be at hand with this idea though…if people are simply just putting in a city and state (ex: Los Angeles, CA) and there are 100 people in Los Angeles, CA…wouldn’t every map marker be in the exact same spot on the map? I feel like they would overlay each other.

    Is there a way to just have the user “share location” at signup or something? that way it grabs their exact coordinates and adds that to their profile and the map…

  • aecnu
    • WP Unicorn

    Greetings Everyone,

    Thank you for all the great input here, it is certainly interesting and intriguing.

    Though I am more then willing to help where I can, I find it totally unacceptable to give locations of people in any demographic unless it is a dating site or the like. Otherwise for the most part it is irrelevant.

    I find it to be a blatant invasion of privacy and making it simple as pie for big brother or any other interested party to target a certain group.

    But that is my personal belief and opinion and where I am physically at for the most part is absolutely none of your business. If I want you to know I will tell you.

    Imagine how important this is considering history and facilitating the targeting of certain groups. History shows this is a very bad idea for those groups.

    However with all that said, it does not stop me from trying to help accomplish what the member desires to do, but I would certainly not participate in a site doing this.

    Cheers, Joe

  • Jason
    • The Incredible Code Injector

    @joe

    Thank you for you opinions on privacy, but in my case it is NOT where those people live, they register businesses that WANT to be found. It’s actually their intention to be found as they run businesses in the REAL WORLD, not just virtually.

    I don’t trust any business that won’t provide a physical address, because I believe those who do have something to hide.

    Now as far as where I live and posting it publicly, that’s a different matter. But putting a face to a business and a location builds interaction from visitors and interest in the community.

    If you ran a larger community, you could just ask for a zip code or city name and it would be a map of cities your community has presence in.

    I’m sure everyone here agrees with you that no one likes information disclosed intentionally, however there are applications where this is just merely “acceptable” but desirable.

    Furthermore, this is functionality advertised in the WPMU DEV plugin. There it nothing third party or modified to produce the map on my page. It’s a built in option of the awesome Google Maps plugin right here on wpmudev.

  • Jan Bosman
    • New Recruit

    @jason

    Having over 300 active members on my Buddypress site, the query seems only to pull from the members listed on the current directory page. On the first page I viewed, only one member had entered a Location for their member profile, so only one icon showed up on the map.

    Also, on a separate page, I tried to implement the [agm_all_profiles_map] shortcode, and for some reason only 5 members were output on the map. Lame.

    There MUST be some way to work around this – I have been trying to pull something like this off for over a year, but with NO plugins that are able to list all members on a single map (and my limited coding knowledge), this hasn’t been possible. I’m more than willing to pay someone who can figure this out.

  • aecnu
    • WP Unicorn

    Greetings Jason,

    Thank you for the great post and clarification in your post:

    https://premium.wpmudev.org/forums/topic/using-google-maps-plug-in-to-show-all-buddy-press-members#post-251032

    Indeed I understand what you are trying to point out and further agree that they want to be found but of course for those unscrupulous the address can be easily fudged.

    Some obscure building or even prominent building, suite “G”

    Hopefully we will hear from you soon regarding Giovanni’s plugin name request.

    Cheers, Joe

  • mansoormb
    • Design Lord, Child of Thor

    Why don’t you add another MySQL database value holding the users profile page and access html5 geolocator? Save the data in the table then create a specific query to match the user to the location and attach to the google maps API to populate the map and drop the pin?

    Or even create it as an additional option like a widget use Get current User function to get information of the current user and geolocator coordinates store in a separate db and use that to populate the map

    Sorry I’d write more clear instructions but I’m on my iPad :slight_smile: I hope this gives you an idea

  • Jason
    • The Incredible Code Injector

    The WPMUDEV Google Maps Plugin has a buddypress addon. Look at the bottom of the settings page for “Google Maps” under settings menu in the wp-admin.

    This plugin features various “Add ons” and I activated the BuddyPress Profile Maps addon.

    I’ve activated the Buddypress Members location add on and the Responsive Maps addon.

    Joe, it strikes me as odd that you disagree with the functionality provided by WPMUDev’s plugins.

    Are you also against the idea of Google’s Places? It’s basically the same thing.

  • aecnu
    • WP Unicorn

    Greetings Jason,

    Thank you and check it out below.

    Joe, it strikes me as odd that you disagree with the functionality provided by WPMUDev’s plugins.

    No sir it is not that I disagree when I have the complete picture – it is you brought functionality to my attention that I was not aware of and I admit it is a tough job keeping track of 130+ plugins and the updates therein – you got me on this one and my bad, I am sorry for that Jason and you are completely correct.

    I also admit it has some add ons I never seen before so on this one I totally let us down and thankful that you pointed out the add ons section kindly reminding me.

    Maybe it is brain melt or the need for a bit of play on Star Craft 2 … lol

    Are you also against the idea of Google’s Places?

    I am against anything Google except the traffic they send me :wink:

    With that said I have lost where we are within this ticket … lol

    Jason would you be so kind as to remind me what the mission is here in this particular ticket? What we want to accomplish or issue to resolve?

    No sarcasm, I have indeed lost the jist of this ticket.

    Please advise.

    Cheers, Joe

  • Jason
    • The Incredible Code Injector

    Thanks Joe,

    Well, while this topic has run a little long in the tooth, (6 months!)

    I think the short version is how could the OP append a selection box under the BuddyPress Member’s map, (the built in addon to the wpmu google map plugin) in order to show only members in a given area. The selection lists, or dropdown boxes, would be populated via custom profile fields, (CPF) which is a feature built into Buddypress (It’s truely fantastic, and very underused. honest)

    Thanks for the acknowledgment Joe, I know you can’t know what’s up in the depths of 130+ WPMU dev plugins, and thanks for being humble about it. A refreshingly candid response is always appreaceated.

    I’ve now used the map+buddypress addon on two sites. It’s not easy to set up, but if you are familiar with BP than it’s a lot simpler. No code has to be touched.

    However, I’ve found a bug with APC and the google maps + buddypress addon.

    It’s the same bug in my Appointments+ + APC bug, and no one has figured it out yet. It’s a rare bug where the options don’t get saved but all in all, that’s the life when dealing with caching plugins.

    Thanks again Joe :wink:

  • aecnu
    • WP Unicorn

    Greetings Jason,

    At this point in this ticket and considering the anomalies you mentioned in the above post, I think it is high time we ask the lead developer for comment on what the heck is going on here but this will be tricky since you have reported issues with two different plugins which are by two different developers/coders. i.e. Appointments +

    With that said and acknowledged I will see if I can get the lead developer of the Google Maps plugin in here with his invaluable insight into this plugin for his advice/advise for us.

    Though this may take a bit longer then a normal ticket, I will try to get him in here asap.

    Cheers, Joe

  • Jason
    • The Incredible Code Injector

    On second thought, don’t worry too much about the caching issue. I’m switching to memcached and the issue is more likely in the object-cache.php for apc. As the other developer noted, it works with the w3tc-object-cache, but not the stand alone version.

    The w3tc object cache sacrifices complete caching for broad compability with single sites only. In multisite mode the object cache from w3tc only caches the first site, which isn’t nearly as helpful. Hopefully memcache will treat me much better.

  • aecnu
    • WP Unicorn

    Greetings Jason,

    Thank you for that additional input and thought provoking points to ponder, they are greatly appreciated as always.

    Let us know how it goes with memcache which is an intriguing possibility.

    The last time I tested w3tc not only did it slow the sites down, but it would not address memcache correctly and therefore knowing it slowed things down on my servers as it was, possibly they fixed it for the latest version and just did not fix the security issues.

    Have a GREAT weekend!

    Cheers, Joe

  • Jason
    • The Incredible Code Injector

    Yeah I am NOT a fan of w3tc however, I can not see how it would slow your site down unless it was not configured. The problem I have with it is that it has every possible caching solution you would want in one plugin, and half of what it does do, wont work with the other half of what it does.

    W3tc was recommended by the appointments+ developer here on wpmudev.

    I was using the apc object cache drop in. Not by the w3tc plugin.

    Now Im looking to switch to the memcached drop in.

    Just trying to clairify. What caching do you use joe?

  • aecnu
    • WP Unicorn

    Greetings Jason,

    Thank you for the great question and after spending days testing W3TC, and of course configuring it different ways, anywhere it touched the disk the performance was drastically affected in a negative way – in some cases double the time. Memcache may indeed help though I could not get it to configure correctly or more accurately integrate with the latest version of memcache in a 64 bit CentOS enviroment – memcached was not a problem at all to compile and get running correctly – at the time it was the W3TC option that went all funky.

    I currently do not use any cache on our servers and recommend that clients do not use cache and to date things are flying right along.

    So the only possibilities are really memcached in which I would have certainly like to have bench marked it to see if there was an improvement in integration i.e. I have not tested with the current version with the security fix but the version that was immediately before.

    I do not know if there is a fix for anything else in the very last version other then the security issue.

    Cheers, Joe

  • Jason
    • The Incredible Code Injector

    Actually, I’m shocked to hear that performance was lower after enabling disk based caching.

    WordPress is made to have a cache installed (http://codex.wordpress.org/WordPress_Optimization)

    Literally, there’s caching hooks built into wordpress, but they need a plugin to use them.

    Disk based caching just builds a copy of the fully rendered page, and the web server, which skips the php processing and database calls.

    If it’s slower, then it must be building the file everytime.

    As with all caching plugins and wordpress, it REQUIRES files to exist outside of the wp-content/plugins folder, and REQUIRES new Define statements in the wp-config.

    For a caching plugin to make your website slower, means something was done really wrong, when it’s whole point is the opposite.

    Mashable.com used W3TC for a long time, serving Million’s of pageviews a day from a single server. Large sites like Mashable could not function without a caching plugin.

  • aecnu
    • WP Unicorn

    Greetings Jason,

    Thank you as always for your valuable input and perspective, it is absolutely appreciated.

    From the codex you sent me it references:

    Presentation at WordCamp 2007 on HyperDB and High Performance WordPress

    At this time in the world Dual Cores were just coming onto the common market and then this may indeed be true but also I am sure they did not calculate the upcoming quad cores and twelve cores of today and 6gbps hard drives and more.

    It was relatively light years ago.

    If one thinks about it, unless the processor is of low caliber, how could disk read and writes be faster then processor and memory speeds – even with the 6gbps it cannot compete with the power of 8 cores and lots of RAM that is faster then it ever has been.

    Originally cache was recommended due to the power it took to process PHP scripts like WordPress relieving the processor of extra load once cached.

    In today’s servers the 8 cores (Dual Quad Core Xeons for example) give crushing power at light speeds and memory speeds are almost as fast – but disk speeds are dog slow.

    The graphic in the following article illustrates the speeds and flow of data:

    http://webhostingvirtualdedicatedservers.com/days-testing-caching-work-fast-properly-configured-servers/

    Of course the slowest is the Hard Disk Drive.

    Disk based caching just builds a copy of the fully rendered page, and the web server, which skips the php processing and database calls.

    Today’s processors, memory speeds and power negate the drain on a server and flash past the disk based reading and writing – even if it were pre-made because now rather then 8 cores pounding and slamming it through lets say 16 GB 1333mhz RAM – no disk drive can keep up with it – not even SSD due to bus speeds are not any faster and the bottle neck is there on the I/O.

    In disk based caching as with most others things, you are only as fast as your slowest moving part – in this case and in today’s age it is the disk itself that is indeed the slowest moving part.

    Mashable.com used W3TC for a long time, serving Million’s of pageviews a day from a single server. Large sites like Mashable could not function without a caching plugin.

    You said it best – for a long time – as in a long time ago in technology aging.

    Cheers, Joe

  • Jason
    • The Incredible Code Injector

    Joe, I think you missed something very crucial here, allow me to “Break it down”

    The php file sites on the HDD.

    The procompiled file to be served sites on the HDD.

    When the php file is called, it’s ran through php, then to the webserver.

    When the static file is called, it just goes through the webserver.

    Let’s say you have a site with many pages, like wikipedia, or urban dictonary.

    ^^ Too many pages to fit in ram. ^^

    Disk based caching makes sense is some cases.

    APC, for example, caches php in memory. Thus avoiding the php reading the scripts from disk. APC is caching, and not disk based, but allows you to use more of that ram.

    If you have a small business website, with less than 100 pageviews a day, it’s not really a concern, but for those who like to be prepared for the event their site gets hammered with traffic, and yet don’t need a dedicated server, caching is a nobrainer.

    How many websites do you host on a single server? Having a bunch of websites on a single server is no different than having a large site like and then caching becomes more important again.

    Joe, where is the breaking point when you tell a customer, they need a bigger server?

  • aecnu
    • WP Unicorn

    Greetings Jason,

    Thank you for the additional great input and I truly appreciate it.

    You bring up some good points about caching but for the most part you/we have been referring to software based caching, not hardware caching, when in fact I do employ caching hardware wise to include disk caching, read ahead caching, X cache, and hardware or operating system based caching – but none of the software stuff or plugins.

    You had mentioned about caching php but what about when it is already cached via hardware, then when other types of caching are involved things similar to when running two firewalls or two anti virus programs start to happen and in most cases then neither perform well.

    How many websites do you host on a single server?

    I honestly do not know because they belong to clients but 11 VPS’s. I never looked it up before but I will now.

    The very first and oldest server indicates 44 total sites and the next inline indicates 58 total sites.

    Joe, where is the breaking point when you tell a customer, they need a bigger server?

    It actually has not happened in all these years – they indeed upgrade for space or bandwidth but totally on their own.

    I guess that by limiting the VPS’s and making sure resource allocations are not over sold keeps things hopping just great.

    Before telling someone they need a different server I would first investigate why they are using up resources and try to mitigate the resource issue in any of several different ways.

    In the last year I have only had one site with a runaway plugin (just last week) opening hundreds of MySQL threads and I suspended the site and the owner and I worked on figuring out which non WPMU DEV plugin was causing the issue – case solved but never told them to upgrade or anything of that nature – spent a bit of time figuring out what the root of the issue was.

    Cheers, Joe

  • Griphon Marketing
    • Flash Drive

    I have written the basic code for a map just like this for a business coupon site. I will pull it out of my archive and post a link to it in a few days. I’ll mod it as a simple plugin with a single short-code to create the map of all members your looking for. Google has an API that you pass the address through to get the long,lat of any given address. That simple API could also be used to convert addressees. I’ll post here when I have the zip ready for you.

  • nathardwick
    • Flash Drive

    Hi – this is a question for Jason (as he looks like he knows what he’s doing here) – which query/shortcode did you use in your members directory template to get the map to display? I’m struggling to get it to work… I’ve got a postcode field which I’d like to use as the address field for markers but not sure how to set up the plugin – I’ve activated the Buddypress add-on but don’t know what to do next as there’s no documentation anywhere… :slight_frown:

  • aecnu
    • WP Unicorn

    Greetings nathardwick,

    No doubt about it @jason is great to work with, wish he was around more so I could give him some more points :wink: and I admit I have personally had many intellectual/thought provoking debates with him and he is a pleasure to have him as part of the WPMU DEV Community to say the least.

    I have indeed flagged him for his input as you have requested :slight_smile:

    Cheers, Joe

  • Jason
    • The Incredible Code Injector

    Thanks Joe,

    Hi Nathan!

    It wasn’t a shortcode, in the addons section of the network settings there is an addon you can turn on or off called something like “Buddy press members directory”. Turn that on. Again I hat is located in the network admin for google maps.

    Then go back to the network admin – google maps settings and there should be new options for it.

    Im on my phone or I would post screenshots. Maybe ill do that later. Good thing wpmudev is responsive!

  • aecnu
    • WP Unicorn

    Greetings nathardwick,

    It appears this particular topic is now resolved/closed, if you need any further assistance please let us know.

    If it wasn’t resolved, or you have any more questions related to this thread, please feel free to post them below including any new symptoms or errors and tick the ‘Mark as Not Resolved (re-open)’ box below the post area (or else we’ll miss it!)

    Thank you for being a WPMU Dev Community Member!

    Cheers, Joe

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.