开发者

get click from a link inside a google maps info window

开发者 https://www.devze.com 2022-12-25 15:21 出处:网络
I m making a google maps with some coordinates and directions and when a user clicks a marker and appears a info window there\'s a link avaliable, when user clicks it, i want to catch click event insi

I m making a google maps with some coordinates and directions and when a user clicks a marker and appears a info window there's a link avaliable, when user clicks it, i want to catch click event inside info window, and make zoom to this marker, anyone had to deal with link clicks in google maps api could help me with some links, documentation or h开发者_C百科ints?


Use an onclick attribute inside the link that appears in the info window with something like (this might need correcting):

 <a onclick="map.setCenter(yourmap(37.4419, -122.1419), 13);">Info link</a>

API reference

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号