At the risk of stating the obvious, and apologies if you’ve already done this, you’ll probably find an example at https://leafletjs.com/examples.html .
What you will need to do is to extract some information from somewhere to display your marker against. This may be from OSM itself (perhaps via OverPass?) or maybe it’s from an external data source?
By definition that’s displaying something on top of an existing map. In order to display that something, your code needs to decide where to place it, and it needs to do this based on information that comes from somewhere. That somewhere can be data you’d previously extracted from OSM or it might be from somewhere else altogether.
For example, supposed you wanted to display one of those markers where London is. You can extract where the “London” node is from OSM in one of a few different ways - you’ll get the information at https://www.openstreetmap.org/node/107775 and that includes lat and long.
Alternatively, suppose you want to display a marker for “my business” and the information about “my business” was stored in a local database. You can fetch that information from the database rather than querying OSM and display the marker that way. As I mentioned before, there is lots of useful information at https://leafletjs.com/examples.html . If you haven’t got basic markers working on top of your map (or even a basic map) then it would make sense to get that working first.
Isn’t the question that the OP has a png file somewhere (e.g. of a flower) and wants to use that as a marker in their Leaflet app?
Something that is explained in Markers With Custom Icons I assume.
var geelIcon = L.icon({
iconUrl: ‘fotos/geel.png’,
iconSize: [25, 40], // size of the icon
iconAnchor: [12, 45], // point of the icon which will correspond to marker's location
popupAnchor: [0, -30] // point from which the popup should open relative to the iconAnchor
});
var geelIcon = L.icon({
iconUrl: 'fotos/geel.png',
iconSize: [25, 40], // size of the icon
iconAnchor: [12, 45], // point of the icon which will correspond to marker's location
popupAnchor: [0, -30] // point from which the popup should open relative to the iconAnchor
});
Otherwise I will have a look to your code, send me a pm