简体   繁体   English

goMap jquery 如何添加点击事件到地图

[英]goMap jquery how to add a click event to map

what i want is to make the map clickable and link me to the address that i want the code that i have now is我想要的是使地图可点击并将我链接到我想要的地址,我现在拥有的代码是

<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>';
google.maps.event.addListener(marker, 'click', function() {
        ...
});

You can read more about click events over here .您可以在此处阅读有关点击事件的更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM