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
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:

http://www.denisvitali.com/drupal6/node/25

#1

dvitali - May 15, 2009 - 14:52
Status:active» needs review

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

greg_albright - June 10, 2009 - 21:57

Thank you for this solution. I was having the same problem and this solved it.

#3

crutch - June 11, 2009 - 03:27

Yes this helped me thank you!

#4

ashiwebi - June 15, 2009 - 08:33

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

dvitali - June 17, 2009 - 13:13

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

ashiwebi - June 18, 2009 - 08:50

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

fox - July 1, 2009 - 14:15
Title:Gmap and popup info blank» show only Node Title?

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

ArthurC - July 7, 2009 - 03:22

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

Mac9 - July 28, 2009 - 11:52

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

Max_Headroom - August 4, 2009 - 05:23

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

capellic - August 18, 2009 - 14:58

#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

jconnery - August 26, 2009 - 02:55

Thanks Capellic! - that's exactly what I needed to do also.

#13

brisbanett - September 7, 2009 - 22: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

emilyf - September 30, 2009 - 14:55

thanks; that code change worked for me

#15

upperholme - October 18, 2009 - 08:09

Great. This modification to line 683 works for me also. Makes an otherwise useless and annoying bubble seem at least deliberate.

#16

nicklas.web - October 18, 2009 - 17:24

great! Thank you ;)

#17

BlueIrisNina - October 27, 2009 - 22:51

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

 
 

Drupal is a registered trademark of Dries Buytaert.