2015-06-24 32 views
-2

我想是讓地圖點擊並鏈接我我想要的地址 ,我現在的代碼是goMap jQuery的如何添加一個click事件映射

<script type="text/javascript"> 
jQuery(document).ready(function(){ 
    // initiate googlemaps     
    jQuery("#' . $block_id . '-map").goMap({ address: "' . $address . '", 
      zoom: 15, 
      navigationControl: true, 
      maptype: "ROADMAP", 
      draggable: false, zoomControl: false, scrollwheel: true, disableDragging: true, 

      markers: [ 
       { "address" : "' . $address . '" } 
      ] 
    }); 
}); 
</script>'; 

回答

0
google.maps.event.addListener(marker, 'click', function() { 
     ... 
}); 

你可以通過here瞭解有關點擊事件的更多信息。

相關問題