某サイトに、天気予報としてworldweatheronlineのAPIつこうてみる。 ↑こんなん感じ 他にもAPIを数種類つかってるけど、認証関係や返される形式の都合でPHPに処理してもらってた。 今回は特に障害もなさげだったので定番(らしい)のjquery(ajax)でjson処理することに。 使ったのはhttp://www.worldweatheronline.com/ 無料だったのと、リファレンス関係あったからなんとなく。 ドキュメントはhttp://developer.worldweatheronline.com/documentation あたりご確認願います。 で、以下みたいなので動いたり。 $.ajax({ url: "http://api.worldweatheronline.com/free/v1/weather.ashx?q=緯度経度とか&format=json&num
![jsonをjquery(ajax)で取得→表示](https://cdn-ak-scissors.b.st-hatena.com/image/square/8d71ff5111e05619a10d29bb40d7aebaa75c8fbc/height=288;version=1;width=512/https%3A%2F%2Fs0.wp.com%2Fi%2Fblank.jpg)