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

395
Views
TypeError no capturado: no se pudo obtener

Editar: lo arreglé, la respuesta está en la sección de respuestas.

He intentado crear una aplicación meteorológica y me he topado con un error. Trato de obtener de la API que estoy usando, que es openweathermap.org, sé que la dirección que estoy obteniendo es correcta porque cuando la abro en mi navegador, se carga el .json. Estoy confundido acerca de por qué no se puede recuperar.

Aquí está mi código

 <html> <body> <button onclick="getLocation()">Try It</button> <p id="demo"></p> <script> var x = document.getElementById("demo"); function getLocation() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(showPosition); } else { x.innerHTML = "Geolocation is not supported by this browser."; } } function showPosition(position) { const lat = position.coords.latitude const lon = position.coords.longitude console.log(lat,lon) const API = "Im using open" fetch("api.openweathermap.org/data/2.5/weather?lat="+ lat +"&lon="+ lon +"&appid="+ API) } </script> </body> </html>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Me acabo de dar cuenta de que no tenía "https://" al comienzo de mi recuperación.

about 4 years ago · Juan Pablo Isaza Report
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!