Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

162
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda