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
how to open google map app inside getCurrentLocation() function in javascript?

I am trying to open google map app by giving coordinates of start and end point for the start point I need to get current position of user which comes with promise function getCurrentLocation() which problem is when I try to open app inside this promise function it cant be open but I can not get those current coordinats outside of that promise function

  let lat = 0;
      let long = 0;
await navigator.geolocation.getCurrentPosition((position)=>{

           lat = position.coords.latitude;
           long = position.coords.longitude;

let options = {
  start: `${lat},${long}`,
  app: LaunchNavigator.APP.GOOGLE_MAPS
}

LaunchNavigator.navigate([address.latitude, address.longitude], options)
  .then(
    success => console.log('Launched navigator',success),
    error => console.log('Error launching navigator', error)
  );
});
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!