Hi,
I am rather new to leaflet.
I have created a page that displays markers for points of interest. I created these by putting information into a JS-array, and executing .forEach on the array. So the function executes
var krp = L.marker ( item[1] etc. )
for all entries, and binds an onClick event to each
krp.on ( 'click' , function (e) { ... }
When clicked I display markers with more detail, by adding the new markers to a FeatureGroup, and zoom in on that group.
By examining the event-object e I am able to determine which marker was clicked (the title is somewhere in that object).
But I would also like to hide temporarily the marker that was clicked, by executing
???.removeFrom(map)
But as all markers are generated with the variable krp, I am at a loss how to address that specific marker. What to put for ???