Closed Prashanth-Thomas closed 6 years ago
You could define a custom onShow callback that triggers a custom event that your other component has an event handler for. It would look something like this:
$("#other_component").on("imgNotes:show", function(event, note) {
\\ Do something with note.x, note.y and note.note
});
...
var $imgd = $("#image_dynamic").imgNotes({
onShow: function(ev, elem) {
var note = $(elem).data("note");
$("#other_component").trigger("imgNotes:show", [note]);
}
});
Personally i think imgNotes is simply brilliant. Now coming to the question, lets say that i have to pass the marker details(x,y,note) that was clicked to a component outside the map. This would require some custom lines of code running when the marker is clicked..... Correct? Is this possible? If so how would one go about achieving it.