+ Reply
Page 2 of 3 FirstFirst 123 LastLast
Results 21 to 40 of 47

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: Weather Widgets No Setup or location tweaks needed #bAdGB

is a discussion within the

iPhone 4|4S New Skins / Themes Launches

forums, a part of the

New Skins / Themes Launches

section;
This is LIMITLESS. me as a noob , I've had tons of fun with this. It's a new beginning. Why **** with code. He did it! Messed around with weather
...
  1. #21
    Theme Creator ryanstylee's Avatar
    Join Date
    Sep 2009
    Location
    Omaha, NE
    Posts
    721
    Thanks
    975
    Thanked 1,313 Times in 431 Posts

    This is LIMITLESS. me as a noob , I've had tons of fun with this. It's a new beginning. Why **** with code. He did it!








    Messed around with weather icons last night. It's possible guys. Make it yours. A gift form JunesiPhone and bAdGB.


  2. The Following 2 Users Say Thank You to ryanstylee For This Useful Post:

    RKO1195 (10-27-2012), The_Durben (10-26-2012)

  3. #22
    Master Theme Creator June'sIphone's Avatar
    Join Date
    Feb 2010
    Location
    DaytonaBeach, FL
    Posts
    6,602
    Thanks
    5,162
    Thanked 9,771 Times in 3,570 Posts

    So in a search to figure out how to convert lat and long to a weather code so I could pull yahoo weather. I loaded Jedi's bAdOS Lockscreen mod. It is a gps based widget and works off MyLocation.

    MyLocation saves a file that has two lines the lat and long. After it pulls the text file it converts it to simple numbers then converts it to woid which is awesome. That means easily adapts Yahoo weather. So I wrote a script basically deleting the function that pulls the text file and just created my own var using the cooridinates googlejsapi gives.

    Very simple to convert. Here is the script.

    <script src="http://www.google.com/jsapi" language="javascript"></script>
    <script language="javascript">
    if (google.loader.ClientLocation != null) {
    var latitude = google.loader.ClientLocation.latitude;
    var longitude = google.loader.ClientLocation.longitude;
    } else {
    }
    </script>

  4. #23
    Random Thanks Collector Richard's Avatar
    Join Date
    Mar 2008
    Location
    England (leeds)
    Posts
    1,614
    Thanks
    688
    Thanked 1,111 Times in 547 Posts

    Looking good.

    I have an issue thought, as you can see from the screen shot it cuts off half the weather ?

    This was taken on my iPad but it does exactly the same on my iPhone ?

    And when I do put it on my iPhone I am not able to move any of the elements around like you show in your video ? Am I missing something here ?

    Thanks
    Attached Thumbnails Attached Thumbnails Weather Widgets No Setup or location tweaks needed #bAdGB-imageuploadedbymodmyi1351314307.305758.jpg  
    . I Am the Random Thanks Collector So Please Press the Thanks Button

  5. #24
    Master Theme Creator June'sIphone's Avatar
    Join Date
    Feb 2010
    Location
    DaytonaBeach, FL
    Posts
    6,602
    Thanks
    5,162
    Thanked 9,771 Times in 3,570 Posts

    Quote Originally Posted by Richard View Post
    Looking good.

    I have an issue thought, as you can see from the screen shot it cuts off half the weather ?

    This was taken on my iPad but it does exactly the same on my iPhone ?

    And when I do put it on my iPhone I am not able to move any of the elements around like you show in your video ? Am I missing something here ?

    Thanks
    The font size is just to big. You can go into the html and change that font to fit.

    This was a proof of concept and code for the community. Reason it free code for you to use.
    I didnt not include all features for moving items around. That was just a demonstration, and a little advertising for myself with the bAdHead.

    If you do want something pm me, a donation goes a long way for my time. Plus no one has even bought me a beer

  6. The Following User Says Thank You to June'sIphone For This Useful Post:

    The_Durben (10-27-2012)

  7. #25
    Random Thanks Collector Richard's Avatar
    Join Date
    Mar 2008
    Location
    England (leeds)
    Posts
    1,614
    Thanks
    688
    Thanked 1,111 Times in 547 Posts

    Quote Originally Posted by June'sIphone View Post
    So in a search to figure out how to convert lat and long to a weather code so I could pull yahoo weather. I loaded Jedi's bAdOS Lockscreen mod. It is a gps based widget and works off MyLocation.

    MyLocation saves a file that has two lines the lat and long. After it pulls the text file it converts it to simple numbers then converts it to woid which is awesome. That means easily adapts Yahoo weather. So I wrote a script basically deleting the function that pulls the text file and just created my own var using the cooridinates googlejsapi gives.

    Very simple to convert. Here is the script.

    <script src="http://www.google.com/jsapi" language="javascript"></script>
    <script language="javascript">
    if (google.loader.ClientLocation != null) {
    var latitude = google.loader.ClientLocation.latitude;
    var longitude = google.loader.ClientLocation.longitude;
    } else {
    }
    </script>
    Thanks for the advise, on the font size I was going to change that anyway but just wanted to check that there was nothing more simple I was doing wrong.

    Regarding the script above. Can you advise which script we replace and what this means in simple terms. Doe this mean it pulls the weather from yahoo rather than your IP address ?

    Let me be the first to buy you a beer :-)
    . I Am the Random Thanks Collector So Please Press the Thanks Button

  8. #26
    Master Theme Creator June'sIphone's Avatar
    Join Date
    Feb 2010
    Location
    DaytonaBeach, FL
    Posts
    6,602
    Thanks
    5,162
    Thanked 9,771 Times in 3,570 Posts

    Simple terms if you have a gps based widget you can change it to ipbased.

    it does not pull weather from your ip.. It pulls the location from the IP.

    The way this widget is setup is for Google weather

    If you alter a GPS widget it will be Yahoo weather which is better.

    Uploaded an iP weather widget here for bAdOS
    http://modmyi.com/forums/iphone-4-ne...os-mods-4.html
    Last edited by June'sIphone; 10-27-2012 at 01:11 AM.

  9. #27
    My iPhone is a Part of Me
    Join Date
    Aug 2009
    Posts
    666
    Thanks
    325
    Thanked 2,140 Times in 490 Posts

    Quote Originally Posted by June'sIphone View Post
    Thanks bro, its not very accurate because it goes off ip.

    I can pull gps location. The biggest issue as you may know is when anything uses your location services.

    It will ask you first. By a Broswer confirm box. Well on the Lockscreen and wallpaper.html. Popups are not allowed. So there is no way to press accept.

    That's all that's stopping me from have a gps based weather.

    I did successfully write a script that when I open in ifile it automatically says ok to the popup so now you don't see it when you go to get the gps it just auto accepts.

    Does not work on LS or SB though. I haven't found a way yet.
    That confirmation popup windows was a huge stumbling block in automating GPS updates, but there is a way around that, which worked fine for me.
    Read "Part 2", at the bottom of this page GPS and Shell Scripts.
    However this method is not liked as it involves the iPhone web server, PHP and shell scripts.
    How this could work on the LS can be seen on this example.

  10. The Following 2 Users Say Thank You to rasputin007 For This Useful Post:

    RKO1195 (10-27-2012), The_Durben (10-27-2012)

  11. #28
    iPhone? More like MyPhone
    Join Date
    Aug 2008
    Posts
    246
    Thanks
    184
    Thanked 183 Times in 100 Posts

    Quote Originally Posted by June'sIphone View Post
    All is from GoogleAPI
    It is possible here to create an own Name for my City?

    Example. My Hometown is New York. But the Widget should view me an own Name for New York. For example "Home"

    In yahoo based Widgets i make this with "obj.city ="Home";" Now i have the temp from New York but the Name is Home.

    Hope you understand me. My English is not well.
    Last edited by KaiTa; 10-27-2012 at 12:34 PM.

  12. #29
    Master Theme Creator June'sIphone's Avatar
    Join Date
    Feb 2010
    Location
    DaytonaBeach, FL
    Posts
    6,602
    Thanks
    5,162
    Thanked 9,771 Times in 3,570 Posts

    Quote Originally Posted by KaiTa View Post
    It is possible here to crate an own Name for my City?

    Example. My Hometown is New York. But the Widget should view me an own Name for New York. For example "Home"

    In yahoo based Widgets i make this with "obj.city ="Home";" Now i have the temp from New York but the Name is Home.

    Hope you understand me. My English is not well.
    I linked a yahoo version above.

    Quote Originally Posted by rasputin007 View Post
    That confirmation popup windows was a huge stumbling block in automating GPS updates, but there is a way around that, which worked fine for me.
    Read "Part 2", at the bottom of this page GPS and Shell Scripts.
    However this method is not liked as it involves the iPhone web server, PHP and shell scripts.
    How this could work on the LS can be seen on this example.
    I also ran across this. Required a server which is a bit much to take care of one button press.
    Last edited by June'sIphone; 10-27-2012 at 07:18 AM.

  13. The Following 2 Users Say Thank You to June'sIphone For This Useful Post:

    KaiTa (10-27-2012), The_Durben (10-27-2012)

  14. #30
    Livin the iPhone Life jelleheindryckx's Avatar
    Join Date
    Jan 2008
    Location
    Gent belgium
    Posts
    1,666
    Thanks
    247
    Thanked 888 Times in 471 Posts

    Nice concept but my location is waaaaaaaay off...
    So still great work mate

  15. #31
    Master Theme Creator June'sIphone's Avatar
    Join Date
    Feb 2010
    Location
    DaytonaBeach, FL
    Posts
    6,602
    Thanks
    5,162
    Thanked 9,771 Times in 3,570 Posts

    Quote Originally Posted by jelleheindryckx View Post
    Nice concept but my location is waaaaaaaay off...
    So still great work mate
    Only downfall thanks

  16. #32
    Livin the iPhone Life jelleheindryckx's Avatar
    Join Date
    Jan 2008
    Location
    Gent belgium
    Posts
    1,666
    Thanks
    247
    Thanked 888 Times in 471 Posts

    Any idea on how to fix it?

  17. #33
    widget modder RKO1195's Avatar
    Join Date
    Aug 2010
    Location
    Alabama
    Posts
    2,209
    Thanks
    9,807
    Thanked 5,003 Times in 1,708 Posts

    Mine shows a different state for some reason but i think you found something good here! Great job on this bud, I think the ip will not show very accurate location though. I could be wrong though
    WidgetWeather ​Thread

  18. #34
    Master Theme Creator June'sIphone's Avatar
    Join Date
    Feb 2010
    Location
    DaytonaBeach, FL
    Posts
    6,602
    Thanks
    5,162
    Thanked 9,771 Times in 3,570 Posts

    Right it is based on your providers ip. Some people will get a different state. There is no fixing this because it is what the code is told to do.

    I dont see this a permanent fix. But I do believe that this should be used as a default.

    Meaning take for example Gunnys widget I modified to pull location.
    If it shows the wrong city then manually enter your zip.

    Some people will install and it will be correct. Some will have to just enter there zip.

    In cases like mine I'm in a pretty big city. It shows my exact location and for many others as well.

  19. #35
    My iPhone is a Part of Me
    Join Date
    Aug 2009
    Posts
    666
    Thanks
    325
    Thanked 2,140 Times in 490 Posts

    Quote Originally Posted by June'sIphone View Post
    I also ran across this. Required a server which is a bit much to take care of one button press.
    iPhone web server, PHP etc is all in Cydia, install-reboot-running-done, can't get much simpler than this.
    Don't understand the "one button press" part. If you mean the GPS update, that is done automatically every time you lock the Home screen, no need to press anything.

    Weather for my IP address is only 100 miles away and I got annoyed with MyLocation app which was just a few miles out.
    Last edited by rasputin007; 10-27-2012 at 11:28 AM.

  20. #36
    Master Theme Creator June'sIphone's Avatar
    Join Date
    Feb 2010
    Location
    DaytonaBeach, FL
    Posts
    6,602
    Thanks
    5,162
    Thanked 9,771 Times in 3,570 Posts

    Right just like my location. But I think your missing the point.

    You and me may know how to set it up but users don't.

    I'm looking for a way to pull weather without installing ANY tweaks. I
    have the users in mind.

    Not interested in anymore tweaks I have to dl to get a theme working.

    Also the easy way is open ifile and enter your zip code. Pretty easy huh..

    Well why this? Cause every user does not know how to use file. for the people that dont and buy my themes they will have weather displayed, and it wont display my location it will display there location.

    If its a city over its better than my zip code. Which if you download any of my themes you will see. All my zip code and it will show my city for you. Hell I have seen users that had my theme for months and its still on my zip code.

    See why this makes sense now?
    Last edited by June'sIphone; 10-27-2012 at 11:38 AM.

  21. #37
    My iPhone is a Part of Me
    Join Date
    Aug 2009
    Posts
    666
    Thanks
    325
    Thanked 2,140 Times in 490 Posts

    Quote Originally Posted by June'sIphone View Post
    Right just like my location. But I think your missing the point.

    You and me may know how to set it up but users don't.

    I'm looking for a way to pull weather without installing ANY tweaks. I
    have the users in mind.

    Not interested in anymore tweaks I have to dl to get a theme working.
    True!
    What chances will an ordinary user have if even advanced user throw the towel.
    Just wanted to say that there is a way to avoid the confirmation popup window, that's all!

  22. The Following User Says Thank You to rasputin007 For This Useful Post:

    The_Durben (10-27-2012)

  23. #38
    Master Theme Creator June'sIphone's Avatar
    Join Date
    Feb 2010
    Location
    DaytonaBeach, FL
    Posts
    6,602
    Thanks
    5,162
    Thanked 9,771 Times in 3,570 Posts

    Quote Originally Posted by rasputin007 View Post
    True!
    What chances will an ordinary user have if even advanced user throw the towel.
    Just wanted to say that there is a way to avoid the confirmation popup window, that's all!
    Yea I gotcha thanks, just wish there was a native way

  24. #39
    iPhone? More like MyPhone
    Join Date
    Aug 2008
    Posts
    246
    Thanks
    184
    Thanked 183 Times in 100 Posts

    Quote Originally Posted by June'sIphone View Post
    I linked a yahoo version above.


    Sorry, but where?

  25. #40
    The Mechanic The_Durben's Avatar
    Join Date
    Aug 2010
    Location
    Vancouver Canada
    Posts
    8,424
    Thanks
    34,944
    Thanked 40,559 Times in 7,513 Posts


  26. The Following 2 Users Say Thank You to The_Durben For This Useful Post:

    RKO1195 (10-28-2012), Steph53940 (10-27-2012)

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts