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

324
Views
¿Cómo soluciono este error que recibo en mi API meteorológica, 404?

Tengo este código que usa thezipcodes.net para obtener la latitud y la longitud y luego lo pasa a través de api.weather.gov para obtener el clima. El problema es que está metiendo la pata en el área donde obtiene los puntos en la API de weather.gov.

En getweatherforecaststuff() devuelve un error 404 e intenta establecer el final en 0,0 .

 let lat = 0; let long = 0; let forecaststring = ""; function getLat(zipcode) { //add code here to get from api $.getJSON("https://thezipcodes.com/api/v1/search?zipCode=" + zipcode + "&countryCode=US&apiKey=01f2f327b789845bddf7d617257d8f76", function(data) { lat = data["location"][0]["latitude"]; long = data["location"][0]["longitude"]; }); } function getWeatherForecastStuff() { $.getJSON("https://api.weather.gov/points/" + lat + "," + long + "", function(data) { forecaststring = data["properties"]["forecast"]; }); } function printStuff(forecaststrings) { $.getJSON(forecaststrings, function(data) { console.log(data); }); } function getInfoNeeded() { zipcode = window.prompt("What is your zipcode?"); getLat(parseInt(zipcode)); getWeatherForecastStuff() printStuff(forecaststring) }
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!