News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Google Member Map

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

Previous topic - Next topic

Spuds






License
This modification is released under a MPL V2 license, a copy of it with its provisions is included with the package.

Dependencies
The Google JavaScript Maps API V3 to create the map and place pins.  This API is available for any web site that is free to consumers. By enabling and using this SMF modification you will be acknowledging and agreeing to the Google<a href="http://code.google.com/apis/maps/terms.html"> terms of use</a>';

JSColor project to select the pin color in the admin interface.  JSColor is by Jan Odvárko and is released under the GNU Lesser General Public License. LGPL differs from GPL by allowing you to use JSColor even in non-(L)GPL applications.

Introduction
This mod installs a member map to your website which allows your members to pin their location on a map. It uses Google Maps 3.0 API to generate the map and place 'Push" pins.

Google Earth can also make use of the pin data. This mod allows for the exporting of user pin data in to a .kml file for those that want to use Google Earth to see their member locations.  Simply add a network link in Google Earth to point at http://www.example.com/forums/index.php?action=.kml to get the data for Google Earth.  The capability to export .kml files is controlled by the permission to view the map, and keep in mind Google Earth will appear as a guest to your forum.

Features
o Adds a member map button to the main menu
o Adds a member profile area for users to add their pin to thier profile.  This will then appear on the map. 
o Ablilty to search by location when placing thier pin
o Adds Profile info bubbles to the map pins
o Ability to cluster pins together to improve map legabilty.  Clusters will un-cluster as you zoom in on them

How to Use
In your admin panel you will need to enable it, which implies your acceptance of Google Maps terms of service.  Choose the settings that best work for your site.  There are many settings so you can fine tune the experience for your users and site.  Next, your members will need to edit their profiles and place a pin on the map to show their location and save their profile. That pin will then display on the main member map page. The admin will also need to set the map permissions so users can view the map as well as place a pin on the map.

Support
Please use the member map thread for support with this modification.

Changelog
2.6 - 18 Dec 2011
o + added a hidden map reset button to middle of pan control
o + prevented output of gzip data when portamx is active
o ! fixed member names not appearing in bold when they should have been
o ! fixed undefined txt var due to order of load language

KGIII

Is that "if you need support message him" correct or is it "if you need support for an older version that is not taken over by me then please message him" what you are meaning to say? *would love to poke at it but, well, I wanna know where to ask questions when things blow up*

My PC Support Forum
Please ask in-thread before PMing
                   SMF Help
                   Visit My Blog

How can we improve the support process?:
http://www.simplemachines.org/community/index.php?topic=163533.0

SMF vs. Godzilla? Who do you think will win?

brianjw

I am not encouraging people to use old versions, if they wish there is no support. TLM is leaving SMF.
"if you need support message him" as in messaging me.. I will change it so it is more understandable.

brianjw

TEOC2

Can i resize the map?

We have a frappr map in beta testing and its set to 100%,
<embed width="100%" height="100%" align="middle"

Can i tweak it like that?

brianjw

You should be able to. Give it a try and see how it goes... :)

TEOC2

Quote from: brianjw on December 13, 2007, 04:51:21 PM
You should be able to. Give it a try and see how it goes... :)

Where would i find the code?

Also, a thumbnail of the users avatar would be good too, maybe above the members name.
Great mod BTW.
8) 8) 8)

brianjw

Ok, you would find it in ./Themes/default/GoogleMap.template.php
Also, the code isn't an embed tag, it is a script tag. Not sure if there is a way to size script objects though...
I believe it is:

<script src="http://maps.google.com/maps?file=api&v=2&key=', $modSettings['googleMapsKey'], '" type="text/javascript"></script>


A thumnail of their avatar...

- Next to their name on the list?
because there is already an avatar on the white bubble that pops up when clicking on the icon on the googlemap or the users link on the list...
See:
' . $marker['avatar']['image'] . '

brianjw

TEOC2

Quote from: brianjw on December 13, 2007, 05:17:39 PM
Ok, you would find it in ./Themes/default/GoogleMap.template.php
Also, the code isn't an embed tag, it is a script tag. Not sure if there is a way to size script objects though...
I believe it is:

<script src="http://maps.google.com/maps?file=api&v=2&key=', $modSettings['googleMapsKey'], '" type="text/javascript"></script>


A thumnail of their avatar...

- Next to their name on the list?
because there is already an avatar on the white bubble that pops up when clicking on the icon on the googlemap or the users link on the list...
See:
' . $marker['avatar']['image'] . '

brianjw

Ok, thanks, i'll have a play with the code, yes, your right the ava does show on the pin, i have it installed on a sacrificial board so nobody had avatars.

brianjw

No problem. I looked around a little and it almost looks like it isn't possible. The best place to get support for the map itself provided by google is google.. The mod however can be supported here.


brianjw

For those using the Custom 'Actions' and 'Profile Fields' mods will need to manual install until I get some free time to make it work around the mods.

Manual Install Instructions
If there are any files that have errors, they're conflicting with another mod as this has been tested. So go ahead and install it anyway. Then I recommend using the package parser at http://www.gamerzgarage.com/package.php to manually install the files that had the issue, all other files should already be installed after submitting it to your package manager. Edit the files with the find and replace, save it, and upload it to your website. Be sure you do the manual install after you've submitted the mod to your package-manager and it is installed even with errors otherwise you may get some website errors.

brianjw

Omniverse

Woot, thanks brianjw. I've been waiting for an update to this for awhile. :)

brianjw

You're welcome :)

Give me your comments about the new sidebar right layout... It also now scrolls when it exceeds the available space. ;)

brianjw

TEOC2

#13
I have a test forum set up if ppl want to see it in action,
http://binkles.wsnw.net/qwerty/index.php?action=googlemap

Ive tweaked /Themes/default/GoogleMap.template.php a bit to change the map size and side bar height.


overflow: auto;
width: 150px;
height: 900px;


<div id="map" style="width: 800px; height: 800px; color: #000000;"></div>

AllMassive

Are the Pins from the old Version still available after switching to your Version?

TEOC2

#15
Just thought i would show how to make the US the default location.
http://binkles.wsnw.net/qwerty/index.php?action=googlemap
Feel free to join and put in a pin. Its not a live forum.






brianjw

Quote from: AllMassive on December 14, 2007, 01:52:43 AM
Are the Pins from the old Version still available after switching to your Version?
Yep, they are... :) Database hasn't changed, all you need to do is uninstall the previous versions and install 0.1. ;)

seraphikah

how do i get the links to take members to the map? I have the link up, but it takes me to the home page. not sure what code i need to define where the map asset takes me and where i put it? new to SMF lol!

qubbah

how can i make scroll for username list in google map?

brianjw

Quote from: seraphikah on December 14, 2007, 06:26:19 PM
how do i get the links to take members to the map? I have the link up, but it takes me to the home page. not sure what code i need to define where the map asset takes me and where i put it? new to SMF lol!
I am not sure what you're talking about. Explain please. :)
Quote from: qubbah on December 15, 2007, 03:15:54 AM
how can i make scroll for username list in google map?
When you have a certain ammount of usernames on a list, it will begin to scroll.

brianjw

Advertisement: