I tried adding a myLabel.on('click',function(){ }); event but it simply wasn't working. After poking around in the console for a while and logging the label object I found you need to change a seemingly undocumented 'clickable' option. So I ended up with something like this:
var myLabel = myMarker.label; myLabel.options.clickable = true; myLabel.on('click',function(){ //do your stuff })
No comments:
Post a Comment
Comments are moderated, so you'll have to wait a little bit before they appear!