Closed (duplicate)
Project:
GMap Module
Version:
6.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Sep 2010 at 18:38 UTC
Updated:
1 Jun 2012 at 14:24 UTC
Gmap is great, but it does not allow developer to make a marker open a link in a new windows. So I made small change to make GMAP it work
Simply, just change marker.js
from
// No content -- marker is a link
else if (marker.link) {
open(marker.link, '_self');
}
to
// No content -- marker is a link
else if (marker.link) {
if (!marker.target) marker.target = '_self';
open(marker.link, marker.target);
}
So that we only need to add "target" property to marker, as following:
$markers[] = array(
'link' => url('node/' . $l['nid']),
'longitude' => $l['lon'],
'latitude' => $l['lat'],
'markername' => 'numbers',
'offset' => $i++,
'target' => '_blank',
);
Comments
Comment #1
Apnba commentedCan you tell us the file name where the target is added?
Thanks.
Comment #2
marcoBauli commentedSeems a duplicate of older issue at http://drupal.org/node/333118
Marking as dupe and quoting the proposed solution there.