Adding a marker on slippymaps

Hello everyone.

I have installed slippymaps by following the steps as provided on this website.

I installed OpenLayers and set up a running server as seen here
image

Everything works well as seen on the localhost:5173 address provided, except one thign, I can’t add a marker for some reason, I went on this website and tried the “To simply draw a standard marker at a static position on a map” code seen in the first example, it did not work, I put this code in the npm’s main.js and restarted the server but to no avail. What am I doing wrong?

SOLVED! I just switched to leaflet maps and added a marker using the code:

<script>
    var marker = L.marker([[COORDINATES], [COORDINATES]]).addTo(map);
</script>

2 Likes