在iPhone中从纬度和经度获取当前位置的天气(Getting the weather in current location from Latitude and Longitude in iPhon

编程入门 行业动态 更新时间:2024-10-27 13:34:19
在iPhone中从纬度和经度获取当前位置的天气(Getting the weather in current location from Latitude and Longitude in iPhone)

我有当前位置纬度[17.382042000000000000]和经度[78.481727299999990000].

有没有办法根据这些纬度和经度找出天气? 是否有任何第三方免费API可根据这些值查找天气? 任何人都可以为我提供一些针对此问题的指南或网址吗?

I have current location Latitude[17.382042000000000000] and Longitude[78.481727299999990000].

Is there any way find out the weather based on these Latitude and Longitude? Is there any third party free APIs for finding the weather based on these values? Can any one provide me some guidelines or URLs for this problem?

最满意答案

您可以使用以下URL。 根据您的要求更改纬度和经度。

http://api.wunderground.com/auto/wui/geo/GeoLookupXML /index.xml?query=17.3820420000000000006,78.48172729999999000

要获取当前天气状况,您可以使用以下API端点。 您必须从他们的站点生成API密钥。 - http://www.wunderground.com/weather/api

这是终点: http : //api.wunderground.com/api/API_KEY/conditions/forecast/alert/q/17.382042000000000000,78.48172729999999000.json

从您生成的API密钥替换API_KEY。

You can use the following URL. Change Latitude and Longitude based on your requirement.

http://api.wunderground.com/auto/wui/geo/GeoLookupXML /index.xml?query=17.3820420000000000006,78.48172729999999000

To get the current weather condition you can use the following API endpoint. The only thing you have to Generate API key from their site. - http://www.wunderground.com/weather/api

Here is the endpoint : http://api.wunderground.com/api/API_KEY/conditions/forecast/alert/q/17.382042000000000000,78.48172729999999000.json

Replace the API_KEY from you generated API key.

更多推荐

本文发布于:2023-04-27 11:11:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1327112.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:经度   当前位置   纬度   天气   iPhone

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!