我一直在尝试创建一个应用程序,它读取手机的经度和纬度,并形成一个雅虎查询来获取woeid,但只有一些位置可以检索,一些返回null。
我的问题:有没有办法使用范围检测位置并将雅虎天气读数返回到手机?
仅供参考,该地点将在新加坡使用。
更新
我继续使用另一个返回json的数据源,但我很新,有人对检索第一组数据有任何建议。
{"objects": [{"weather": {"status": "rainy", "measured": {"temperature": 299.0, "humidity": 94}}, "location": {"country": "sg", "locality": "Singapore"}, "timestamp": "2014-06-05T11:14:50.363156", "sun_altitude": -0.023066939786076546, "geo": {"type": "Point", "coordinates": [103.955007, 1.339955]}, "icon": "https://api.metwit.com/v2/icons/rainy"}, {"sources": ["meteoblue"], "weather": {"status": "stormy", "measured": {"wind_speed": 5, "wind_direction": 230, "temperature": 303, "humidity": 70}}, "location": {"country": "sg", "locality": "Singapore"}, "timestamp": "2014-06-05T12:00:00", "sun_altitude": -0.2204749584197998, "geo": {"type": "Point", "coordinates": [103.88671875, 1.318359375]}, "icon": "https://api.metwit.com/v2/icons/stormy"}, {"sources": ["meteoblue"], "weather": {"status": "stormy", "measured": {"wind_speed": 4, "wind_direction": 230, "temperature": 300, "humidity": 75}}, "location": {"country": "sg", "locality": "Singapore"}, "timestamp": "2014-06-05T15:00:00", "sun_altitude": -0.9020349979400635, "geo": {"type": "Point", "coordinates": [103.88671875, 1.318359375]}, "icon": "https://api.metwit.com/v2/icons/stormy"}, {"sources": ["meteoblue"], "weather": {"status": "stormy", "measured": {"wind_speed": 3, "wind_direction": 180, "temperature": 300, "humidity": 78}}, "location": {"country": "sg", "locality": "Singapore"}, "timestamp": "2014-06-05T18:00:00", "sun_altitude": -1.0881742238998413, "geo": {"type": "Point", "coordinates": [103.88671875, 1.318359375]}, "icon": "https://api.metwit.com/v2/icons/stormy"}, {"sources": ["meteoblue"], "weather": {"status": "foggy", "measured": {"wind_speed": 3, "wind_direction": 180, "temperature": 299, "humidity": 95}}, "location": {"country": "sg", "locality": "Singapore"}, "timestamp": "2014-06-05T21:00:00", "sun_altitude": -0.48149800300598145, "geo": {"type": "Point", "coordinates": [103.88671875, 1.318359375]}, "icon": "https://api.metwit.com/v2/icons/foggy"}, {"sources": ["weather2", "meteoblue"], "weather": {"status": "stormy", "measured": {"wind_speed": 4, "wind_direction": 200, "temperature": 301, "humidity": 97}}, "location": {"country": "sg", "locality": "Singapore"}, "timestamp": "2014-06-06T03:00:00", "sun_altitude": 0.9304330348968506, "geo": {"type": "Point", "coordinates": [103.88671875, 1.318359375]}, "icon": "https://api.metwit.com/v2/icons/stormy"}, {"sources": ["weather2", "meteoblue"], "weather": {"status": "stormy", "measured": {"wind_speed": 5, "wind_direction": 200, "temperature": 303, "humidity": 86}}, "location": {"country": "sg", "locality": "Singapore"}, "timestamp": "2014-06-06T09:00:00", "sun_altitude": 0.502163827419281, "geo": {"type": "Point", "coordinates": [103.88671875, 1.318359375]}, "icon": "https://api.metwit.com/v2/icons/stormy"}, {"sources": ["weather2", "meteoblue"], "weather": {"status": "cloudy", "measured": {"wind_speed": 2, "wind_direction": 150, "temperature": 301, "humidity": 97}}, "location": {"country": "sg", "locality": "Singapore"}, "timestamp": "2014-06-06T21:00:00", "sun_altitude": -0.48176679015159607, "geo": {"type": "Point", "coordinates": [103.88671875, 1.318359375]}, "icon": "https://api.metwit.com/v2/icons/cloudy"}, {"sources": ["weather2", "meteoblue"], "weather": {"status": "stormy", "measured": {"wind_speed": 4, "wind_direction": 220, "temperature": 303, "humidity": 86}}, "location": {"country": "sg", "locality": "Singapore"}, "timestamp": "2014-06-07T09:00:00", "sun_altitude": 0.502541184425354, "geo": {"type": "Point", "coordinates": [103.88671875, 1.318359375]}, "icon": "https://api.metwit.com/v2/icons/stormy"}, {"sources": ["weather2", "meteoblue"], "weather": {"status": "stormy", "measured": {"wind_speed": 3, "wind_direction": 170, "temperature": 301, "humidity": 98}}, "location": {"country": "sg", "locality": "Singapore"}, "timestamp": "2014-06-07T21:00:00", "sun_altitude": -0.48207923769950867, "geo": {"type": "Point", "coordinates": [103.88671875, 1.318359375]}, "icon": "https://api.metwit.com/v2/icons/stormy"}, {"sources": ["meteoblue"], "weather": {"status": "stormy", "measured": {"wind_speed": 4, "wind_direction": 180, "temperature": 302, "humidity": 84}}, "location": {"country": "sg", "locality": "Singapore"}, "timestamp": "2014-06-08T09:00:00", "sun_altitude": 0.5029566287994385, "geo": {"type": "Point", "coordinates": [103.88671875, 1.318359375]}, "icon": "https://api.metwit.com/v2/icons/stormy"}], "meta": {}}