JavaScript: Trying to find near tourist attractions, program isn’t using current location but seemingly random location

So I’ve been trying to make a program that shows you near tourist attractions. The problem I am encountering is that the program is showing me seemingly random attractions, in complete disregard for my current location and the entered radius. I think that the problem should lie in the following code:

function getNearbyPlaces(position) {
console.log(position + "##############################");
request = {
   location: position,
   radius: '300',
   query: ['tourist_attraction']
};
service = new google.maps.places.PlacesService(map);
service.textSearch(request, callback);

I’d love some ideas on how to solve this issue and how to get this code working. Be aware I am pretty new to JavaScript!