Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

163
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda