Hi Kyle,
Thanks for contacting Syncfusion support. We have analyzed your query and prepared sample as per your requirement. In the sample, we have subscribed the “markerSelected” event and written the below code.
[JS]
|
var previourMarker = "";
function markerSelected(args) {
if (previourMarker != args.originalEvent.data.Name) {
document.getElementById("popup").style.visibility = "visible";
document.getElementById("popup").innerHTML = "Selected Marker is - " + args.originalEvent.data.Name;
previourMarker = args.originalEvent.data.Name;
}
else {
document.getElementById("popup").innerHTML = "";
previourMarker = "";
document.getElementById("popup").style.visibility = "hidden";
}
} |
In the above code, if the text content is existing in pop-up is not same as clicked marker name then we have changed the existing pop content with new marker name. If both are same then we have emptied the content in pop-up. In the below link, we have attached sample for your reference.
Please let us know if you have any concern.
Thanks,
Sanjith.