1. <Ian Nicoll/>'s Avatar
    Hello Ian

    Slight issue with this, it does not seem to update automatically ( the actual widget) last update shows as 22.36 GMT it is now 08.15 GMT. Would you know why this is( noticed the same on V4 of the 4day forecast Mod) only when I respring will it update!!!

    thanks
    Ok, I got to laugh about this because me and Dacal were so busy last week testing all errors on the GPS side, I guess we forgot to test the basics thanks for the info, since Dacal recoded this, I'm gonna wait and see if Dacal answers, if not I will go through the original vs Dacal's new code and see what's missing.
    2012-04-19 02:50 PM
  2. shamjosh's Avatar
    Ok, I got to laugh about this because me and Dacal were so busy last week testing all errors on the GPS side, I guess we forgot to test the basics thanks for the info, since Dacal recoded this, I'm gonna wait and see if Dacal answers, if not I will go through the original vs Dacal's new code and see what's missing.
    LOL
    just as an FYI ( not sure if it relates or not) but the All-in-one (non GPS widget) updates as it it should every 15 mins or so
    2012-04-19 02:56 PM
  3. Dacal's Avatar
    Ok, I got to laugh about this because me and Dacal were so busy last week testing all errors on the GPS side, I guess we forgot to test the basics thanks for the info, since Dacal recoded this, I'm gonna wait and see if Dacal answers, if not I will go through the original vs Dacal's new code and see what's missing.
    I test it now with a low interval time. I probably missed something... .

    I test it now with a low interval time. I probably missed something... .
    Seems to update fine on my phone... I DL V4 again to see.
    Last edited by Dacal; 2012-04-19 at 03:34 PM.


    My themes : Jade HD, Silex HD, BaSalt HD,ToPaz
    All are on Cydia and/or Theme It.
    2012-04-19 03:23 PM
  4. shamjosh's Avatar
    I test it now with a low interval time. I probably missed something... .



    Seems to update fine on my phone... I DL V4 again to see.
    Hello Dacal
    attached is screenshot UniAW5.0-img_0986.png

    thanks
    2012-04-19 03:44 PM
  5. Dacal's Avatar
    Hello Dacal
    attached is screenshot UniAW5.0-img_0986.png

    thanks
    OK. I saw, but not the problem on mine... Ian or someone else can try with a low interval time (1-2 minutes) to see ? Thx !


    My themes : Jade HD, Silex HD, BaSalt HD,ToPaz
    All are on Cydia and/or Theme It.
    2012-04-19 03:50 PM
  6. shamjosh's Avatar
    OK. I saw, but not the problem on mine... Ian or someone else can try with a low interval time (1-2 minutes) to see ? Thx !
    Hi Dacal

    Just tested it on mine again with a diff location.js file and it updates, (but shows my correct locations)

    The other location.js files updates correctly but does not show my location correctly it shows London ( which covers a very large area)

    ???

    file 1: this updates correctly but does not show my coirrect city only London:

    //-----------------------------------------------------------------------------------------------------------
    //-----------------------------------------------------------------------------------------------------------
    // Author : Vivek Thakur
    // Date : 25 Feb 2012
    //-----------------------------------------------------------------------------------------------------------
    //-----------------------------------------------------------------------------------------------------------
    // Modified by Dacal.
    //-----------------------------------------------------------------------------------------------------------
    //-----------------------------------------------------------------------------------------------------------

    var prevlatitude = "";
    var prevlongitude = "";
    var zipCode="";
    var woeid;
    var textLat;
    var textLong;
    var refreshWeatherTimer;

    function UpdateLocation() {
    refrechLocationTimer = setTimeout("UpdateLocation()", 20*1000);
    jQuery.get('/private/var/mobile/Documents/myLocation.txt', function(appdata) {
    //jQuery.get('myLocation.txt', function(appdata) {
    var myvar = appdata;
    var substr = appdata.split('\n');
    var templatitude=(substr[0]).split('=');
    var templongitude=(substr[1]).split('=');
    var latitude = $.trim(templatitude[1]);
    var longitude = $.trim(templongitude[1]);

    if (prevlatitude != latitude || prevlongitude != longitude) {

    clearTimeout(refreshWeatherTimer);
    clearTimeout(refreshWeatherTimerNormal);

    if (latitude < 0) { textLat = Math.round(latitude*100)/100 + "\u00B0" + "S"; }
    else if (latitude > 0){ textLat = Math.round(latitude*100)/100 + "\u00B0" + "N"; }
    else { textLat = Math.round(latitude*100)/100 + "\u00B0"; }

    if (longitude < 0) { textLong = Math.round(longitude*100)/100 + "\u00B0" + "W"; }
    else if (longitude > 0) { textLong = Math.round(longitude*100)/100 + "\u00B0" + "E"; }
    else { textLong = Math.round(longitude*100)/100 + "\u00B0"; }

    prevlatitude = latitude;
    prevlongitude = longitude;

    // Get the woeid for new location
    var url = "http://where.yahooapis.com/geocode?location=" + latitude + "+" + longitude + "&gflags=R&flags=J";
    $.getJSON(url, function(data) {
    woeid = data.ResultSet.Results[0].woeid;
    city = data.ResultSet.Results[0].city;

    // Get the old locale from woeid
    var url = "http://weather.yahooapis.com/forecastrss?w="+woeid+"&u=f";
    $.get(url, function(data) {
    title = $(data).find('title').text();
    if (title != "Yahoo! Weather - ErrorCity not found") {
    zipCode = $(data).find('guid').text().split('_')[0];
    city = $(data).find('location').attr('city'); //Add "//" at the start of this line to get City from geocode
    document.getElementById("city0").innerHTML = city;
    document.getElementById("city").style.display='non e';
    fetchWeatherData(dealWithWeather, zipCode);
    var refreshWeatherTimer = setInterval('fetchWeatherData(dealWithWeather, zipCode)', updateWeatherEvery); // Refresh weather as specified in config.js
    } else {
    if (zipCode == "") { validateWeatherLocation(escape(locale).replace(/^%u/g, "%"), setPostal); } // Back to locale, but keep the 20s refresh for GPS localization
    else { document.getElementById("city0").innerHTML = city; }
    }

    });

    });
    }
    }).error(function() {
    clearTimeout(refrechLocationTimer);
    validateWeatherLocation(escape(locale).replace(/^%u/g, "%"), setPostal);
    });

    }



    File2: Does NOT update correctly (but shows my city correct)

    //-----------------------------------------------------------------------------------------------------------
    //-----------------------------------------------------------------------------------------------------------
    // Author : Vivek Thakur
    // Date : 25 Feb 2012
    //-----------------------------------------------------------------------------------------------------------
    //-----------------------------------------------------------------------------------------------------------
    // Modified by Dacal for BaSalt HD theme.
    //-----------------------------------------------------------------------------------------------------------
    //-----------------------------------------------------------------------------------------------------------

    var prevlatitude = "";
    var prevlongitude = "";
    var woeid;
    var textLat;
    var textLong;

    function UpdateLocation() {
    jQuery.get('/private/var/mobile/Documents/myLocation.txt', function(appdata) {
    var myvar = appdata;
    var substr = appdata.split('\n');
    var templatitude=(substr[0]).split('=');
    var templongitude=(substr[1]).split('=');
    var latitude = $.trim(templatitude[1]);
    var longitude = $.trim(templongitude[1]);

    if (prevlatitude != latitude || prevlongitude != longitude) {
    var url = "http://where.yahooapis.com/geocode?location=" + latitude + "+" + longitude + "&gflags=R&flags=J";
    $.getJSON(url, function(data) {
    woeid = data.ResultSet.Results[0].woeid;
    city = data.ResultSet.Results[0].city;
    county = data.ResultSet.Results[0].county;
    neighborhood = data.ResultSet.Results[0].neighborhood;
    state = data.ResultSet.Results[0].state;
    if (latitude < 0) {

    textLat = Math.round(latitude*100)/100 + "\u00B0" + "S";
    }
    else if (latitude > 0){
    textLat = Math.round(latitude*100)/100 + "\u00B0" + "N";
    }
    else {
    textLat = Math.round(latitude*100)/100 + "\u00B0";
    }

    if (longitude < 0) {
    textLong = Math.round(longitude*100)/100 + "\u00B0" + "W";
    }
    else if (longitude > 0) {
    textLong = Math.round(longitude*100)/100 + "\u00B0" + "E";
    }
    else {
    textLong = Math.round(longitude*100)/100 + "\u00B0";
    }

    prevlatitude = latitude;
    prevlongitude = longitude;

    validateWeatherLocation(escape(woeid).replace(/^%u/g, "%"), setPostal);

    });
    }
    });
    }


    thanks
    2012-04-19 04:05 PM
  7. <Ian Nicoll/>'s Avatar
    Hi Dacal

    Just tested it on mine again with a diff location.js file and it updates, (but shows my correct locations)

    The other location.js files updates correctly but does not show my location correctly it shows London ( which covers a very large area)

    ???

    file 1: this updates correctly but does not show my coirrect city only London:

    //-----------------------------------------------------------------------------------------------------------
    //-----------------------------------------------------------------------------------------------------------
    // Author : Vivek Thakur
    // Date : 25 Feb 2012
    //-----------------------------------------------------------------------------------------------------------
    //-----------------------------------------------------------------------------------------------------------
    // Modified by Dacal.
    //-----------------------------------------------------------------------------------------------------------
    //-----------------------------------------------------------------------------------------------------------

    var prevlatitude = "";
    var prevlongitude = "";
    var zipCode="";
    var woeid;
    var textLat;
    var textLong;
    var refreshWeatherTimer;

    function UpdateLocation() {
    refrechLocationTimer = setTimeout("UpdateLocation()", 20*1000);
    jQuery.get('/private/var/mobile/Documents/myLocation.txt', function(appdata) {
    //jQuery.get('myLocation.txt', function(appdata) {
    var myvar = appdata;
    var substr = appdata.split('\n');
    var templatitude=(substr[0]).split('=');
    var templongitude=(substr[1]).split('=');
    var latitude = $.trim(templatitude[1]);
    var longitude = $.trim(templongitude[1]);

    if (prevlatitude != latitude || prevlongitude != longitude) {

    clearTimeout(refreshWeatherTimer);
    clearTimeout(refreshWeatherTimerNormal);

    if (latitude < 0) { textLat = Math.round(latitude*100)/100 + "\u00B0" + "S"; }
    else if (latitude > 0){ textLat = Math.round(latitude*100)/100 + "\u00B0" + "N"; }
    else { textLat = Math.round(latitude*100)/100 + "\u00B0"; }

    if (longitude < 0) { textLong = Math.round(longitude*100)/100 + "\u00B0" + "W"; }
    else if (longitude > 0) { textLong = Math.round(longitude*100)/100 + "\u00B0" + "E"; }
    else { textLong = Math.round(longitude*100)/100 + "\u00B0"; }

    prevlatitude = latitude;
    prevlongitude = longitude;

    // Get the woeid for new location
    var url = "http://where.yahooapis.com/geocode?location=" + latitude + "+" + longitude + "&gflags=R&flags=J";
    $.getJSON(url, function(data) {
    woeid = data.ResultSet.Results[0].woeid;
    city = data.ResultSet.Results[0].city;

    // Get the old locale from woeid
    var url = "http://weather.yahooapis.com/forecastrss?w="+woeid+"&u=f";
    $.get(url, function(data) {
    title = $(data).find('title').text();
    if (title != "Yahoo! Weather - ErrorCity not found") {
    zipCode = $(data).find('guid').text().split('_')[0];
    city = $(data).find('location').attr('city'); //Add "//" at the start of this line to get City from geocode
    document.getElementById("city0").innerHTML = city;
    document.getElementById("city").style.display='non e';
    fetchWeatherData(dealWithWeather, zipCode);
    var refreshWeatherTimer = setInterval('fetchWeatherData(dealWithWeather, zipCode)', updateWeatherEvery); // Refresh weather as specified in config.js
    } else {
    if (zipCode == "") { validateWeatherLocation(escape(locale).replace(/^%u/g, "%"), setPostal); } // Back to locale, but keep the 20s refresh for GPS localization
    else { document.getElementById("city0").innerHTML = city; }
    }

    });

    });
    }
    }).error(function() {
    clearTimeout(refrechLocationTimer);
    validateWeatherLocation(escape(locale).replace(/^%u/g, "%"), setPostal);
    });

    }



    File2: Does NOT update correctly (but shows my city correct)

    //-----------------------------------------------------------------------------------------------------------
    //-----------------------------------------------------------------------------------------------------------
    // Author : Vivek Thakur
    // Date : 25 Feb 2012
    //-----------------------------------------------------------------------------------------------------------
    //-----------------------------------------------------------------------------------------------------------
    // Modified by Dacal for BaSalt HD theme.
    //-----------------------------------------------------------------------------------------------------------
    //-----------------------------------------------------------------------------------------------------------

    var prevlatitude = "";
    var prevlongitude = "";
    var woeid;
    var textLat;
    var textLong;

    function UpdateLocation() {
    jQuery.get('/private/var/mobile/Documents/myLocation.txt', function(appdata) {
    var myvar = appdata;
    var substr = appdata.split('\n');
    var templatitude=(substr[0]).split('=');
    var templongitude=(substr[1]).split('=');
    var latitude = $.trim(templatitude[1]);
    var longitude = $.trim(templongitude[1]);

    if (prevlatitude != latitude || prevlongitude != longitude) {
    var url = "http://where.yahooapis.com/geocode?location=" + latitude + "+" + longitude + "&gflags=R&flags=J";
    $.getJSON(url, function(data) {
    woeid = data.ResultSet.Results[0].woeid;
    city = data.ResultSet.Results[0].city;
    county = data.ResultSet.Results[0].county;
    neighborhood = data.ResultSet.Results[0].neighborhood;
    state = data.ResultSet.Results[0].state;
    if (latitude < 0) {

    textLat = Math.round(latitude*100)/100 + "\u00B0" + "S";
    }
    else if (latitude > 0){
    textLat = Math.round(latitude*100)/100 + "\u00B0" + "N";
    }
    else {
    textLat = Math.round(latitude*100)/100 + "\u00B0";
    }

    if (longitude < 0) {
    textLong = Math.round(longitude*100)/100 + "\u00B0" + "W";
    }
    else if (longitude > 0) {
    textLong = Math.round(longitude*100)/100 + "\u00B0" + "E";
    }
    else {
    textLong = Math.round(longitude*100)/100 + "\u00B0";
    }

    prevlatitude = latitude;
    prevlongitude = longitude;

    validateWeatherLocation(escape(woeid).replace(/^%u/g, "%"), setPostal);

    });
    }
    });
    }


    thanks
    Josh, I tested it and all is good with the original V4, you never told me you were using a different .js file!!

    So as per Dacal's advise a week ago, use the first one with the small edit like below (the two green slashes added to just before the line in red, this disables this line and should give you your correct City name.

    @ Dacal, thanks for looking M8, sorry to waist your time.

    var prevlatitude = "";
    var prevlongitude = "";
    var zipCode="";
    var woeid;
    var textLat;
    var textLong;
    var refreshWeatherTimer;

    function UpdateLocation() {
    refrechLocationTimer = setTimeout("UpdateLocation()", 20*1000);
    jQuery.get('file:///private/var/mobile/Documents/myLocation.txt', function(appdata) {
    //jQuery.get('myLocation.txt', function(appdata) {
    var myvar = appdata;
    var substr = appdata.split('\n');
    var templatitude=(substr[0]).split('=');
    var templongitude=(substr[1]).split('=');
    var latitude = $.trim(templatitude[1]);
    var longitude = $.trim(templongitude[1]);

    if (prevlatitude != latitude || prevlongitude != longitude) {

    clearTimeout(refreshWeatherTimer);
    clearTimeout(refreshWeatherTimerNormal);

    if (latitude < 0) { textLat = Math.round(latitude*100)/100 + "\u00B0" + "S"; }
    else if (latitude > 0){ textLat = Math.round(latitude*100)/100 + "\u00B0" + "N"; }
    else { textLat = Math.round(latitude*100)/100 + "\u00B0"; }

    if (longitude < 0) { textLong = Math.round(longitude*100)/100 + "\u00B0" + "W"; }
    else if (longitude > 0) { textLong = Math.round(longitude*100)/100 + "\u00B0" + "E"; }
    else { textLong = Math.round(longitude*100)/100 + "\u00B0"; }

    prevlatitude = latitude;
    prevlongitude = longitude;

    // Get the woeid for new location
    var url = "http://where.yahooapis.com/geocode?location=" + latitude + "+" + longitude + "&gflags=R&flags=J";
    $.getJSON(url, function(data) {
    woeid = data.ResultSet.Results[0].woeid;
    city = data.ResultSet.Results[0].city;

    // Get the old locale from woeid
    var url = "http://weather.yahooapis.com/forecastrss?w="+woeid+"&u=f";
    $.get(url, function(data) {
    title = $(data).find('title').text();
    if (title != "Yahoo! Weather - ErrorCity not found") {
    zipCode = $(data).find('guid').text().split('_')[0];
    //city = $(data).find('location').attr('city');
    document.getElementById("city0").innerHTML = city;
    document.getElementById("city").style.display='non e';
    fetchWeatherData(dealWithWeather, zipCode);
    var refreshWeatherTimer = setInterval('fetchWeatherData(dealWithWeather, zipCode)', updateWeatherEvery); // Refresh weather as specified in config.js
    } else {
    if (zipCode == "") { validateWeatherLocation(escape(locale).replace(/^%u/g, "%"), setPostal); } // Back to locale, but keep the 20s refresh for GPS localization
    else { document.getElementById("city0").innerHTML = city; }
    }

    });

    });
    }
    }).error(function() {
    clearTimeout(refrechLocationTimer);
    validateWeatherLocation(escape(locale).replace(/^%u/g, "%"), setPostal);
    });

    }
    Last edited by <Ian Nicoll/>; 2012-04-19 at 04:29 PM.
    2012-04-19 04:20 PM
  8. shamjosh's Avatar
    sincere apology trying to be toooooooooo clever
    2012-04-19 04:26 PM
  9. Dacal's Avatar
    sincere apology trying to be toooooooooo clever
    LMAO ! Not so useless, in fact i found a bug if you don't use GPS mod (or set to false in Config.js). You need to edit uniAW.js and replace a line in the weatherRefresherTemp() function (red below) :

    function weatherRefresherTemp(zip){
    fetchWeatherData(dealWithWeather, zip);
    var refreshWeatherTimerNormal = setTimeout('weatherRefresherTemp(zip)', updateWeatherEvery);
    }

    Ian, not really a V5, but i think you must update the package
    Last edited by Dacal; 2012-04-19 at 05:19 PM.


    My themes : Jade HD, Silex HD, BaSalt HD,ToPaz
    All are on Cydia and/or Theme It.
    2012-04-19 05:12 PM
  10. <Ian Nicoll/>'s Avatar
    Funny thing this UniAW, although it's been around for a couple of years now, it's always a "Work in Progress"

    @ Josh, no problem pal, at least we got something fixed!
    Last edited by <Ian Nicoll/>; 2012-04-19 at 05:45 PM.
    2012-04-19 05:43 PM
  11. jlhardwick's Avatar
    Ian,

    New guy here.. I think this project is making fantastic progress with everyone's help.
    I have a problem where I changed V4 to work as my lockscreen but as you can see by the image it's shrinking the screen so that there is a blank section down the right. Any help would be great.

    Attachment 580991
    2012-04-19 09:36 PM
  12. Dacal's Avatar
    Ian,

    New guy here.. I think this project is making fantastic progress with everyone's help.
    I have a problem where I changed V4 to work as my lockscreen but as you can see by the image it's shrinking the screen so that there is a blank section down the right. Any help would be great.

    Attachment 580991
    Look for 2 solutions here : http://modmyi.com/forums/iphone-4-ne...ml#post6487174


    My themes : Jade HD, Silex HD, BaSalt HD,ToPaz
    All are on Cydia and/or Theme It.
    2012-04-19 09:42 PM
  13. jlhardwick's Avatar

    Dacal,

    Thanks for the quick reply.. Your link got me the answer to the problem and it's working great now.
    2012-04-19 10:03 PM
  14. briscr19's Avatar
    Special thanks to Dacal, Ian nicoll, Subywrex, Durben, and schnedi and everyone else!

    2012-04-20 08:11 PM
  15. nik1975's Avatar
    Special thanks to Dacal, Ian nicoll, Subywrex, Durben, and schnedi and everyone else!

    Wow man this is super!!!Will you share it ?
    Thanks!!
    2012-04-20 08:30 PM
  16. Mokabaer's Avatar
    Special thanks to Dacal, Ian nicoll, Subywrex, Durben, and schnedi and everyone else!

    Will you share it!!!!!!!!!!
    2012-04-20 08:50 PM
  17. briscr19's Avatar
    Wow man this is super!!!Will you share it ?
    Thanks!!
    Enjoy!
    2012-04-20 10:42 PM
  18. celeron's Avatar
    Nice one^
    If my post was good, click the button in my post

    New to jailbreaking? Have a look at my Redsn0w Guide
    2012-04-20 10:59 PM
  19. nik1975's Avatar
    Thank you man!!Very quickly!!
    2012-04-20 11:03 PM
  20. idle0095's Avatar
    I like the hd weather in the uniaw. Is that coming to the uniaw 5.0 gps?

    On another note. How's the flip clock uni coming Ian?

    How do I take the uniaw weather images from this lock screen and put them in the per page flip clock uniaw 4 day forecast springboard theme?
    Last edited by idle0095; 2012-04-21 at 03:51 AM.
    2012-04-21 03:27 AM
3,236 ... 46869495969798106146 ...
LINK TO POST COPIED TO CLIPBOARD