I am working on a map web application using the Leaflet library. I have a class (ReleafAssets) with a method for rendering markers on a map.
Markers Class Code snippet cont'd
What i want to do is to be able to implement the ability to delete each marker upon clicking them. In the html template, i have binded the test function to the onclick event on the delete icon but i can't seem to access the function from inside this class method for some reason.
When i click the delete icon on the marker popup, i get the error below:
Please, how can i fix this issue in order to be able to access the test method onclick in the marker popup html. Thanks in anticipation.