Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

167
Views
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!

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!