I am brand new to using Openlayers and coding in general
I have, through much frustration, created a map on Openlayers, but it needs a bit more functionality.
I would like to add in the Geolocation of the user on the map. I have tried to insert the code from https://openlayers.org/en/latest/examples/geolocation.html and w3schools. The toggle button appears and works but it will not show me the live location. I am probably missing something from the code but can't work out what.
Additionally, I would like to add markers to my map that, when clicked on, would show an image of the location in a popup bubble and the name. Again, I have tried multiple sites and re-wrote different codes but alas, nothing has worked, Not sure if I am overcomplicating it or not.
Can someone show me a code that would work for these functions? Or at least a website that can explain them me. As I say I am brand new so simplicity is key.
I should mention it's all been created using JavaScript and HTML if that helps.
Thanks!
Used code from https://openlayers.org/en/latest/examples/geolocation.html and w3school for geolocation but the actual location did not show on the map.
Same with popup bubbles and markers