SparrwHawk
SparrwHawk

Reputation: 14153

Google Maps Marker As a Link

I've been trying to get this to work for hours :-(

It's actually a posted solution to an older question here Google Maps Marker as a link

This is what I've put together but it won't work http://jsfiddle.net/9GrcW/

Upvotes: 0

Views: 190

Answers (1)

VNO
VNO

Reputation: 3695

Looks like it works if you change this[i].url to this.url:

for ( i = 0; i < markers.length; i++ ) {
  google.maps.event.addListener(markers[i], 'click', function() {
    window.location.href = this.url;
  });
}

Upvotes: 3

Related Questions