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

I'll see if there is a way to tweak the anchor point of the pin (a bit more).  When you use those different sized pins you have to shift the anchor point of the pin base but as noted it can cause some minor discrepancys when you zoom out  :-X  Gets convoluted with the number of pin options and shadows that the mod supports, so it may be something we just have to live with but I'll check when I get a chance.

carlosdelarco

Here is the spanish_es-utf8 translation for this mod ;)

You must set the code file to unicode utf8

luuuciano

Very nice mod! thanks for making and sharing it!

A question... the usernames list, at left/right of the map, can be sortered alphabetically instead the current sort by registration time?
It will help to find members too
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

Spuds

Quote from: carlosdelarco on January 14, 2012, 11:33:35 AM
Here is the spanish_es-utf8 translation for this mod ;)

You must set the code file to unicode utf8

Thank you !!! ... I'll add this at the next rev
Quote
A question... the usernames list, at left/right of the map, can be sortered alphabetically instead the current sort by registration time?
It will help to find members too
It does a bit of a double sort, or its supposed to ...
Recently moved / added pins are supposed to be at the very top of the list in the added/changed order (most recent at the top), then after the recently moved/added pins the remaining members (whos pins have not moved in > 1 week) will be listed alphabetically.  So if you have just enabled the mode it will look random but in a week it will normalize itself.  Hope that makes sense ...

luuuciano

Oh, amazing... thanks a lot for the explanation spud!
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

rootuid

Great mod! Where is the pin the member can use to identify his location ? I don't see it in the profile. screenshot attached.

Spuds

QuoteWhere is the pin the member can use to identify his location
You just have to click on the map to place a pin, and if you want to remove it, click on the pin itself.

africangreys

Hi All,

I have just installed this onto my forum but I have a silly issue with it that I can't see how to fix, when you type your location into the input field you get a dropdown menu with possible locations, the problem is the background is white and so is the text so unless you hover over the results you don't see the suggestions (see image below), obviously a bit of CSS somewhere but can't figure out where .... any help appreciated?


africangreys


Spuds

Those are the defaults from the Google places script that is used to generate that pull down.

To change those you will need to add some css to the Profile.template.css file.  In that file find:
Code (find) Select
<style type="text/css">
#map_canvas input, textarea {background-color: #ffffff;}
</style>


Code (replace) Select
<style type="text/css">
#map_canvas input, textarea {background-color: #ffffff;}
.pac-container {background-color: #000000;}
.pac-item {color: #777777;}
</style>

.pac-container is the background color of the div, .pac-item is the text color of the found items in the pull down, change the numbers to what you like.

The color of the initial input box on the screen will not be changed by this change, this only changes the selection box that appears.  The input box is controlled by the themes stylesheet (generally index.css   input, button, select, textarea  line)

africangreys

Awesome Spuds ... works a treat, thanks for your help :)

rlarusso

Hey, this is a great mod my users are really enjoying it.

I wanted to remove the map from the profile page -- there wasn't an apparent setting for this in the admin panel.

It's no big deal to comment out some code or hide it in CSS, I just wanted the author to see this as a feature request.

Spuds

Thanks ... thats a good idea!   I'll add that in the next release (assuming I remember lol)

3fifty

Great mod.  Thanks for the hard work.
I followed the conversation (quoted below) and I cant seem to find the proper files or references.
Thank you for the help.

Is GoogleMap11.php in /Sources/?  If not, where do I find it?
I have GoogleMap.php and GoogleMapIntegration.php in /Sources/.

In GoogleMap.php I could not find // Let's actually start making the XML but I did find // Let's bring it all together... Do I add the code before that?

Quote from: Spuds on February 23, 2011, 07:00:26 PM
Quote from: SeaChaser on February 23, 2011, 01:39:43 PM
I would like to add some pins, maybe even customized pins, for locations of interest to the forum members but not necessarily have to create ghost accounts for those locations. Is that possible?
Its something that I'm going to add to the mod one of these days, but only for the 2.0 branch
Open up the GoogleMap11.php and find the line that says
    // Lets accualy start making XML Mr. PHP

immediately before that you need to add this block of code, for each and every pin that you intend to add
$data[] = array(
'name' => 'Google HQ',
'href' => 'http://www.google.com',
'blurb' => 'This is where we rule the world from',
'website' => array('title' => 'Google Website','url' => 'http://www.google.com'),
'title' => '_____________',
'location' => 'Mountain View, California',
'googleMap'=> array('latitude' => 37.423021, 'longitude' => -122.083739),
'gender' => array('name' => '','image' => ''),
'icq' => array('name' => '', 'add' => '', 'href' => '', 'link' => '', 'link_text' => ''),
'aim' => array('name' => '', 'href' => '', 'link' => '', 'link_text' => ''),
'yim' => array('name' => '', 'href' => '', 'link' => '', 'link_text' => ''),
'msn' =>  array('name' => '', 'href' => '', 'link' => '', 'link_text' => ''),
'avatar' => array('name' => '','image' => '','href' => '', 'url' => ''),
'online' => array('is_online' => 0,'text' => $txt['online3'],'href' => '#','link' => '','image_href' => $settings['images_url'] . '/' .  'useroff.gif','label' => $txt['online5'])
);


This will give you a pin on the map with some basic information in the info bubble.  Be careful when editing, don't mess up any of the ' or , or you will get an error  ;)  You need to change the information in those first seven lines to customize each pin, the rest of the lines are just there so you don't get undefined index notices in your error log.

Quote from: Spuds on February 23, 2011, 09:25:36 PM
Quote from: henrik1782 on February 23, 2011, 07:19:21 PM
can the same code be inserted to the GoogleMap20.php and where...?
It should ... worst it will do is give you and undefined index ;)  .... in 2.0 look for
// Let's actually start making the XML
and insert the code above that line

Spuds

All of that was for the previous version of the mod, I had to make updates when things moved to Google Map V3 api.

I have not tried this, but you should be able to do something similar to what was put above ...

find the section of googlemap.php
// Begin the XML output

Above that add the $data[] = array( ... stuff but instead of calling it "data" try calling it $memberContext = array( .... 

Again untested so YMMV ;)

3fifty

#1635
Thanks!

It briefly tries to load the map then errors with
Unable to read the map pin data, result was - 500

mint

Thanks for creating this modification I'm finding it really useful to give me an idea of where my paid members are spread across the UK.
Here are the co-ordinates I used to centre the map on the UK: LAT 55 LONG -4 ZOOM 5

However, I am having the same issue as Kwolf where when the map is zoomed right in (approx level 20) the pins are accurately positioned but the pins move up the map slightly with each level you zoom out.

NDFF

#1637
I and no one else can move or set pins on the map in our profile??? Anyone else have this problem. (Could it be something with the change of Google terms of Service lately).

Test account is possible to make.


I'ts a theme conflict.. When theme is changed to Core, there is no problem. ???

netpaydays

I have a little problem. I have smf 1.1.4. In bright forest theme everything is alright but in Apollobb I don't see link to the profile, legend with gender (only pins), and no title of box with users.

Link to theme:
http://custom.simplemachines.org/themes/index.php?lemma=356

Kindred

if you are actually using 1.1.4, you have more problems than that. You need to upgrade to 1.1.16 ASAP - you are 12 revisions behind in security.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: