News:

Wondering if this will always be free?  See why free is better.

Main Menu

Google Member Map

Started by Spuds, December 12, 2007, 01:49:12 PM

Previous topic - Next topic

2Ntense

#480
Does clicking on a pin take you to a member's profile?

Not directly... it pops up a standard little GoogleMap 'info balloon' with the member's name, custom title, avatar and contact links (AOL, ICQ, e-mail, etc).  If you click on the ONLINE/OFFLINE/BUDDY icon within that info balloon, it will open the PM window to send that member a message.  If you click on the member's NAME within the info balloon, THEN it takes you to their profile.  The contact links (which includes their website link) take you to the same functions you see in the profile page.

Here's the balloon:



Can I center the map on the UK and prevent it from being moved elsewhere?

The center and zoom are settings in the Admin panel (you haven't read the thread, I see.  ;D )  The first post in this thread with the announcement has the Admin panel settings, which include Lat, Lon and initial zoom.  For the zoom, bigger numbers are more zoomed in, range = 1 (world) to 20 (your neighborhood).  You'd want a zoom of around 6 or 7 for the UK.  You can actually zoom to 0, but it's useless and annoying.

This is just the INITIAL display every time the map is opened.  If you want to lock it so that they can't move it, there's some variables you can add to the "create the map" part of GoogleMap.php to freeze it in place by disabling dragging.  Look back earlier in this thread (SEARCH is your friend!) for my 'privacy' variation.   You can limit the zoom range and map dragging, but you're on your own for the change.  My changes were to the profile, but they're easily applicable to the main Member Map as well if you choose.  I *think* I've seen someone's example code on the GoogleMap API forums where they only allowed dragging within a set of lat/lon boundaries, but that's beyond the current scope of released code.

edit: here's Mike's example of limiting the dragging range to ONLY within the UK
http://econym.googlepages.com/example_range.htm
and a slightly smoother variation for Deutschland here:
http://www.ios-solutions.de/files/google_api_restricted_bounds.html


Can I set permissions so that only a certain membergroup can enter their position on the map?

It's in the PERMISSIONS after it's installed.  You can deny PLACE A PIN independently of VIEW THE MEMBER MAP.  Note however that the actual map itself doesn't validate the VIEW permissions, so if they know the link to the map they can still view it.  All the VIEW permission does is remove the MAP button from the forum's menu bar.


Can the pin show the user's name or any other info when hovered over or anything, or can it only be a pin on the map?

I'm not exactly sure what you're asking about.  Hovering doesn't do much with GoogleMaps APIs unless you're using ToolTips (which I find distracting).  If there's a link on the map (the markers used here link in the HTML balloon), the HAND changes to a POINTER, but that's about it.  You have to CLICK to do anything.  Maybe I answered this in full above already...

If you want to ELIMINATE the info bubble, then the source code is open to play with... go to town!  That's buried inside the MapsXML() function in GoogleMap.php.  *I* certainly don't want to remove that feature, nor do I want to add Yet Another Freakin' Option to the Admin panel.  :P  You can go inside of the XML processing and add or remove any information that you want... it's eventually just rendered as a tiny chunk of HTML in the balloon.

You might be able to eliminate the info bubble merely by removing the ', html' part of these lines in GoogleMap.php (4 places):
var marker = createMarker(point, icon, label, html)
but I haven't tried it.... that's just a Scientific Wild-Ars3d Guess.  Again, it's nothing anyone has asked for yet, and any outside modifications to add/remove features aren't supported so you're on your own but we'll offer suggestions and such.

Check out the two GoogleMap threads on Brian's site.  There's some other variations there that I didn't want to mention here; they'd just confuse the gentle readers even more.  I haven't been able to log into his site since he updated it, but there's some handy info in those two or three threads for doing oddball or custom stuff.  One of 'em links back to my modification posts in this huge thread.
http://www.gamerzgarage.com/index.php/board,23.0.html for the separate threads.

If you have ANYONE in your group that has some basic skills with JavaScript and maybe a little PHP programming, you can modify the Member Map to do anything you want it to.  Most likely the kinds of things you're talking about above are primarily little snippets of JavaScript and a few of the stock GoogleMaps API variables that we aren't currently using.  There's truly a staggering number of different functions that you can play with, if the default function doesn't satisfy you.  That's why I love open-source code... you're allowed to play.

DistantJ

Perfect. Thank you for all the answers! This is pretty much exactly what I need. I can easily view the map as well? Can I show it on a PHP page which isn't part of the forum?

I'm not bad with PHP but Google Maps have a lot of code and I don't want to break anything. XD

2Ntense

#482
Quote from: DistantJ on July 27, 2008, 05:21:34 AM
Perfect. Thank you for all the answers! This is pretty much exactly what I need. I can easily view the map as well? Can I show it on a PHP page which isn't part of the forum?

I'm not bad with PHP but Google Maps have a lot of code and I don't want to break anything. XD

Save early, save often (gaming quote from the '70s)  ;D  Feel free to break anything you want, just keep copies of the originals around so you can un-break it again.

The main map is fully contained within 2 files: GoogleMap.php and GoogleMap.template.php  The template just handles the page formatting BUT it has the DIV that actually creates the map <div id="map"... as well as the DIV for the sidebar <div id="sidebar"... and a bit of other stuff.  To create your own stand-alone page with the map, you'd probably need to have a portal/bridge that handles the link to the forum, 'cos if you try to invoke it from the forum link you'll still get all of the forum code wrapped around it.  I haven't played with the SSI stuff yet, but I suspect you could use a custom module built using the SSI feature which will give you the links into the forum database & variables that you need, without all of the other forum overhead that you may not care about, and without the headache of a separate portal/CMS/bridge/whatever.

The template page is pretty short.  Take a look at it and get a feel for what it's doing, and you could probably base your stand-alone page off of it using SSI (again, *zero* experience here on SSI but there's some excellent tutorials on it here at SMF.)  Then you could treat GoogleMap.php as a drop-in function that does all of the hard stuff and not worry about it.

http://docs.simplemachines.org/index.php?topic=400  (Using SSI.php)
(someone, PLEASE come up with a better suggestion if I'm crocked!)

GoogleMaps APIs are actually pretty easy, if you look at some of the example pages that Mike did for Google's developer forums.  It's just a small chunk of Javascript variables for a simple map, and some calls to existing API Javascript functions for the more complex stuff.  The one TLW and Brian did looks complex mostly due to the sidebar and the KML feed, which is well over half of GoogleMap.php.

And *do* check out Brian's forum.  If you want to add some POIs (Points of Interest) to your custom map that aren't members, I had a post there where I showed how to include your own XML file with independent POIs and custom HTML for the info balloon.

There's no end to the customization you can do.  You can have your own PNGs for the marker icons, toss in all sorts of wizzy features like the SEARCH box and generally make it look nothing whatsoever like what you'd started with, still maintaining the underlying GoogleMap.php with some minor tweaks.  I encourage people to make it into whatever they want it to be, but we don't have the time or resources to include an endless list of one-off customization in the main distribution files with a huge number of IF statements that we have to maintain forever.  Hell, I'm still struggling with a (fairly simple) port to SMF 2.0.

BTW, I'm about the farthest thing from a PHP expert that you'll find.  I only started to play with it a little last year or year before, so I'm as green as any other newbie.  It's never stopped me from hacking code, though!


talkhunting

#483
I am not sure this is where I need to post so if not, please direct me to where...

I recently installed Google member Map and now posting has become incrediably slow. Is this just a part of this mod? is there anything I can do about it?

Also, my error logs are full of google map errors..

brianjw

Hi talkhunting,

No, the Google Member Map doesn't make the posts on your forum become slow at all. The Google Member Map mod is only available on one page, and that page doesn't include posts.

We are working to fix the errors in the error log.

talkhunting

ok......  Its a weird issue... I installed 2 mods at about the same time. members map and friend invite. After that, when you click "Post" after replying or a new topic, it takes about 20 seconds to refresh back to the new page...

Any ideas? If I uninstall the map mod to test it, will I lose the members info already there?

tk2012

This mod took me some time to get working, but it was WORTH EVERY HOUR!  My members love this add-on the best out of EVERYTHING I've installed (which is like 61 mods) 

Just wanted to say thank you for incorporating this for us!

brianjw

@talkhunting:
If you uninstall the Google Member Map mod via the Package Manager, it will not effect your database of the member map. All your member's pins will remain in the database. Please do try to test it, but I extremely doubt this is the case of my mod. I haven't heard any problems like this happening from my mod, including when TWL was supporting it so like I said, I doubt it is my mod causing this.

If after uninstalling this mod and the friend invite mod, you still receive this problem. I would contact your hosting provider to ask them why this is happening.

@tk2012:
Thank you for your compliments. It is always nice hearing compliments like this.

May I ask why it took time to get it working? What problems did you experience?

talkhunting

thanks!  I will try that!

I think the mod is great and the members love it! Thats why I dont want to lose the data..

brianjw

talkhunting,

Ok, let me know how it goes. ;)

Thank you for your compliments as well. :)

tk2012

Quote from: brianjw on July 30, 2008, 06:15:15 PM
@talkhunting:

@tk2012:
Thank you for your compliments. It is always nice hearing compliments like this.

May I ask why it took time to get it working? What problems did you experience?

Well, I had just installed my forum about two months ago and had no idea what in the world I was doing.  I had no idea how to edit a php file, upload to a server, or pretty much anything else.  It took a long time because I am and was a n00b!  Now, I'm much better (not great, but better).  I can at least semi-figure out what is wrong when I do things. 

All I remember is trying to do it step by step, but failing along the way.  Not sure if I posted in here before, but I may have.  Just chalk it up to someone inexperienced getting their feet wet.

I wish this was available for 2.0 b3.1 !!  Anyway, the work paid off because I can't tell you how much my members love it! 

I have done a lot of things on my site now like altering the default theme to our own color palette, but the Member Map is  the most popular with about 50% taking part in it.  Guests can view the site, but I don't think the member map shows
http://www.tk2012tournaments.com/forum/index.php


brianjw

Google Member Map 1.0 beta IS RELEASED!
It works with SMF 2.0 and SMF 1.1.X
Huge Thanks to both Nao and 2Ntense! Without them, it would be many more months before this would be released.
Now, please note this has been tested on SMF 2.0 and SMF 1.1.X on a test site that was fresh installs. It is in BETA so report any problems you experience.

Some new features in this version are:
o Works with SMF 2.0 and SMF 1.1.X
o Fixed Internet Explorer bugs, some were experiencing.
o Added a search function to the add pin map in the profile for easier pin placing and easier finding locations.
o Added an option to display or to not display the KML feature. (For better security)
o CSS Should Be Fixed and the balloons on the map should be fixed for darker themes!
o Added the mousewheel zoom function to the map. You can now zoom using your mousewheel.
o Removed the frame view on the bottom left. (annoying and requested to be removed by many members)
o There is plenty more and you will find them.

And changes that aren't on the list above you will notice as you use the mod. In SMF 2.0, the administration Page is located in Admin>> Configuration >> Modifications..

Please enjoy this new version!

tk2012

Oh nooooo... I think I just found what I'm doing tonight since the weather sucks here!  I'll let you know how it goes!  I don't think I'm going to let my members know about this until the new site goes live in September.  They need a nice surprise!

THANKS SO MUCH !!!

digit

Cool!  Any upgrade advice?  Are there any new tables or columns, or can we just upload the new source file, clusterer, and theme templates?


Happily using a heavily modified 1.1.16 version of SMF!

2748011 Posts in 320998 Topics by 50986 Members


SOLD my website - thanks it was a good run - they converted to vbadvanced. (and screwed it up good!)

brianjw

To upgrade, just uninstall the old version and install the new one. The database is all the same except for one added table which will add itself upon install via package manager.

CrazyHorse80

But if I upgrade, do all of my members have to replace their pins?
Bye,
PS

digit

Quote from: brianjw on July 31, 2008, 02:28:00 PM
To upgrade, just uninstall the old version and install the new one. The database is all the same except for one added table which will add itself upon install via package manager.

In other words, no?  :)

I am unable to use the Package manager because I am limited to sftp.

Can you please give me the details of this "new table"?

Thanks!

:-(
Happily using a heavily modified 1.1.16 version of SMF!

2748011 Posts in 320998 Topics by 50986 Members


SOLD my website - thanks it was a good run - they converted to vbadvanced. (and screwed it up good!)

brianjw

@CrazyHorse80:
If you upgrade, all your members keep their pins. It's in the database.

@digit:
All I can tell you is the code that adds the database is in add_settings.php and add_settings20.php (for smf 2.0). It looks like this 'KMLoutput_enable' => '0',

However you got it set up the first time is somehow how you need to setup this new one.

casp3r

Just installed it and the front end seems to work fine. The problem is the back end - I can't get into it. I go to 'Features and Options' click members map, the page refreshes but just displays the same 'Features and Options' page. What's the url to the back end?
Aviation forum & gallery
www.niaviation.co.uk

brianjw

The URL to the administrator page for the Google Member Map mod for SMF 2.0 only is
index.php?action=admin;area=modsettings;sa=googlemap

For SMF 1.1.X:
index.php?action=featuresettings;sa=googlemap

brianjw

Advertisement: