I have the below react class which fetches the geolocation through the browser.
I am mapping a leaflet map. I want to geolocation to be an input to the setView, for
I hope this helps if you are using Angular:
const container = document.getElementById('map') if(container) { // code to render map here... }