Adding geolocation

Hi i am following one of the examples from tomtom blog which is “Exploring Detailed POI Data with the TomTom Search API” in this tutorial a position has been added where manually it requires to insert lat and long of a place. i want to replace it to geolocation where it auto detects the users location (ask permission) and then display POI. since i am new to it it would be very helpful if anyone can help how can i add geolocation to it.

OK and what is giving the location? Android, iOS or the browser?

Re: from the browser

There is an example with user location: Map examples | Maps SDK Web JS v6
Just click on hamburger menu and select Search and geocodingMy location