I have a simple Marker added to map like this:
var x = L.marker([50.5, 30.5]);
x.addTo(map);
Now how can I hide/remove x
? I searched the API docs for a Marker.remove() method, but couldn't find any.
Even more odd - Google is failing me. All results I can get is how to remove the whole layer with all markers, but not only one.
Am I getting something wrong here about markers? Is there a way to remove only one?