Imgshow Platform provides simple weather information via geographical points (latitude, longtitude) that gathered from various source including Yahoo Weather. It provides a quick way to retrieve the basic weather information in JSON data format or in a descriptive format in text.
To retrieve weather info in JSON:
[imgshow]q:name=weather,lat=x,lng=y,display=info[/imgshow]
[imgshow q:name=weather,lat=x,lng=y,display=info]
<?php
require_once 'class_imgshow.php';
$img = new imgshow();
echo $img->name('weather')->p('lat', 'x')->p('lng', 'y')->p('display', 'info')->load();
?>
var imgshow = require('imgshow');
imgshow().name('weather').p('lat', 'x').p('lng', 'y').p('display', 'info').load(function(result) {
console.log(result);
});
var imgshow = require('./imgshow.js');
var win = Ti.UI.createWindow({title:'Imgshow Client'});
var btn = Ti.UI.createButton({left:5,top:5,right:5,bottom:5,title:'Show Me Result'});
btn.addEventListener('click', function() {
imgshow().name('weather').p('lat', 'x').p('lng', 'y').p('display', 'info').load(function(result) {
alert(result);
});
});
include('imgshow.js');
if(session.ready()) {
session.answer();
util.say('Please hold while we querying');
imgshow().name('weather').p('lat', 'x').p('lng', 'y').p('display', 'info').load(function(message) {
util.say('the result is ' + message);
});
}
Visit Imgshow API Github Page for more information
To retrieve weather info in Label:
[imgshow]q:name=weather,lat=x,lng=y,display=label[/imgshow]
[imgshow q:name=weather,lat=x,lng=y,display=label]
<?php
require_once 'class_imgshow.php';
$img = new imgshow();
echo $img->name('weather')->p('lat', 'x')->p('lng', 'y')->p('display', 'label')->load();
?>
var imgshow = require('imgshow');
imgshow().name('weather').p('lat', 'x').p('lng', 'y').p('display', 'label').load(function(result) {
console.log(result);
});
var imgshow = require('./imgshow.js');
var win = Ti.UI.createWindow({title:'Imgshow Client'});
var btn = Ti.UI.createButton({left:5,top:5,right:5,bottom:5,title:'Show Me Result'});
btn.addEventListener('click', function() {
imgshow().name('weather').p('lat', 'x').p('lng', 'y').p('display', 'label').load(function(result) {
alert(result);
});
});
include('imgshow.js');
if(session.ready()) {
session.answer();
util.say('Please hold while we querying');
imgshow().name('weather').p('lat', 'x').p('lng', 'y').p('display', 'label').load(function(message) {
util.say('the result is ' + message);
});
}
Visit Imgshow API Github Page for more information
It is now very common and easy to get the latitude and longtitude of the user location by using Geolocation API in HTML5 page or any equivalent API. Then you can get the weather of the user location by passing in the latitude and longtitude to Imgshow API and get the result you want.