I would like to know how to jump to an anchor on the html page that holds a google map by clicking on a marker in the map.
tried this:
google.maps.event.addListener(marker, 'click', function() {
$(window).scrollTop($('#'+i+'').position().top);
// open new infowindow
infowindow.open(map,marker);
});
This i开发者_开发问答sn't working.. Any help is highly appreciated! Thanks!
Very belated answer as I came across this today while trying to do the same thing:
google.maps.event.addListener(marker, 'click', function() {
window.location = "#anchor";
});
精彩评论