cloudy

Author Topic: Weather Display Live for the iPhone and Android  (Read 64211 times)

0 Members and 2 Guests are viewing this topic.

Offline vogon1

  • Posts: 177
  • Utrecht, NL
Re: Weather Display Live for the iPhone
« Reply #60 on: January 22, 2010, 04:42:56 PM »
As a workaround I changed my Longitude in meteohub to EAST (though I am WEST) and iWDL now gets my location on the Map.

I guess is a bug in meteohub not iWDL?  :?

Actually, I think weather display does it wrong, it uses the wrong sign in the clientraw.txt; in my code I negate the longtude to get the right value.

Sietse

Offline vogon1

  • Posts: 177
  • Utrecht, NL
Re: Weather Display Live for the iPhone
« Reply #61 on: January 22, 2010, 04:48:25 PM »
This is what I tried - but no joy!

The file iwdl.js is not loaded by default by iWDL ;)
This is of course to trick you.

If you look in the head of index.html, you see:

Code: [Select]
<!--
        <script src="lib/jquery.1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
        <script src="lib/jqtouch.js" type="application/x-javascript" charset="utf-8"></script>
        <script src="lib/jqt.database.js" type="application/x-javascript" charset="utf-8"></script>
        <script src="lib/jquery.flot.min.js" type="application/x-javascript" charset="utf-8"></script>
        <script src="lib/jquery.timers.js" type="application/x-javascript" charset="utf-8"></script>
        <script src="iwdl.js" type="application/x-javascript" charset="utf-8"></script>
-->
        <script src="all.min.js" type="application/x-javascript" charset="utf-8"></script>

Only the all minimised version is loaded.

Change it to

Code: [Select]
        <script src="lib/jquery.1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
        <script src="lib/jqtouch.js" type="application/x-javascript" charset="utf-8"></script>
        <script src="lib/jqt.database.js" type="application/x-javascript" charset="utf-8"></script>
        <script src="lib/jquery.flot.min.js" type="application/x-javascript" charset="utf-8"></script>
        <script src="lib/jquery.timers.js" type="application/x-javascript" charset="utf-8"></script>
        <script src="iwdl.js" type="application/x-javascript" charset="utf-8"></script>
<!--
        <script src="all.min.js" type="application/x-javascript" charset="utf-8"></script>
-->

and the file is loaded, but that impacts performance.

If you have a patch that makes it work for both meteohub and weather display, I will include it in iWDL.

Sietse

PS - still working on iWDL, but personal life has taken over a bit recently.

Offline T-man

  • Posts: 166
  • Finland
    • Sää Tuulensuunkaari
Re: Weather Display Live for the iPhone
« Reply #62 on: January 22, 2010, 05:43:57 PM »
Thank you for sharing! Great application with real iPhone look and feel.

I'll contribute with Finnish translation when I have it ready.

BR - Timo

Offline gm4jjj

  • Posts: 27
  • Fife, Scotland
    • GM4JJJ Homepage
Re: Weather Display Live for the iPhone
« Reply #63 on: January 22, 2010, 06:35:55 PM »
Actually, I think weather display does it wrong, it uses the wrong sign in the clientraw.txt; in my code I negate the longtude to get the right value.

Sietse
Thanks Sietse,

Yes, I have encountered this type of problem many times myself as I have written some astronomy type software that has to cope with the two different conventions used for east and west. I believe that the fault lies with meteohub as the definition for clientraw.txt is clearly laid down in http://www.tnetweather.com/nb-0100.php



David

Offline gm4jjj

  • Posts: 27
  • Fife, Scotland
    • GM4JJJ Homepage
Re: Weather Display Live for the iPhone
« Reply #64 on: January 22, 2010, 06:42:03 PM »
Quote
The file iwdl.js is not loaded by default by iWDL
This is of course to trick you.

Aha! - Many thanks, now my changes are taking effect!

However the patch you put in all.mins.js  to allow the location to be manually set are now not there of course, so I need to look where I can alter that.

Once again thanks for the software and a donation is on its way.

 
David

Offline gm4jjj

  • Posts: 27
  • Fife, Scotland
    • GM4JJJ Homepage
Re: Weather Display Live for the iPhone
« Reply #65 on: January 22, 2010, 07:07:45 PM »
Sietse, thanks I got it working now - as a work around I have removed the negation of the longitude in iwdl.js so that my meteohub data works. I also have altered the code for the Station Name / Time split and that is working too. I am sorry I have not tried to make it work with meteohub and WDL, but hopefully this meteohub bug may be fixed.

Incidentally my station for iPhone viewers is at http://www.gm4jjj.co.uk/weather/iwdl now.

Note:I seem to have slow updating of data, possibly because I am using evaluation version of meteohub.

Edit: I think I fixed my problem with poor FTP upload today.
« Last Edit: January 23, 2010, 04:57:44 PM by gm4jjj »
David

Offline w_morf

  • wetterhuette.ch
  • Posts: 11
  • Rueti, Zuerich
    • wetterhuette.ch
Re: Weather Display Live for the iPhone
« Reply #66 on: January 23, 2010, 03:21:44 PM »
Hi

Forecast settings for all german users with "ä" other "ü" Cities

Here my example:

settings["yr.no"] = "Switzerland/Zürich/Unter-Fägswil";

http://wetterhuette.ch/iwdl/index.html

I hope this Tipp is for many users helpfull

Regards:
Walter

Offline T-man

  • Posts: 166
  • Finland
    • Sää Tuulensuunkaari
Re: Weather Display Live for the iPhone
« Reply #67 on: January 23, 2010, 03:46:13 PM »
Hi

Finnish translation at you disposal.

I fiddled bit with iwdl.js and added fi as a language option, but apparently it is not enough to have Finnish (fi) to show in iPhone language selection menu. It seems that something else must also be done.

BR - Timo

Offline vogon1

  • Posts: 177
  • Utrecht, NL
Re: Weather Display Live for the iPhone
« Reply #68 on: January 23, 2010, 09:04:49 PM »
Finnish translation at you disposal.

I fiddled bit with iwdl.js and added fi as a language option, but apparently it is not enough to have Finnish (fi) to show in iPhone language selection menu. It seems that something else must also be done.

Thanks for the translation.

In iwdl.js, search for dk; then add before the first line with dk the following:
Code: [Select]
    if (settings["lang"] == "fi") selected = 'selected'; else selected = '';
    str += "<option value='fi'" + selected + ">"  + texts["set_lang"] + ": fi</option>";

I will change this part; it is ugly.

Sietse

Offline T-man

  • Posts: 166
  • Finland
    • Sää Tuulensuunkaari
Re: Weather Display Live for the iPhone
« Reply #69 on: January 24, 2010, 04:54:43 PM »
There must be something I'm doing wrong/missing here. I added the code in iwdl.js and uploaded to server. But, fi is not shown in language options menu. I tried with iPod and Crome as well. Other languages are shown/working ok, but no Finnish (fi) on the list at all.

I can use Finnish if set it as a default language in iwdl_settings and don't touch the settings in iPod at all.

In iPod I eve deleted both Safari cache and corresponding iwdl database. Same result still.

BR  -Timo

PS. you can verify veikkola-weather.com which shall be redirected automatically to veikkola-weather.com/iwdl if you are using iPhone/iTouch. i.veikkola-weather.com works as well

Offline i_fiorentino

  • Alessandro Bardi
  • Posts: 1,439
  • 160 mls Carmignano (Po), Tuscany, Italy
    • Meteocarmignano.it
Re: Weather Display Live for the iPhone
« Reply #70 on: January 24, 2010, 06:03:10 PM »
Hi!
I've done my Italian translation for this application..
The file is in attachment.
Best regards,

Alessandro

Offline vogon1

  • Posts: 177
  • Utrecht, NL
Re: Weather Display Live for the iPhone
« Reply #71 on: January 24, 2010, 06:50:49 PM »
Thanks for all translations; T-man, a new release will be hopefully tomorrow, just wait for that one.

The next release will have lots of small changes, no records yet (monthly, yearly, alltime), that will be the 1.0 release.
For the 0.9 I would like translations for the following:

texts["Monday"]    = "Monday";
texts["Tuesday"]   = "Tuesday";
texts["Wednesday"] = "Wednesday";
texts["Thursday"]  = "Thursday";
texts["Friday"]    = "Friday";
texts["Saturday"]  = "Saturday";
texts["Sunday"]    = "Sunday";

Please mail translations to me (sietse -at- sietse -dot- nl), no need to flood the newsgroup with this.

The new release will contain the following languages:
cz, dk, en, fi, it, nl, no, se, sp

Other languages are welcome!

Sietse

Offline vogon1

  • Posts: 177
  • Utrecht, NL
Re: Weather Display Live for the iPhone
« Reply #72 on: January 25, 2010, 07:36:37 PM »
Hi,

Version 0.9 is available. Changes:
- Bottom toolbar now with icons
- Radar and webcam moved to bottom bar
- Support for Meteohub
- In graphs, wind direction now shows N, E, S, W if requested
- Graphs that cannot go below zero (e.g. rain) only show positive numbers
- Finnish, Czech, Spanish and Italian languages added
- Swapping between humidex and windchill if requested
- Weekdays instead of dates in yr.no forecast if requested
- A number of bug fixes

Check out the demo at http://sietse.net/iwdl-demo
Download: http://sietse.net/iwdl-latest.tar.gz

Additions to settings:
Code: [Select]
settings["all_langs"] = [ "cz", "dk", "en", "fi", "it", "nl", "no", "se", "sp" ];

// Station type; if this setting is not defined, Weather Display is assumed.
// Meteohub has another stationname/time separator, and negates longitude
// Possible setting: meteohub
// settings["station_type"] = "meteohub";

// When using yr.no, decide weather to show date and/or day of the week.
// Possible settings: date day date-day day-date
settings["date_day"] = "weekday";

// If you want to toggle humidex (temp > 17C) and windchill (temp < 17C), then uncomment following option.
// In the live screen setting (see above), use either field 44 or 45, it will toggle
// settings["humchill"] = "toggle";

// If you don't like the yellow background color, set your own color here:
settings["bgcolor"] = "#e0e0a0";

For upgraders, it may be wise to restart with the iwdl_settings.js.sample to be sure not to miss a setting.

One major item on the todo list for 1.0: daily, monthly, yearly, alltime records.

Bugs? Let me know!
Enjoy!
Sietse

Offline calljj

  • Posts: 11
Re: Weather Display Live for the iPhone
« Reply #73 on: January 25, 2010, 09:38:57 PM »
Thanks for sharing, amazing app!

J

Offline i_fiorentino

  • Alessandro Bardi
  • Posts: 1,439
  • 160 mls Carmignano (Po), Tuscany, Italy
    • Meteocarmignano.it
Re: Weather Display Live for the iPhone
« Reply #74 on: January 25, 2010, 09:40:26 PM »
Hi Sietse,
i've seen that you're just translated italian language in your new release.
BRAVO!  :D
Let me know if you need other translations.
Best regards,

Alessandro