Hi,
I am trying to make links out of my google maps markers
My code looks like this:
var markers = [];
markers[1] = new google.maps.Marker({
position: new google.maps.LatLng(62.561718, 14.545898),
icon: new google.maps.MarkerImage('../images/pin.png'),
title: "butik",
map: map,
url: 'link.php'
});
markers[2] = new google.maps.Marker({
position: new google.maps.LatLng(62.561718, 12.545898),
icon: new google.maps.MarkerImage('../images/pin.png'),
title: "butik",
map: map,
url: 'link.php'
});
markers[3] = new google.maps.Marker({
position: new google.maps.LatLng(61.561718, 16.545898),
icon: new google.maps.MarkerImage('../images/pin.png'),
title: "butik",
map: map,
url: 'link.php'
});
google.maps.event.addListener(marker, 'click', function() {
window.location.href = this.url;
});
Can anyone help me?