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

Apnba’s picture

Can you tell us the file name where the target is added?

Thanks.

marcoBauli’s picture

Status: Active » Closed (duplicate)

Seems a duplicate of older issue at http://drupal.org/node/333118

Marking as dupe and quoting the proposed solution there.