How can I link from a node to the gmap map view of all of this node type such that it, amidst all other markers, opens the infoWindow for that node?

Comments

bdragon’s picture

Well, I just made it possible to have an info window automatically expand by setting $marker['autoclick'] = true;...
Not quite sure how to set this on the correct marker though.

Need to think about it some more.....

texas-bronius’s picture

I wish I had time to look into this as well, but probably won't..
However, maybe it would help to share some of the struggle of how-to. For instance, is the difficulty in identifying a marker by ID so some variable could be passed into the gmap macro? Is it, once identified, getting google maps api to respond and pop a particular one open?

swentel’s picture

Hi,

Is the info on http://drupal.org/node/150939 of any help for you ?

dwb17’s picture

This works for gmap 6.x.1.1-rc1 with views gmap style.
You can edit the function render() in gmap_plugin_style_gmap.inc on line 127 inserting an if statement

if($row->nid == arg(1))
{$info_exp = TRUE;}  else  {$info_exp = FALSE;}

and then in the markers array add 'autoclick' => $info_exp,. By adding the nid argument to the href of the of say a list of links on a seperate node you will be able to link to a specific gmap info window.

Hopes this Helps.

summit’s picture

Hi Trying the same...but not working.

Can't somehow autoclick be added to the Gmap Macro in the gmap Views ...something like
Current code

[gmap zoom=6  |width=450px |height=400px |control=Small |type=Map |behavior=+autozoom]
[gmap zoom=6  |width=450px |height=400px |control=Small |type=Map |behavior=+autozoom |markers=%autoclick]

Not working though...

#4, can you please give the complete function changes please? Where precisely to input that code? And how to add 'autoclick' => $info_exp to the array?
I am not a programmer. Thanks a lot in advance for your reply!

Greetings, Martijn

podarok’s picture

Status: Active » Closed (won't fix)

release unsupported
feel free to open issue against latest 7.x dev