User Tag List

  1. <Ian Nicoll/>'s Avatar

    Ian, uninstall the app however you installed it and download the EPHDiOS5_GPS_Weather
    It will install the app and the EPHD GPS Weather theme.

    Perfectly safe. There have multiple downloads with no issue. Two people only have a problem with info displaying.

    Then you'll have the same deb installed as Chevy, schnedi, and I.

    BTW Ian, enjoy EPHD. It's awesome. Super clean theme
    If you haven't yet, try my EPHDiOS5 iNteractive SS LS
    Just a sideshow, nothing too fancy. Touching center pic makes it go back a pic each time it's touched.
    Okay, I did it, and no issues whatsoever, all I had to do to get the UniAW (PerPage version) was change the link to:

    jQuery.get('/private/var/mobile/Documents/myLocation.txt', function(appdata) { (thanks rasputin)

    One thing I notice now, in the Documents folder I have the "mylocation.txt" AND the "locationPath.txt" file, with the symlink you just have the one file, don't know if thats why it wasn't updating or not, will have to wait till I go to work tomorrow to find out.

    Thanks for this pal, everything seems good now and were all on the same page.

    Looking forward to trying EPHD but no time yet!

    @ Chevy, will let you know if it is autoupdating tomorrow M8. Or we see if Dacal finds something, but if it's updating for "The_D" maybe hid deb did the trick!

    3:30AM here, tomorrow all.
    Last edited by <Ian Nicoll/>; 2012-03-07 at 07:36 PM.
    2012-03-07 07:30 PM
  2. The_Durben's Avatar
    Okay, I did it, and no issues whatsoever, all I had to do to get the UniAW (PerPage version) was change the link to:

    jQuery.get('/private/var/mobile/Documents/myLocation.txt', function(appdata) { (thanks rasputin)

    One thing I notice now, in the Documents folder I have the "mylocation.txt" AND the "locationPath.txt" file, with the symlink you just have the one file, don't know if thats why it wasn't updating or not, will have to wait till I go to work tomorrow to find out.

    Thanks for this pal, everything seems good now and were all on the same page.

    Looking forward to trying EPHD but no time yet!

    @ Chevy, will let you know if it is autoupdating tomorrow M8. Or we see if Dacal finds something, but if it's updating for "The_D" maybe hid deb did the trick!

    3:30AM here, tomorrow all.
    No worries Ian. Glad you're sorted!
    I changed my path to that one by rasputin as well to see although I had it working with my original path as well
    I also have locationPath.txt but all it does is keep a log of the MyLocation app use. Shows info for start time of Sig.Change, when new info is grabbed ect.
    I delete it and it comes back on activating the app again.
    It apparently does not have anything to do with the overall function as after deleting it, everything still works.

    Good night my friend and thanks again for all the advice, files ect! Always appreciated

    Edit** Just noticed my uniaw was working but someone I sent to to test didn't have the animated weather or description show.
    I replaced the uniaw5.html with yours and mine still worked but I see an extra div for "chill"
    What is this calling for? I didn't place it in the CSS but still working.
    Last edited by The_Durben; 2012-03-07 at 08:36 PM.
    2012-03-07 07:58 PM
  3. Dacal's Avatar
    Hi @ll,

    I rework the code a little (as i don't know jQuery, i replace with some classic AJAX functions, for me it's more easy to integrate). Here is my main code for the GetLocation_weather.js :

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

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

    function trimString (text) {
    return text.replace(/^\s+/g,'').replace(/\s+$/g,'');
    }

    function UpdateLocation() {
    var file="../../../../var/mobile/Documents/myLocation.txt";
    var txt_request = new XMLHttpRequest();
    txt_request.overrideMimeType("text/xml");
    var LocationTimer = setTimeout(function() {
    txt_request.abort();
    dealWithWeather({error:true});
    }, 10000);
    txt_request.onload = function(e) {
    clearTimeout(LocationTimer);
    getCoordinates(txt_request.responseText);
    }
    txt_request.open("GET", file, false);
    txt_request.setRequestHeader("Cache-Control", "no-cache");
    txt_request.send(null);
    setTimeout("UpdateLocation();", updateWeatherEvery); // Refresh location
    }

    function getCoordinates(request) {
    var substr = request.split('\n');
    var templatitude=(substr[0]).split('=');
    var templongitude=(substr[1]).split('=');
    latitude = trimString(templatitude[1]);
    longitude = trimString(templongitude[1]);

    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"; }

    if (prevlatitude != latitude || prevlongitude != longitude) {
    getWoeid ();
    prevlatitude = latitude;
    prevlongitude = longitude;
    }
    else {
    fetchWeatherData(dealWithWeather,postal);
    }
    }

    function getWoeid() {
    var url = "http://where.yahooapis.com/geocode?location=" + latitude + "+" + longitude + "&gflags=R";
    var xml_request = new XMLHttpRequest();
    var WoeidTimer = setTimeout(function() {
    xml_request.abort();
    if (get_location == true) { document.getElementById("Offline").innerHTML = "Offline"; }
    else { dealWithWeather({error:true, errorString:null}); }
    }, 10000);
    xml_request.onload = function(e) {
    clearTimeout(WoeidTimer);
    woeid_loaded(xml_request);
    }
    xml_request.overrideMimeType("text/xml");
    xml_request.open("GET", url+"&antiCache="+Math.floor(Math.random()*1001), false);
    xml_request.setRequestHeader("Cache-Control", "no-cache");
    xml_request.send(null);
    }

    function woeid_loaded(request) {
    get_location = true;
    var effectiveRoot = findChild(request.responseXML, "ResultSet");
    postal = parseInt(findChild(effectiveRoot, "Result").getElementsByTagName("woeid")[0].childNodes[0].nodeValue);
    fetchWeatherData(dealWithWeather,postal);
    }

    @ll contributor (crazyvivek, Durben, Ian,...) : sorry, but few time to code at the moment. If you want the complete theme to see how it work, i can give you a link (=> PM).

    Oups, forget to update the weather if location don't change. I correct the code.
    Last edited by Dacal; 2012-03-07 at 09:11 PM.
    2012-03-07 08:43 PM
  4. poofster1's Avatar
    Since Mylocation is needed for this and that only works for ios 5 ..are there any other gps apps that someone not on ios 5 can use to make this work? I'm dying here not being able to use this .
    2012-03-07 09:53 PM
  5. rasputin007's Avatar
    Please correct me if I'm wrong, If we move to another location, and the app changes the coordinates, then the widgets update automatically because the location.txt file has been re-written? Os we don't need to refresh every 20 minutes?
    Can anyone explain exactly how it works or do I have the right idea on how this updates itself?

    If so, which part of the code tells the widgets to change location because the text file coordinates have changed?

    Thanks wise men.
    It's in the GetLocation_Weather.js UpdateLocation() function
    After the first run, when it creates the first myLocation.txt file, it has values for the latidute and longitude, at the end of that function those values get passed on into different variables
    prevlatitude = latitude;
    prevlongitude = longitude;
    After a specified setInterval the updateLocation() function starts again, but now it compares
    if (prevlatitude != latitude || prevlongitude != longitude)
    are they the same then no refresh, are they different then it runs through all those scripts, fetches the Yahoo responses and builds a new updated lockscreen.
    My lockscreen updates automatically when I am on the move (school run for 10 miles), use a TomTom carkit to hold the phone and is connected to car stereo.
    2012-03-07 09:59 PM
  6. Schnedi's Avatar
    Since Mylocation is needed for this and that only works for ios 5 ..are there any other gps apps that someone not on ios 5 can use to make this work? I'm dying here not being able to use this .

    i have a friend (indyzzz) that confirmed it's working on iOS4!!

    this is his screenshot

    2012-03-07 10:00 PM
  7. The_Durben's Avatar
    Hi @ll,

    I rework the code a little (as i don't know jQuery, i replace with some classic AJAX functions, for me it's more easy to integrate). Here is my main code for the GetLocation_weather.js :




    @ll contributor (crazyvivek, Durben, Ian,...) : sorry, but few time to code at the moment. If you want the complete theme to see how it work, i can give you a link (=> PM).

    Oups, forget to update the weather if location don't change. I correct the code.
    Hey Dacal, if I replace my location.js with this everything else should still work correct?
    2012-03-07 10:02 PM
  8. rasputin007's Avatar
    Since Mylocation is needed for this and that only works for ios 5 ..are there any other gps apps that someone not on ios 5 can use to make this work? I'm dying here not being able to use this .
    You could try to edit the Info.plist file and change the details to your iOS detail
    <key>DTPlatformBuild</key>
    <string>9A334</string>
    <key>DTPlatformName</key>
    <string>iphoneos</string>
    <key>DTPlatformVersion</key>
    <string>5.0</string>
    <key>DTSDKBuild</key>
    <string>9A334</string>
    <key>DTSDKName</key>
    <string>iphoneos5.0</string>
    <key>DTXcode</key>
    <string>0421</string>
    <key>DTXcodeBuild</key>
    <string>4D502</string>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>MinimumOSVersion</key>
    <string>5.0</string>
    But you would do that on your own responsibility.
    I don't claim intellectual property on this one
    2012-03-07 10:06 PM
  9. bombmom's Avatar
    Hey Dacal, if I replace my location.js with this everything else should still work correct?
    Did for me. Thanks Dacal!
    2012-03-07 10:07 PM
  10. The_Durben's Avatar
    Did for me. Thanks Dacal!
    Me too I just tried but it drops the coordinates text being visible on screen.
    Not a big deal as it works but I wanted to show that.
    2012-03-07 10:12 PM
  11. Dacal's Avatar
    Me too I just tried but it drops the coordinates text being visible on screen.
    Not a big deal as it works but I wanted to show that.
    Coordinates are stored in a 'coordinates' element in my main.js. you just have to do the same thing


    My themes : Jade HD, Silex HD, BaSalt HD,ToPaz
    All are on Cydia and/or Theme It.
    2012-03-07 10:23 PM
  12. poofster1's Avatar
    Schnedi

    Well i found this download and install it and then had to edit the mylocation.txt to mine and then copy and paste the mylocation.txt to var/mobile/documents resprung and YIPPEE!!! I now have the exact same locscreen as indyzz.....THANK YOU ..now to mod and see what else works....have moved from my location to see what works tho....THANKS again ALL

    ipod touch 2g ios4.21


    Rasputin..

    Thanks i did change all the 5.0 to 4.0 in the info.plist and changed nothing else...don't know if that helped but i'm not changing them back
    Last edited by poofster1; 2012-03-08 at 12:47 AM.
    2012-03-08 12:43 AM
  13. King_O_Hill's Avatar
    OK, i have been following this the best that i can. I installed this early on with the initial release and had no problems. i modded it a little to suit me. Now i would like to move forward with some of the newly added features. My question is, i want to install "EPHDiOS5 GPS Weather", but i am not sure if i can just install on top of the installation that i already have, or if i need to remove what i have and start anew?
    2012-03-08 01:03 AM
  14. The_Durben's Avatar
    OK, i have been following this the best that i can. I installed this early on with the initial release and had no problems. i modded it a little to suit me. Now i would like to move forward with some of the newly added features. My question is, i want to install "EPHDiOS5 GPS Weather", but i am not sure if i can just install on top of the installation that i already have, or if i need to remove what i have and start anew?
    Clear your MyLocation app from the task switcher if it's there.
    Then manually delete the app and do a reboot (not respring)
    Then install the one from the repo and you'll be good.
    The EPHD GPS Weather theme will also install and work.

    In your own mod of the weather theme change your path to the text file in the weather location js to this

    *function UpdateLocation() { *

    * * * * * * * * jQuery.get('../../../../var/mobile/Documents/myLocation.txt', function(appdata) {

    And that one will also work. (not the stars * remove those when you copy it)
    2012-03-08 01:51 AM
  15. King_O_Hill's Avatar
    Thanks for the quick reply, I will try as soon as i am free to concentrate here in a few.

    EDIT:

    It worked like a charm! i made the edit to my original LS and it works too!

    Thanks for your help and everyone that worked to make this possible! You guys so Rock!
    Last edited by King_O_Hill; 2012-03-08 at 04:10 AM.
    2012-03-08 02:04 AM
  16. <Ian Nicoll/>'s Avatar
    My UniAW still doesn't auto update when changing locations, I'm now thinking it's something about PerPageHTML+, any of you guys got this autoupdating with a "PerPage" widget or are you all using WinterBoard widgets?
    Thanks.
    2012-03-08 07:50 AM
  17. Dacal's Avatar
    My UniAW still doesn't auto update when changing locations, I'm now thinking it's something about PerPageHTML+, any of you guys got this autoupdating with a "PerPage" widget or are you all using WinterBoard widgets?
    Thanks.
    Sorry, i don't use PerPageHTML. Only winterboard for now.
    2012-03-08 08:43 AM
  18. <Ian Nicoll/>'s Avatar
    Sorry, i don't use PerPageHTML. Only winterboard for now.
    Hi Dacal,

    I see you use in your "Config.js" file "var locale = 0;
    Does this mean that if they put the usual code it would work without GPS and zero uses GPS?

    Thanks again M8.
    2012-03-08 09:04 AM
  19. Dacal's Avatar
    Hi Dacal,

    I see you use in your "Config.js" file "var locale = 0;
    Does this mean that if they put the usual code it would work without GPS and zero uses GPS?

    Thanks again M8.
    Yes, exactly. Don't want to create 2 widgets, but one with the 2 options : GPS based or "classic". I test the locale variable in the main.js.

    If == 0 => GPS based
    If != 0 => Classic.
    2012-03-08 09:08 AM
  20. chevymusclecar's Avatar
    My UniAW still doesn't auto update when changing locations, I'm now thinking it's something about PerPageHTML+, any of you guys got this autoupdating with a "PerPage" widget or are you all using WinterBoard widgets?
    Thanks.
    Hi Ian I do believe perpage is the culprit as I tested today with a 60 min refresh interval as I was traveling through cities...it did not refresh before 60min but with refresh a five minutes it then knew my location in that time frame will set the widget for winter board and drive in to work tomorrow to test

    Good times and good night.

    Thank you Dacal very nice bro!!
    2012-03-08 09:11 AM
2,706 ... 1422232425263474124 ...
LINK TO POST COPIED TO CLIPBOARD