Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.
Thread: Weather Widgets No Setup or location tweaks needed #bAdGB
is a discussion within theiPhone 4|4S New Skins / Themes Launches
forums, a part of theNew 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
...-
10-26-2012, 06:55 PM #21Theme Creator
- Join Date
- Sep 2009
- Location
- Omaha, NE
- Posts
- 556
- Thanks
- 510
- Thanked 519 Times in 287 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.

-
The Following 2 Users Say Thank You to ryanstylee For This Useful Post:
RKO1195 (10-27-2012), The_Durben (10-26-2012)
-
10-26-2012, 10:56 PM #22Master Theme Creator
- Join Date
- Feb 2010
- Location
- Memphis,Tn
- Posts
- 4,573
- Thanks
- 2,809
- Thanked 5,390 Times in 2,331 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>
-
10-26-2012, 11:07 PM #23Random Thanks Collector
- Join Date
- Mar 2008
- Location
- England (leeds)
- Posts
- 1,603
- Thanks
- 684
- Thanked 1,104 Times in 543 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
. I Am the Random Thanks Collector So Please Press the Thanks Button
-
10-26-2012, 11:16 PM #24Master Theme Creator
- Join Date
- Feb 2010
- Location
- Memphis,Tn
- Posts
- 4,573
- Thanks
- 2,809
- Thanked 5,390 Times in 2,331 Posts
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
-
The Following User Says Thank You to June'sIphone For This Useful Post:
The_Durben (10-27-2012)
-
10-26-2012, 11:29 PM #25Random Thanks Collector
- Join Date
- Mar 2008
- Location
- England (leeds)
- Posts
- 1,603
- Thanks
- 684
- Thanked 1,104 Times in 543 Posts
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
-
10-27-2012, 12:52 AM #26Master Theme Creator
- Join Date
- Feb 2010
- Location
- Memphis,Tn
- Posts
- 4,573
- Thanks
- 2,809
- Thanked 5,390 Times in 2,331 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.htmlLast edited by June'sIphone; 10-27-2012 at 01:11 AM.
-
10-27-2012, 03:28 AM #27My iPhone is a Part of Me
- Join Date
- Aug 2009
- Location
- UK
- Posts
- 505
- Thanks
- 249
- Thanked 1,454 Times in 349 Posts
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.
-
The Following 2 Users Say Thank You to rasputin007 For This Useful Post:
RKO1195 (10-27-2012), The_Durben (10-27-2012)
-
10-27-2012, 04:48 AM #28
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.
-
10-27-2012, 07:16 AM #29Master Theme Creator
- Join Date
- Feb 2010
- Location
- Memphis,Tn
- Posts
- 4,573
- Thanks
- 2,809
- Thanked 5,390 Times in 2,331 Posts
-
The Following 2 Users Say Thank You to June'sIphone For This Useful Post:
KaiTa (10-27-2012), The_Durben (10-27-2012)
-
10-27-2012, 07:30 AM #30Livin the iPhone Life
- Join Date
- Jan 2008
- Location
- Gent belgium
- Posts
- 1,510
- Thanks
- 247
- Thanked 780 Times in 414 Posts
Nice concept but my location is waaaaaaaay off...

So still great work mate
-
10-27-2012, 07:33 AM #31Master Theme Creator
- Join Date
- Feb 2010
- Location
- Memphis,Tn
- Posts
- 4,573
- Thanks
- 2,809
- Thanked 5,390 Times in 2,331 Posts
-
10-27-2012, 08:11 AM #32Livin the iPhone Life
- Join Date
- Jan 2008
- Location
- Gent belgium
- Posts
- 1,510
- Thanks
- 247
- Thanked 780 Times in 414 Posts
Any idea on how to fix it?

-
10-27-2012, 09:46 AM #33widget modder
- Join Date
- Aug 2010
- Location
- Alabama
- Posts
- 1,235
- Thanks
- 5,165
- Thanked 2,391 Times in 870 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

-
10-27-2012, 10:45 AM #34Master Theme Creator
- Join Date
- Feb 2010
- Location
- Memphis,Tn
- Posts
- 4,573
- Thanks
- 2,809
- Thanked 5,390 Times in 2,331 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.
-
10-27-2012, 11:26 AM #35My iPhone is a Part of Me
- Join Date
- Aug 2009
- Location
- UK
- Posts
- 505
- Thanks
- 249
- Thanked 1,454 Times in 349 Posts
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.
-
10-27-2012, 11:31 AM #36Master Theme Creator
- Join Date
- Feb 2010
- Location
- Memphis,Tn
- Posts
- 4,573
- Thanks
- 2,809
- Thanked 5,390 Times in 2,331 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.
-
10-27-2012, 11:37 AM #37My iPhone is a Part of Me
- Join Date
- Aug 2009
- Location
- UK
- Posts
- 505
- Thanks
- 249
- Thanked 1,454 Times in 349 Posts
-
The Following User Says Thank You to rasputin007 For This Useful Post:
The_Durben (10-27-2012)
-
10-27-2012, 12:19 PM #38Master Theme Creator
- Join Date
- Feb 2010
- Location
- Memphis,Tn
- Posts
- 4,573
- Thanks
- 2,809
- Thanked 5,390 Times in 2,331 Posts
-
10-27-2012, 12:39 PM #39
-
10-27-2012, 01:02 PM #40The Mechanic
- Join Date
- Aug 2010
- Location
- Vancouver Canada
- Posts
- 7,458
- Thanks
- 29,786
- Thanked 34,647 Times in 6,586 Posts
-
The Following 2 Users Say Thank You to The_Durben For This Useful Post:
RKO1195 (10-28-2012), Steph53940 (10-27-2012)




LinkBack URL
About LinkBacks
Reply With Quote


