var gmap3 = $("#map").gmap3({...});
gmap3.marker({...});
gmap3.on("click", function () {
console.log("click");
});
It seems the event is attached to the marker, not the map. I had a hard time understanding this. I haven't seen any explanation in the docs. The chaining section is clear about what the following code does:
var gmap3 = $("#map").gmap3({...});
gmap3.marker({...}).on("click", function () {
console.log("click");
});
But I didn't expect both snippets to do the same. Is that correct or may I have some other error? Is it documented somewhere?
My code looks like:
It seems the event is attached to the marker, not the map. I had a hard time understanding this. I haven't seen any explanation in the docs. The chaining section is clear about what the following code does:
But I didn't expect both snippets to do the same. Is that correct or may I have some other error? Is it documented somewhere?
Thanks.