Google Member Map

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

Previous topic - Next topic

MCK

Quote from: Spuds on February 16, 2011, 08:06:17 PM
Could you post your admin settings for the mod ... make sure you have not limited the number of pins to low, ie you have more user pins then you are allowing on the map.  You can show more but when the count gets high make sure you turn on clustering or the performance will drop as Google places all those pins.

Installed 2.0.7 and all is good now. Its working! Thanks for your continued support for this mod.

henrik1782

Hi Spuds...

I get some errors in my log... can you help me out here. SMF 2.0 RC5 and Google Member Map 2.0.7

Aktivér filter: Vis kun fejlbeksederne for denne webadresse
http://xxxxxx/index.php?action=googlemap;sa=.js
Aktivér filter: Vis kun fejl med identisk fejlmedling
8: Undefined index: googleMapsPinGender
Aktivér filter: Vis kun fejl fra denne fil
Fil: /share/MD0_DATA/Qweb/xxxxxx/Sources/GoogleMap20.php
Linie: 238

Aktivér filter: Vis kun fejlbeksederne for denne webadresse
http://xxxxxx/index.php?action=googlemap;sa=.js
Aktivér filter: Vis kun fejl med identisk fejlmedling
8: Undefined index: googleMapsPinGender
Aktivér filter: Vis kun fejl fra denne fil
Fil: /share/MD0_DATA/Qweb/xxxxxx/Sources/GoogleMap20.php
Linie: 153
My favorite mods: Forum Firewall, httBL, MessagePreviewOnHover, BoardHover Mod, VB Style Board Index, Separate Replies and Views Column, Realtime clock by Joker, ENotify, Topic Solved.

henrik1782

#1382
Aktivér filter: Vis kun fejlbeksederne for denne webadresse
http://xxxxxx/index.php?action=googlemap
Aktivér filter: Vis kun fejl med identisk fejlmedling
8: Undefined index: googleMapsPinGender
Aktivér filter: Vis kun fejl fra denne fil
Fil: /share/MD0_DATA/Qweb/xxxxxxx/Themes/default/GoogleMap20.template.php
Linie: 69

Still this
My favorite mods: Forum Firewall, httBL, MessagePreviewOnHover, BoardHover Mod, VB Style Board Index, Separate Replies and Views Column, Realtime clock by Joker, ENotify, Topic Solved.

henrik1782

Just a cosmetic issue. Se attachment
My favorite mods: Forum Firewall, httBL, MessagePreviewOnHover, BoardHover Mod, VB Style Board Index, Separate Replies and Views Column, Realtime clock by Joker, ENotify, Topic Solved.

Spuds

I don't get that on a new rc4/5 site so I'm guessing that's caused by mods conflicting with one another.

SeaChaser

Hey Spuds,

I just added this mod to my 1.1.13 forum and the members love it. 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?

Thnaks in advance,

SC

Spuds

Quote from: SeaChaser on February 23, 2011, 01:39:43 PM
Hey Spuds,

I just added this mod to my 1.1.13 forum and the members love it. 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?

Thnaks in advance,

SC
Its something that I'm going to add to the mod one of these days, but only for the 2.0 branch, the 1.1 branch is really just in maintenance at this point.

If you are comfortable doing a little editing, the way to add a pin without adding ghost members is the following.  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.


henrik1782

#1387
Hi SeaChaser...

This could endeed be a great option to this mod.

An options to Google Maps are the ability to create your own maps. If this could be implemented it would be NICE !!! You could place pins draw on map and give it a name in Gootle maps and then use Google Member Map to retreive it.

You could then have buttons in Google Member Map to select the different maps...
My favorite mods: Forum Firewall, httBL, MessagePreviewOnHover, BoardHover Mod, VB Style Board Index, Separate Replies and Views Column, Realtime clock by Joker, ENotify, Topic Solved.

henrik1782

Hi Spuds....

can the same code be inserted to the GoogleMap20.php and where...?
My favorite mods: Forum Firewall, httBL, MessagePreviewOnHover, BoardHover Mod, VB Style Board Index, Separate Replies and Views Column, Realtime clock by Joker, ENotify, Topic Solved.

Spuds

Quote from: henrik1782 on February 23, 2011, 07:19:21 PM
Hi Spuds....

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

SeaChaser

Thanks Spuds! That worked great.

How do I add an image to the info bubble and is there any way to add a custom pin?

Woot!

-SC

henrik1782

H SeaChaser...

As I see it the option to place a picture is this
'avatar' => array('name' => '','image' => '','href' => '', 'url' => ''),

For custom items it would be nice if the location (address) and telephone number could be shown.

Spuds...
I can see that you load data in KML format. Maybe it would be possible to load custom KML files, so we can put KML files in a specifik directory and then it wil be loaded when map is shown.
My favorite mods: Forum Firewall, httBL, MessagePreviewOnHover, BoardHover Mod, VB Style Board Index, Separate Replies and Views Column, Realtime clock by Joker, ENotify, Topic Solved.

Spuds

QuoteAs I see it the option to place a picture is this
'avatar' => array('name' => '','image' => '','href' => '', 'url' => ''),
correct, and the only item you need to set is the image once, and it must be a complete html img tag like <img src="http://myimage.ishere.com/myimage.jpg" />

QuoteFor custom items it would be nice if the location (address) and telephone number could be shown.
Use the blurb line for that, put in whatever you would like.

QuoteI can see that you load data in KML format
Actually it just outputs a kml file for use in google earth (its an export file) ... the only thing it reads, in a way, is the xml file that the mod creates and then that is feed to google map api .

Quoteis there any way to add a custom pin?
Yes, buts that beyond this tweak ... you would need to create a custom index and then build in the code to render a special pin when the index is used ... if you look at the code and see how the gender pins are created you will get an idea of how to do it.

henrik1782

Hi Spuds...

The blurp var can not be used, but putting the information in title worked just fine.
My favorite mods: Forum Firewall, httBL, MessagePreviewOnHover, BoardHover Mod, VB Style Board Index, Separate Replies and Views Column, Realtime clock by Joker, ENotify, Topic Solved.

SeaChaser

Thanks for the help but I'm a text editor. I don't know squat about php. I edited the picture in like this:

'gender' => array('name' => '','image' => '<img src="http://www.arimaboatownersgroup.com/Sources/ArimaLogo.jpg" />'),

is that right? I'm not getting my image to show.

Anything I can do to chnge the pin image?

TIA

-SC

henrik1782

$data[] = array(
'name' => 'Stadsarkivet',
'href' => '',
'blurb' => 'Smallegade 1',
'website' => array('title' => '','url' => ''),
'title' => 'Smallegade 1<br />2000 Frederiksberg<br />Telefon 38212149',
'location' => 'Danmark',
'googleMap'=> array('latitude' => 55.67873, 'longitude' => 12.53188),
'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' => '<img src=http://www.ftb-forum.dk/Billeder/GoogleMap/Stadsarkivet_frederiksberg.jpeg>','href' => '', 'url' => ''),
);


You should use the avatar line. Look at my example. I have removed the last line of the code block because it is of no use for this.

Download Notepad ++ to make edit in php files...
My favorite mods: Forum Firewall, httBL, MessagePreviewOnHover, BoardHover Mod, VB Style Board Index, Separate Replies and Views Column, Realtime clock by Joker, ENotify, Topic Solved.

SeaChaser

I now get the red X where my image should be but can't seem to understand why the imgae isn't seen. Here's my code:

Quote
   $data[] = array(
   'name' => 'Arima Marine International, Inc.',
   'href' => 'http://www.arimaboats.com',
   'blurb' => 'Home of Arima Boats',
   'website' => array('title' => 'Arima Website','url' => 'http://www.arimaboats.com'),
   'title' => '47-37th Street N.E.<br />Auburn, WA 98002<br />Phone: 253.939.7980',   'location' => '',
   'googleMap'=> array('latitude' => 47.340706, 'longitude' => -122.22895),
   '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' => '<img src=http://www.arimaboatownersgroup.com/GoogleMapImages/arimalogo.jpg>','href' => '', 'url' => ''),
   'online' => array('is_online' => 0,'text' => $txt['online3'],'href' => '#','link' => '','image_href' => $settings['images_url'] . '/' .  'useroff.gif','label' => $txt['online5'])
   );   


henrik1782

'avatar' => array('name' => '','image' => '<img src=http://www.arimaboatownersgroup.com/GoogleMapImages/arimalogo.jpg>','href' => '', 'url' => ''),

What are your site url www.arimaboats.com or www.arimaboatownersgroup.com....?

in the directory where your domain points to you have to got a direcotry called GoogleMapImages and in this the arimalogo.jpg  file. The directory name and file name are case sensetive. To test that you can actually show a picture you can put in my image url.
My favorite mods: Forum Firewall, httBL, MessagePreviewOnHover, BoardHover Mod, VB Style Board Index, Separate Replies and Views Column, Realtime clock by Joker, ENotify, Topic Solved.

SeaChaser

The forum web site is arimaboatownersgroup.com. The point I'm putting on the map is arimaboats.com.

If I enter this in my browser, I see the image I want: http://www.arimaboatownersgroup.com/GoogleMapImages/arimalogo.jpg

Is the image too large? Are there size restrictions?

Thanks!

henrik1782

As it is an avatar I will guess that it should be around 300x300 pxl. But I have not look into the code.
My favorite mods: Forum Firewall, httBL, MessagePreviewOnHover, BoardHover Mod, VB Style Board Index, Separate Replies and Views Column, Realtime clock by Joker, ENotify, Topic Solved.

Advertisement: