How to show information in div with Jquery & Google maps v3
I'm wondering how to show information of a marker (after Onclick) outside the map in a div i开发者_运维技巧nstead of showing it in the standard Google maps infowindow.
Basically you need to register and event listener for that marker... so when the user clicks it a function is fired.
marker = new google.maps.Marker({
map:map,
draggable:true,
animation: google.maps.Animation.DROP,
position: parliament
});
google.maps.event.addListener(marker, 'click', showInfo);
function showInfo() {
//display info whereever you like.
}
P.S. This is just sample code so you need to adapt for your needs.
Hope this helps
精彩评论