2011-03-07 59 views

回答

1

您需要創建標記&添加偵聽它。

amarker = new google.maps.Marker(
      { position: alocations, 
      map: map, 
      title: "title " 
      }); 
     google.maps.event.addListener(amarker, 'click', 
      function() { 
       markerClick(this); 
      } 
     ); 
    } 
    function markerClick(mark) 
    { 
     //do something 
    } 

您可以按照鏈接查看更多細節 http://code.google.com/apis/maps/documentation/javascript/events.html