google api para obter infromação meteorológica

Author: John Slegers, 2013-01-31

4 answers

O Google termina permanentemente a API meteorológica...

Em alternativa, pode utilizar:

  1. Wunderground API
  2. API do Yahoo
 4
Author: kukat, 2013-01-31 04:55:25
Olá arundhati, já Pesquisaste no Google? eu só pesquisei no google e encontrei a melhor resposta de: - [[2]}

Incluindo informação meteorológica, App iPhone, API meteorológica

Procura a melhor API meteorológica,

Leia o tutorial do blog com o código de exemplo de

Adicionar as condições meteorológicas locais à sua aplicação (Parte 2/2: aceder à API meteorológica XML do Google)

Integração de informações meteorológicas em iphone

Espero que te ajude. :)

Esta é uma demonstração de Weather API iphone

Https://github.com/elc/ICB_LocalWeather

enter image description here

API meteorológica subterrânea

Exemplo: http://api.wunderground.com/auto/wui/geo/GeoLookupXML/index.xml?query=90210

 3
Author: Nitin Gohel, 2017-05-23 11:45:15

A melhor API meteorológica é aqui.

A resposta JSON da amostra é a seguinte:

{
  "response": {
  "version": "0.1",
  "termsofService": "http://www.wunderground.com/weather/api/d/terms.html",
  "features": {
  "conditions": 1
  }
  },
  "current_observation": {
  "image": {
  "url": "http://icons-ak.wxug.com/graphics/wu2/logo_130x80.png",
  "title": "Weather Underground",
  "link": "http://www.wunderground.com"
  },
  "display_location": {
  "full": "San Francisco, CA",
  "city": "San Francisco",
  "state": "CA",
  "state_name": "California",
  "country": "US",
  "country_iso3166": "US",
  "zip": "94101",
  "latitude": "37.77500916",
  "longitude": "-122.41825867",
  "elevation": "47.00000000"
  },
  "observation_location": {
  "full": "SOMA - Near Van Ness, San Francisco, California",
  "city": "SOMA - Near Van Ness, San Francisco",
  "state": "California",
  "country": "US",
  "country_iso3166": "US",
  "latitude": "37.773285",
  "longitude": "-122.417725",
  "elevation": "49 ft"
  },
  "estimated": {},
  "station_id": "KCASANFR58",
  "observation_time": "Last Updated on June 27, 5:27 PM PDT",
  "observation_time_rfc822": "Wed, 27 Jun 2012 17:27:13 -0700",
  "observation_epoch": "1340843233",
  "local_time_rfc822": "Wed, 27 Jun 2012 17:27:14 -0700",
  "local_epoch": "1340843234",
  "local_tz_short": "PDT",
  "local_tz_long": "America/Los_Angeles",
  "local_tz_offset": "-0700",
  "weather": "Partly Cloudy",
  "temperature_string": "66.3 F (19.1 C)",
  "temp_f": 66.3,
  "temp_c": 19.1,
  "relative_humidity": "65%",
  "wind_string": "From the NNW at 22.0 MPH Gusting to 28.0 MPH",
  "wind_dir": "NNW",
  "wind_degrees": 346,
  "wind_mph": 22.0,
  "wind_gust_mph": "28.0",
  "wind_kph": 35.4,
  "wind_gust_kph": "45.1",
  "pressure_mb": "1013",
  "pressure_in": "29.93",
  "pressure_trend": "+",
  "dewpoint_string": "54 F (12 C)",
  "dewpoint_f": 54,
  "dewpoint_c": 12,
  "heat_index_string": "NA",
  "heat_index_f": "NA",
  "heat_index_c": "NA",
  "windchill_string": "NA",
  "windchill_f": "NA",
  "windchill_c": "NA",
  "feelslike_string": "66.3 F (19.1 C)",
  "feelslike_f": "66.3",
  "feelslike_c": "19.1",
  "visibility_mi": "10.0",
  "visibility_km": "16.1",
  "solarradiation": "",
  "UV": "5",
  "precip_1hr_string": "0.00 in ( 0 mm)",
  "precip_1hr_in": "0.00",
  "precip_1hr_metric": " 0",
  "precip_today_string": "0.00 in (0 mm)",
  "precip_today_in": "0.00",
  "precip_today_metric": "0",
  "icon": "partlycloudy",
  "icon_url": "http://icons-ak.wxug.com/i/c/k/partlycloudy.gif",
  "forecast_url": "http://www.wunderground.com/US/CA/San_Francisco.html",
  "history_url": "http://www.wunderground.com/history/airport/KCASANFR58/2012/6/27/DailyHistory.html",
  "ob_url": "http://www.wunderground.com/cgi-bin/findweather/getForecast?query=37.773285,-122.417725"
  }
}
 2
Author: Bhushan Firake, 2013-01-31 04:54:36
A API do Google Weather está em baixo. Confira as seguintes alternativas:

Abrir O Mapa Meteorológico

Previsão Digital Nacional

Weather.com

Tenho usado o primeiro link. É livre como mapas de rua aberta.

Editar:

Aqui está o código básico para obter o JSON.
NSError *error = nil;
NSData *jsonData = [NSData dataWithContentsOfURL:[NSURL URLWithString:@"http://openweathermap.org/data/2.1/find/city?lat=32.85190&lon=57.65878&cnt=1&type=JSON"]];

if (jsonData) {

    id jsonObjects = [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableContainers error:&error];

    if (error) {
        NSLog(@"error is %@", [error localizedDescription]);

        // Handle Error and return
        return;

    }

    NSArray *keys = [jsonObjects allKeys];
    // values in foreach loopDic]
    for (NSString *key in keys) {
        NSLog(@"%@ is %@",key, [jsonObjects objectForKey:key]);
    }


} else {
    // Handle Error
}

Adicione isso ao viewDidLoad

 2
Author: Anil, 2013-01-31 06:51:56