Add link to marker
This commit is contained in:
parent
23537782d6
commit
7c1a8d8de7
1 changed files with 5 additions and 1 deletions
|
|
@ -90,9 +90,13 @@
|
|||
var marker = new google.maps.Marker({
|
||||
position: {lat: parseFloat(places[i]['lat']), lng: parseFloat(places[i]['lng']) },
|
||||
title: places[i]['title'],
|
||||
url: "/?p="+places[i]['post'],
|
||||
map: map
|
||||
});
|
||||
marker.setVisible(true);
|
||||
google.maps.event.addListener(marker, 'click', function() {
|
||||
window.location.href = this.url;
|
||||
});
|
||||
bounds.extend(marker.getPosition());
|
||||
}
|
||||
map.fitBounds(bounds);
|
||||
|
|
@ -100,7 +104,7 @@
|
|||
if(map.getZoom() > 15){
|
||||
map.setZoom(15);
|
||||
}
|
||||
}, 500)
|
||||
}, 500);
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue