show only Node Title?
dvitali - May 8, 2009 - 09:07
| Project: | GMap Module |
| Version: | 6.x-1.1-rc1 |
| Component: | Miscellaneous |
| Category: | bug report |
| Priority: | normal |
| Assigned: | dvitali |
| Status: | needs review |
Jump to:
Description
When i click on marker in a content it's appear a popup window blank instead if i see the node location i see all data in the popup window. You can see the problem here:

#1
I have solved this problem, changing gmap_location.module:
after line 656: $node = node_load($nid);
add line: $content = node_view($node, true);
.....
after line 682: 'offset' => $count-1,
add line: 'text' => $content,
Now in the window popup i can see the teaser of the node.
P.S: this isn't a code of my mind but code wrote by eliosh.
#2
Thank you for this solution. I was having the same problem and this solved it.
#3
Yes this helped me thank you!
#4
I am getting this warning message after implementing ur code
warning: Invalid argument supplied for foreach() in /home/public_html/dev/sites/all/modules/cck/content.module on line 1284.
Can u give me the actual code page of the node where you find this code.
#5
Hi ashiwebi,
this is the file gmap_location.module with our code:
http://www.denisvitali.com/gmap_location.module
but your error is given by cck module.
#6
I think I have to check the cck module.
I will give my feedback If I found some new on this.
Thanks once again
#7
Thanks for this. Can you tell me what code to change to show only Node Title, instead of teaser, in pop up?
edit....
Well since I wasn't able to figure out how to put what I want in the popup in the location block, I ended up reproducing the location view block in views which allows me to put what I want in the popup from entered fields.
I used the macro from the location block and it works great except I am not able to get the marker to center as it does in the location block. Does anyone know how the location block does this?
From what I can see, the "location block" is inserting the marker's coordinates as a "markermode" parameter, whereas the view I created does not.
#8
I am starting from the same point as dvitali: my node locations map shows nodes and the popup info window shows the teaser info I want it to. When I select a specific node, I get the node display along with a location map and the marker. The popup there is blank. Just like dvitali.
BUT, I don't need or want a popup when I'm on the node itself. Is there a way to disallow the popup info window when I'm on its own node?
#9
ashiwebi,
"warning: Invalid argument supplied for foreach() in /home/public_html/dev/sites/all/modules/cck/content.module on line 1284"
this can be solved by executing this SQL-query:
UPDATE `your_database`.`node` SET `uid` = '1' WHERE `uid` = '0'
Such things happened after you deleted the user from the site, so the content created by him (uid) is inaccessible.
#10
You can also achive this with Views where you can set up in the fields what you want to see in the bubble.
Select Gmap in the View style.
#11
#1 - Thanks for the tip!
I modified your solution a bit for my needs. While I would have preferred the info popup not to appear at all, I decide that the node title was better than the teaser.
I skipped your first step (line 656) and instead for step 2 (line 683), added:
'text' => $markertitle,The complete array set looks like this:
$markers[] = array('latitude' => $loc['latitude'],
'longitude' => $loc['longitude'],
'markername' => $markername,
'offset' => $count-1,
'text' => $markertitle,
'opts' => array('title' => $markertitle),
);
#12
Thanks Capellic! - that's exactly what I needed to do also.
#13
confused now which method to try
I have ashwebis problem but please simple newbie explanation
this is my error
warning: Invalid argument supplied for foreach() in /home/xxxx/public_html/modules/cck/content.module on line 1284.
how do I find the file and how how do i change it? there are a few fixes here but im confused
#14
thanks; that code change worked for me
#15
Great. This modification to line 683 works for me also. Makes an otherwise useless and annoying bubble seem at least deliberate.
#16
great! Thank you ;)
#17
I keep getting the blank boxes.
I tried every suggestion above and I have also turned off the settings for the marker in both location and gmap.
Still an empty box.
Can I add to the code of each gmap so I can put something in there?
Thanks,
Nina